v1

latestOpenAPI 3.1.02026-07-2611077199.5 KB

post/novelai/text-to-image

Request body

promptstring required

Image description for generation or modification

model'nai-diffusion-4-5-full' | 'nai-diffusion-4-5-curated' required

Model to use

ninteger

Number of images to generate 1 - 4

widthinteger

Image width

heightinteger

Image height

seedstring

Seed

stepsinteger

Number of sampling steps

scalenumber

A lower guidance scale produces softer, more painterly results. A higher guidance scale produces finer details and sharper effects.

negative_promptstring

Unwanted content

quality_toggleboolean

Quality toggle

sampler'Euler Ancestral' | 'Euler' | 'DPM++ 2S Ancestral' | 'DPM++ 2M SDE' | 'DPM++ 2M' | 'DPM++ SDE'

Sampler

noise_schedule'karras' | 'exponential' | 'polyexponential'

Noise schedule

hook_urlstring

Callback URL. The task completion or failure will be sent to this URL. The data structure is consistent with the <a href="fetch" target="_self">fetch structure</a>. If not set, you need to call the <a href="fetch" target="_self">fetch API</a> to query.

Example request

{
  "character_prompts": [
    {
      "uc": "blurred, extra accessories"
    }
  ],
  "vibe_transfer": [
    {
      "image": "https://example.com/ref1.jpg"
    }
  ],
  "character_reference": [
    {
      "image": "https://example.com/ref2.jpg"
    }
  ]
}

Response

Request successful

statusstring required
messagestring required
dataobject required

Example response

{
  "status": "SUCCESS",
  "message": "success",
  "data": {
    "jobId": "jobId"
  }
}