Skip to main content
POST
/
v1
/
generation
/
text-to-image
Submit Text-to-Image Task
curl --request POST \
  --url https://api.weryai.com/v1/generation/text-to-image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "WERYAI_IMAGE_2_0",
  "prompt": "A beautiful sunset over the ocean",
  "negative_prompt": "blurry, low quality",
  "image_number": 1,
  "aspect_ratio": "16:9",
  "resolution": "1080p",
  "use_web_search": false,
  "webhook_url": "https://your-server.com/webhook"
}
'
{
  "status": 0,
  "desc": "success",
  "message": "success",
  "data": {
    "batch_id": 123456789,
    "task_ids": [
      "task_abc123"
    ]
  }
}

Authorizations

Authorization
string
header
required

Authenticate using Bearer token. Get your API Key from the WeryAI Console.

Example: Authorization: Bearer sk-xxxxxxxxxxxxxxxx

Body

application/json
model
string
required

Model Key. Supported models for text-to-image:

Model NameModel Key
WeryAI 123 Image 2.0WERYAI_IMAGE_2_0
WeryAI Image 1.0WERYAI_IMAGE_1_0
Nano Banana ProCHATBOT_GEMINI_3_PRO_IMAGE_PREVIEW
Nano-bananaGEMINI_2_5_FLASH
GPT Image 1.5GPT_IMAGE_1_5
Seedream 4.5SEEDREAM_4_5
Seedream 4.0SEEDREAM_4
Wan2.6WAN_2_6
Wan2.5WAN_2_5
Dreamina 4.0DREAMINA_4
Dreamina 3.1DREAMINA
Dreamina 3.0DREAMINA_3
Qwen ImageQWEN
FluxFLUX
Gpt Image MiniGPT_IMAGE_1_MINI
Grok 2 ImageGROK_2_IMAGE
Imagen4IMAGE4
Example:

"WERYAI_IMAGE_2_0"

prompt
string
required

Positive text prompt

Required string length: 1 - 2000
Example:

"A beautiful sunset over the ocean"

aspect_ratio
string
required

Image aspect ratio (e.g., 9:16, 1:1, 16:9, etc.)

Example:

"16:9"

negative_prompt
string

Negative text prompt (exclude unwanted elements)

Maximum string length: 1000
Example:

"blurry, low quality"

image_number
integer
default:1

Number of images to generate

Required range: x >= 1
Example:

1

resolution
string

Resolution

Example:

"1080p"

Whether to use web search to enhance prompts

webhook_url
string<uri>

Callback URL where results will be sent when task completes

Example:

"https://your-server.com/webhook"

caller_id
integer<int64>

Caller ID (for business association)

Response

Task submitted successfully

status
integer

Business status code (0 indicates success)

Example:

0

desc
string

Status description

Example:

"success"

message
string

Multi-language message

Example:

"success"

data
object