Skip to main content
GET

Authorization

  • Auth Type: Bearer Auth (In: header)
  • Format: Authorization: Bearer <YOUR_API_KEY>
  • Description: Use Bearer <YOUR_API_KEY>. Format: Authorization: Bearer sk-xxxxxx.
  • API Key: where API Key is your AGCloud API KEY
Query an image generation task created by POST /sp/v1/images/generations. Poll this endpoint every few seconds until status reaches a terminal value.

Path Parameters

Request Example

Response Examples

Query requests return 200 OK when the task is found. Use status to determine whether generation is still running, succeeded, or failed.

Response Fields

Task Status

Error Responses

Non-2xx responses use a unified error format:
Terminal task failures may also include these error.code values:
  1. Call POST /sp/v1/images/generations to create a task.
  2. Store the returned id.
  3. Poll GET /sp/v1/images/generations/{id} every few seconds.
  4. When status is succeeded, read data[].url or data[].b64_json.
  5. When status is failed or timeout, treat the task as failed and read error.