curl --request POST \
--url https://api.dreamto.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen-image-2.1-pro",
"prompt": "A cinematic city-at-night poster with the title \"NIGHT RIDE\" at the top",
"size": "1024x1024"
}
'{
"created": 1795963958,
"data": [
{
"url": "https://api.dreamto.ai/v1/media/dtm_0123456789abcdef0123456789abcdef"
}
],
"usage": {
"image_count": 1,
"width": 1024,
"height": 1024
}
}{
"error": {
"code": "invalid_request",
"http_status": 400,
"message": "Invalid request.",
"request_id": "req_7c1e9a4b2d3f5a6b8c9d0e1f",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"http_status": 401,
"message": "Unauthorized.",
"request_id": "req_7c1e9a4b2d3f5a6b8c9d0e1f",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_balance",
"http_status": 402,
"message": "Insufficient balance.",
"request_id": "req_7c1e9a4b2d3f5a6b8c9d0e1f",
"type": "insufficient_balance_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"http_status": 429,
"message": "Rate limit exceeded. Please try again later.",
"request_id": "req_7c1e9a4b2d3f5a6b8c9d0e1f",
"type": "rate_limit_error"
}
}{
"error": {
"code": "service_unavailable",
"http_status": 502,
"message": "Service temporarily unavailable. Please try again later.",
"request_id": "req_7c1e9a4b2d3f5a6b8c9d0e1f",
"type": "api_error"
}
}Qwen-Image 2.1 Pro
Create image
Generates images from a prompt. The request is synchronous; the response carries image links, download and keep them promptly. Text-to-image only; image editing is not supported.
POST
/
v1
/
images
/
generations
curl --request POST \
--url https://api.dreamto.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen-image-2.1-pro",
"prompt": "A cinematic city-at-night poster with the title \"NIGHT RIDE\" at the top",
"size": "1024x1024"
}
'{
"created": 1795963958,
"data": [
{
"url": "https://api.dreamto.ai/v1/media/dtm_0123456789abcdef0123456789abcdef"
}
],
"usage": {
"image_count": 1,
"width": 1024,
"height": 1024
}
}{
"error": {
"code": "invalid_request",
"http_status": 400,
"message": "Invalid request.",
"request_id": "req_7c1e9a4b2d3f5a6b8c9d0e1f",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"http_status": 401,
"message": "Unauthorized.",
"request_id": "req_7c1e9a4b2d3f5a6b8c9d0e1f",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_balance",
"http_status": 402,
"message": "Insufficient balance.",
"request_id": "req_7c1e9a4b2d3f5a6b8c9d0e1f",
"type": "insufficient_balance_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"http_status": 429,
"message": "Rate limit exceeded. Please try again later.",
"request_id": "req_7c1e9a4b2d3f5a6b8c9d0e1f",
"type": "rate_limit_error"
}
}{
"error": {
"code": "service_unavailable",
"http_status": 502,
"message": "Service temporarily unavailable. Please try again later.",
"request_id": "req_7c1e9a4b2d3f5a6b8c9d0e1f",
"type": "api_error"
}
}Authorizations
Body
application/json

