Legacy Guide (Sync)

WARNING

The synchronous endpoint POST /v1/images/generations no longer supports the Vega series: calls return 400 model ... tiered expr run failed. Use the new async task API instead (submit → poll → download; the token-free content_url is time-limited — transfer promptly). This page keeps the pre-upgrade synchronous integration for transition reference only.

This page covers the two ways the Vega series was used through the synchronous endpoint before the migration: text-to-image (Vega-specific fields and recommended resolutions) and image-to-image (reference images via input). Available models and current prices are subject to the Model Plaza.

Text-to-Image (Vega Series)

Model IDDescription
wand-vega-image-liteVega Lite — cost-effective
wand-vega-image-flashVega Flash — fastest generation
wand-vega-image-proVega Pro — supports multiple reference images, highest quality

All three models share the synchronous endpoint /v1/images/generations and its common request fields (see Text-to-Image & Image-to-Image). Vega-specific conventions:

FieldNotes
promptText description, up to 2000 characters
sizewidthxheight format; different sizes may affect the billing tier; recommended values below
nFixed at 1 — Vega generates one image per call
response_formaturl (default, returns image links) or b64_json (Base64-encoded)

Common supported resolutions (widthxheight, mapped to aspect ratios):

Aspect ratioRecommended size
1:1 (square)1024x1024
16:9 (landscape)1920x1080
9:16 (portrait)1080x1920
3:41536x2048
4:32048x1536

Response example:

{
  "created": 1790583910,
  "data": [
    {
      "url": "http://data-shanghai-xxx.cos.ap-shanghai.myqcloud.com/output/wand-vega/xxx.png"
    }
  ],
  "usage": {
    "prompt_tokens": 13500,
    "completion_tokens": 0,
    "total_tokens": 13500
  }
}
NOTE

Vega is billed per call (a text-to-image call consumes roughly 13,500 tokens), and usage.total_tokens is handy for billing reconciliation; data[].url is a signed download link valid for 7 days — download and re-host it promptly.

Image-to-Image (Vega Series)

Same synchronous endpoint: reference images are passed through Vega's native input field via extra_body, and multiple reference images are supported (passing only prompt without input is plain text-to-image):

FieldTypeRequiredNotes
inputarray[object]YesMultimodal input array; each item's content is the list of reference images
input[].content[]array[object]YesEach reference image is written as {"type": "input_image", "image_url": "..."}
input[].content[].image_urlstringYesReference image location: public HTTP/HTTPS URL or data:image/png;base64,... (Base64 for local images)

Reference image limits per model:

ModelMax reference images
wand-vega-image-lite3
wand-vega-image-flash6
wand-vega-image-pro6 (extra billing from the 4th image on)

Notes for the Vega series:

  • The prompt must include wording like "keep the original image / design", otherwise the model ignores the reference images and treats the task as plain text-to-image
  • n is fixed at 1; one image per call
  • Reference image resolution does not affect output size (determined by size); max 10MB per image, PNG / JPEG supported
  • Billed per call; image-to-image consumes extra tokens depending on the number of reference images: pro includes the first 3 reference images free, and each image from the 4th on consumes roughly 10,000 extra tokens
cURL
Python (openai)
Node.js (openai)
curl -X POST https://api-model.shuntianchuang.cn/v1/images/generations \
  -H "Authorization: Bearer sk-your-token" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wand-vega-image-lite",
    "prompt": "keep this design exactly, add 3D glass crystal texture",
    "size": "1024x1024",
    "n": 1,
    "input": [{
      "content": [
        {"type": "input_image", "image_url": "https://xxx/reference-image.png"}
      ]
    }]
  }'