v1

latestOpenAPI 3.0.32026-07-241112213.6 KB
AI Image

Submit Task

Submit a text-to-image generation task. The system will generate images based on the provided prompt and model specifications.

post/v1/common_task/text2image/task/submit

Headers

Topview-Uidstring required

User ID

Authorizationstring required

API Key for authentication (Bearer token)

Request body

modelstring required

Model name (required), e.g., 'DALL-E 3', 'Midjourney v6', 'Stable Diffusion XL'

promptstring required

Positive prompt (required) describing the image to generate

aspectRatiostring

Aspect ratio, e.g., '1:1', '16:9', '9:16', '4:3'

generateCountinteger

Number of images to generate (1-4)

resolutionstring

Resolution, e.g., '1K', '2K', '4K', '512p'

boardIdstring

Board ID (optional). If provided, the task will be associated with this board.

noticeUrlstring

Callback URL for task completion notifications (optional). The system will send a POST request to this URL when the task is completed with task status and results.

Example request

{
  "aspectRatio": "1:1",
  "generateCount": 1,
  "resolution": "1K"
}

Response

Task submitted successfully

codestring

Response code

messagestring

Response message

Example response

{
  "code": "200",
  "message": "Success"
}