Skip to content

Draw Tasks

← API Reference · 简体中文

Create and query text-to-image tasks with the user-level draw key (see API Keys & Authentication). Tasks run asynchronously: get the uuid, then poll the detail until done.

Create a Draw Task

http
POST /ext/v1/draw/generation
ParameterTypeRequiredDescription
promptstringyesThe prompt
negativePromptstringnoNegative prompt
sizestringnoImage size (model-dependent, e.g. 1024x1024)
qualitystringnoQuality (where supported)
numberintnoNumber of images, ≥ 1, default 1
modelstringnoImage model name
seedintnoRandom seed

Response:

json
{ "uuid": "<task uuid>" }

Get a Draw Task

http
GET /ext/v1/draw/{uuid}

Only tasks owned by the key's owner are visible; otherwise A_DRAW_NOT_FOUND.

Response Fields (DrawDto)

FieldDescription
uuidTask ID
promptThe prompt
aiModelName / aiModelPlatformModel and platform used
interactingMethodGeneration method
isPublicPublic flag
starCount / isStarLike count and whether the current user liked it
processStatusProcessing status (poll this for completion)
processStatusRemarkStatus remark (failure reason etc.)
imageUuids / imageUrlsGenerated image IDs and URLs
durationElapsed time
dynamicParamsModel dynamic parameters
originalImageUuid/Url, maskImageUuid/UrlOriginal / guidance images (background generation etc.)
userUuid / userName / createTimeOwnership and time

Example

bash
# Create the task
curl -X POST "http://<host>:9999/ext/v1/draw/generation" \
  -H "Authorization: <draw user-level key>" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "A white owl under moonlight, ink painting style", "number": 2}'

# Poll the detail; take images from imageUrls once processStatus is done
curl "http://<host>:9999/ext/v1/draw/<task uuid>" \
  -H "Authorization: <draw user-level key>"

Previous: Knowledge Base Q&A · Next: MCP Services