Skip to main content
POST
/
v1
/
tasks
curl --request POST \
  --url https://qingbo.dev/v1/tasks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gpt-4o-image",
    "prompt": "星空下的古老城堡,数字艺术风格",
    "size": "1:1",
    "n": 1,
    "image_urls": [
      "https://example.com/reference.png"
    ]
  }'
{
  "code": "success",
  "data": "task-wave17486161910001884721"
}
Async processing mode: A task ID is returned after submission. Use the Query Task Status endpoint to retrieve the generation result. Generated image links are valid for 24 hours — please save them promptly.
curl --request POST \
  --url https://qingbo.dev/v1/tasks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gpt-4o-image",
    "prompt": "星空下的古老城堡,数字艺术风格",
    "size": "1:1",
    "n": 1,
    "image_urls": [
      "https://example.com/reference.png"
    ]
  }'
{
  "code": "success",
  "data": "task-wave17486161910001884721"
}

Authentication

Authorization
string
required
All endpoints require Bearer Token authenticationObtain an API Key:Visit the API Key management page to get your API KeyAdd the following to your request headers:
Authorization: Bearer YOUR_API_KEY

Request Parameters

model
string
default:"gpt-4o-image"
required
Image generation model nameExample: "gpt-4o-image"
prompt
string
required
Text description for image generationMaximum 1000 characters
size
string
Image generation sizeSupported ratios:
  • 1:1 - Square
  • 2:3 - Portrait
  • 3:2 - Landscape
n
integer
Number of images to generateSupports 1, 2, or 4. Costs are pre-deducted based on quantity.Default: 1Warning: Must be a plain number (e.g., 1), do not wrap in quotes
image_urls
array<url>
Reference image URL list for image-to-image generation or image editingLimit: Maximum 5 images
mask_url
string
Mask image URL
  • Must be PNG format
  • Dimensions must match the reference image
  • Maximum 4MB

Response Parameters

code
string
Response status code
  • success - Request successful, task submitted
data
string
Task ID, formatted as task-wave{timestamp}{userId}{random}Used to retrieve generation results via the Query Task Status endpoint

Important Notes

  1. Async processing: Tasks are processed asynchronously after submission. Use Query Task Status to retrieve results
  2. Link expiration: Generated image links are valid for 24 hours. Please download and save them promptly
  3. Image URL requirements: Reference images must be publicly accessible URLs or in Base64 format
  4. Billing: When n is greater than 1, costs are pre-deducted based on quantity