본문으로 건너뛰기
Cheapest Imagen
API 레퍼런스

작업 조회

비동기 요청 하나의 상태를 작업 ID로 조회합니다. `in_progress` 다음에 이미지와 함께 `succeeded` 또는 오류와 함께 `failed`가 됩니다. 작업은 이미지가 보관되는 72시간 동안 읽을 수 있습니다. 몇 초마다 조회하세요. 작업을 읽는 것은 진행 중인 요청으로 집계되지 않습니다. 여러 작업을 기다릴 때는 `GET /images/tasks?ids=`로 한 번에 읽으세요.

GET
/images/tasks/{id}

비동기 요청 하나의 상태를 작업 ID로 조회합니다. in_progress 다음에 이미지와 함께 succeeded 또는 오류와 함께 failed가 됩니다. 작업은 이미지가 보관되는 72시간 동안 읽을 수 있습니다. 몇 초마다 조회하세요. 작업을 읽는 것은 진행 중인 요청으로 집계되지 않습니다. 여러 작업을 기다릴 때는 GET /images/tasks?ids=로 한 번에 읽으세요.

Authorization

apiKey
headerAuthorizationBearer <token>

API 키이며, Authorization: Bearer <key>로 보냅니다.

Path Parameters

id*string

작업 ID입니다. 202 응답의 id이며 x-request-id와 같습니다.

Match^req_[0-9a-f]{24}$

Response Body

작업입니다.

application/json
  1. response
id*string

작업 ID입니다. 202 응답의 id이며 x-request-id와 같습니다.

object*"image.task"
Value in"image.task"
status*string

요청이 끝날 때까지 in_progress, 이후 succeeded 또는 failed입니다.

Value in"in_progress""succeeded""failed"
created*integer

요청이 접수된 시각으로, 초 단위 Unix 타임스탬프입니다.

finished*|

끝난 시각이며, 진행 중에는 null입니다.

model*string
result?

succeeded일 때 포함됩니다. 동기 호출이 반환했을 내용입니다.

error?

failed일 때 포함됩니다. 동기 호출이 반환했을 오류입니다. 실패한 작업은 청구되지 않습니다. 단, Nano Banana stable 채널에서의 거부는 예외입니다.

Example Request
curl -X GET 'https://api.cheapestimagen.com/v1/images/tasks/string'
Example Response
{  "id": "string",  "object": "image.task",  "status": "in_progress",  "created": 0,  "finished": 0,  "model": "string",  "result": {    "created": 0,    "data": [      {        "b64_json": "string",        "url": "http://example.com"      }    ]  },  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}