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"
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.weryai.com/llms.txt

Use this file to discover all available pages before exploring further.

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 KeySupported Aspect Ratios
WeryAI Image 2.0WERYAI_IMAGE_2_09:16 1:1 16:9 3:4 4:3
WeryAI Image 1.0WERYAI_IMAGE_1_09:16 1:1 16:9 4:3 3:4
Nano Banana 2GEMINI_3_1_FLASH_IMAGE9:16 1:1 16:9 4:3 3:4 3:2 2:3 5:4 4:1 1:4 8:1 1:8 21:9
Nano Banana ProCHATBOT_GEMINI_3_PRO_IMAGE_PREVIEW9:16 1:1 16:9 4:3 3:4 3:2 2:3 5:4 21:9
Nano-bananaGEMINI_2_5_FLASH9:16 1:1 16:9 4:3 3:4 3:2 2:3 5:4 21:9
GPT Image 2GPT_IMAGE_21:1 2:3 3:4 3:2 4:3 16:9(1k) 16:9(2k) 16:9(4k) 9:16(1k) 9:16(2k) 9:16(4k)
GPT Image 1.5GPT_IMAGE_1_53:2 1:1 2:3
Seedream 5.0 liteSEEDREAM_5_0_LITE9:16 1:1 16:9 3:4 4:3 2k 3k
Seedream 4.5SEEDREAM_4_59:16 1:1 16:9 3:4 4:3 2k 4k
Seedream 4.0SEEDREAM_49:16 1:1 16:9 3:2 2:3 3:4 4:3
Wan2.7WAN_2_79:16 1:1 16:9 3:2 2:3 3:4 4:3
Wan2.7 ProWAN_2_7_PRO9:16 1:1 16:9 3:2 2:3 3:4 4:3
Wan2.6WAN_2_69:16 1:1 16:9 3:4 4:3
Wan2.5WAN_2_59:16 1:1 16:9 3:2 2:3 3:4 4:3
Dreamina 4.0DREAMINA_41:1 4:3 3:4 3:2 2:3 16:9 9:16 21:9 9:21
Dreamina 3.1DREAMINA9:16 1:1 4:3 16:9 3:4
Dreamina 3.0DREAMINA_31:1 4:3 3:4 3:2 2:3 16:9 9:16 21:9 9:21
Qwen Image 2 ProQWEN_2_PRO9:16 1:1 16:9 4:3 3:4
Qwen Image 2QWEN_29:16 1:1 16:9 4:3 3:4
Qwen ImageQWEN9:16 1:1 16:9 4:3 3:4
FluxFLUX9:16 1:1 16:9 3:2 2:3 3:4 4:3
Gpt Image MiniGPT_IMAGE_1_MINI1:1
Grok 2GROK_IMAGINE_IMAGE3:4
Imagen4IMAGE49:16 1:1 16:9 4:3 3:4
Recraft V4RECRAFT_V49:16 1:1 16:9 4:3 3:4
Recraft V4 ProRECRAFT_V4_PRO9:16 1:1 16:9 4:3 3:4
Recraft V4 VectorRECRAFT_V4_TO_VECTOR9:16 1:1 16:9 4:3 3:4
Recraft V4 Pro VectorRECRAFT_V4_PRO_TO_VECTOR9:16 1:1 16:9 4:3 3:4
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). Refer to the model table above for supported values per model.

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: 1 <= x <= 4
Example:

1

quality
string

Image quality. Supported values per model:

Model NameModel KeySupported Quality
GPT Image 2GPT_IMAGE_2low medium high
Example:

"high"

resolution
string

Image resolution. Supported values per model:

Model NameModel KeySupported Resolutions
Nano Banana 2GEMINI_3_1_FLASH_IMAGE1k 2k 4k
Nano Banana ProCHATBOT_GEMINI_3_PRO_IMAGE_PREVIEW1k 2k 4k
Dreamina 4.0DREAMINA_41k 2k 4k
Dreamina 3.0DREAMINA_31k 2k
Example:

"1k"

Whether to use web search to enhance prompts. Supported models:

Model NameModel Key
Nano Banana 2GEMINI_3_1_FLASH_IMAGE
Nano Banana ProCHATBOT_GEMINI_3_PRO_IMAGE_PREVIEW
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