Image generation
Generate images from a prompt. Do not send that prompt to chat completions.
text
POST https://uni.sointech.com.cn/v1/images/generationsModels on this API today include qwen-image-3.0, qwen-image-3.0-pro, gpt-image-2, gpt-image-2.5-flare, and gpt-image-2.5-sunburst. The list changes. Use the image models shown in the catalog.
Request
| Header | Value |
|---|---|
Authorization | Bearer sk-your-token |
Content-Type | application/json |
| Field | Meaning |
|---|---|
model | Image model name |
prompt | What the image should show |
size | Optional, for example 1024x1024. An unsupported size is rejected |
n | Optional image count. Default is 1 |
bash
curl https://uni.sointech.com.cn/v1/images/generations \
-H "Authorization: Bearer sk-your-token" \
-H "Content-Type: application/json" \
-d "{\"model\":\"qwen-image-3.0\",\"prompt\":\"a white letter mark inside a blue oval\",\"size\":\"1024x1024\",\"n\":1}"Response
Images are in the data array. Some models return data[0].url. Others return data[0].b64_json. Use whichever field is present.
SDK
python
from openai import OpenAI
client = OpenAI(
api_key="sk-your-token",
base_url="https://uni.sointech.com.cn/v1",
)
image = client.images.generate(
model="qwen-image-3.0",
prompt="a white letter mark inside a blue oval",
size="1024x1024",
n=1,
)
print(image.data[0].url)Image models are usually billed per call or with a dynamic expression. The price, and which sizes are accepted, are whatever the catalog says at the time.
