> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# GPT Image 2.5 Flare Standard

POST https://api.beatapi.io/v1/images/tasks
Content-Type: application/json

텍스트와 최대 16장의 참조 이미지로 1K, 2K, 4K 또는 정확한 픽셀 크기의 이미지를 생성하거나 편집합니다. 렌더링마다 사용한 토큰으로 과금되며, `quality` 설정으로 출력 토큰을 정합니다.- 토큰으로 과금됩니다. 텍스트 입력, 이미지 입력, 출력 토큰에 1M 토큰당 요금이 적용됩니다. 아래 이미지당 가격은 `medium` 품질 기준 추정치입니다.
- `quality`는 렌더링에 쓰이는 출력 토큰 수, 즉 가격을 정합니다. 값이 낮을수록 저렴합니다. 생략하면 `medium`입니다.
- 비동기 방식만 지원합니다. `POST /v1/images/tasks`로 작업을 만든 뒤 `GET /v1/tasks/{task_id}`를 폴링하세요. 렌더링은 BeatAPI 측에서 실행되므로 오래 걸려도 연결을 붙잡고 있지 않습니다. 이 모델에서는 동기식 `POST /v1/images/generations`를 사용할 수 없습니다.
- 작업 하나에 이미지 한 장입니다. 여러 장이 필요하면 작업을 여러 개 만드세요.
- 텍스트로 이미지를 만들거나, 공개 HTTPS 링크로 전달한 최대 16장의 참조 이미지를 편집·합성합니다.
- `resolution`과 `aspect_ratio`로 프레임을 정하거나, `1536x1024` 같은 정확한 `size` 하나로 정합니다. 두 가지를 함께 쓸 수는 없습니다.토큰 단위로 판매하는 [`gpt-image-2.5-flare`](/image-api/gpt-image-2-5-flare)입니다. 필드, 해상도, 화면비, 참조 이미지 등 모델과 요청은 같습니다. `gpt-image-2.5-flare`는 이미지당 고정 가격을 받고, `gpt-image-2.5-flare-std`는 렌더링마다 실제로 쓴 토큰만큼 과금하며 `quality` 설정을 받습니다. [가격](https://beatapi.io/pricing).POST/v1/images/tasks실행해 보기API Explorer에서 이 모델을 엽니다. BeatAPI API 키를 입력해 작업을 만드세요. 실제 호출이며 본인 잔액에서 과금됩니다.## 모델 ID고정 가격 모델과 이 모델은 같은 요청을 받습니다. `quality`와 가격 계산 방식만 다릅니다. 아래 값은 게이트웨이 계약에서 그대로 가져왔습니다.| 모델 ID                         | `resolution`     | `quality`                               | 최대 `images` | 가격                                                 |
| ----------------------------- | ---------------- | --------------------------------------- | ----------- | -------------------------------------------------- |
| `gpt-image-2.5-flare`         | `1K`, `2K`, `4K` | —                                       | 16          | 크기 구간별 이미지당 고정 가격. `quality`를 거부합니다.               |
| **`gpt-image-2.5-flare-std`** | `1K`, `2K`, `4K` | `low`, `medium`, `high`, `xhigh`, `max` | 16          | 렌더링에 쓴 토큰을 1M 토큰당 요금으로 과금. `quality`로 출력 토큰을 정합니다. |## 엔드포인트와 인증`POST https://api.beatapi.io/v1/images/tasks`Authorization
string
필수BeatAPI API 키를 `Bearer <BEATAPI_API_KEY>`로 보내세요. 키는 [대시보드](https://beatapi.io/dashboard)에서 만듭니다. 키는 서버에 보관하고, 브라우저나 모바일 앱에 포함하지 마세요.본문은 `Content-Type: application/json`과 함께 JSON으로 보냅니다. `Idempotency-Key`는 선택 사항입니다. 논리적 요청마다 고유한 값(최대 255자)을 보내고, 완전히 같은 본문을 재시도할 때만 다시 사용하세요. 24시간 안에 같은 키와 본문으로 재시도하면 첫 응답을 `Idempotent-Replayed: true`와 함께 다시 반환하고, 같은 키에 다른 본문을 보내면 `409 idempotency_conflict`를 반환합니다. 2xx 이외의 응답은 저장되지 않으므로 400이나 402 이후의 재시도는 다시 실행됩니다.## 요청 처리 방식아래 파라미터를 엔드포인트로 `POST`하세요. `201`은 작업이 접수되었고 가격만큼 잔액이 보류되었다는 뜻이며, 작업은 백그라운드에서 실행됩니다. `data.id`를 저장하세요.`status`가 `succeeded` 또는 `failed`가 될 때까지 `GET /v1/tasks/{task_id}`를 호출하고, 호출 사이에 `data.poll_after_seconds`만큼 기다리세요(이미지 5초, 영상 8초). 또는 `task.succeeded`와 `task.failed`에 대한 [웹훅](/webhooks)을 등록하세요. 처리 시간 초과로 중단된 작업은 이벤트를 보내지 않으므로 폴링은 대비책으로 유지하세요.`succeeded`이면 모든 `data.output.media[].url`을 다운로드해 필요한 파일을 저장하세요. BeatAPI는 결과 URL을 얼마 동안 사용할 수 있는지 보장하지 않습니다. `failed`이면 `data.error_code`와 `data.error_message`를 확인하세요. 보류된 금액은 잔액으로 돌아왔으며, `data.retryable`은 같은 요청을 다시 보내면 성공할 수 있는지 알려 줍니다.## 입력 모드| 모드          | 필수 입력                       | 참고                                                        |
| ----------- | --------------------------- | --------------------------------------------------------- |
| 텍스트로 이미지 생성 | `model`, `prompt`           | `images`를 생략합니다.                                          |
| 이미지 편집·합성   | `model`, `prompt`, `images` | 공개 HTTPS 이미지 링크 1\~16개. 무엇을 바꾸고 유지하고 합칠지 `prompt`에 설명하세요. |## 요청 파라미터model
string
필수실행할 모델입니다.**값**: `gpt-image-2.5-flare-std`**값이 잘못된 경우**- 누락: `"model" is required`
- 알 수 없는 모델 ID: `"model" gpt-image-9 is not catalogued`
- 이 엔드포인트로 영상 모델을 보낸 경우: `"model" seedance-2.5 is served by POST /v1/videos/tasks, not this endpoint`prompt
string
필수그릴 내용 또는 참조 이미지에서 바꿀 내용입니다. 피사체, 스타일, 조명, 구도, 이미지에 꼭 들어가야 하는 텍스트를 평이한 말로 적는 것이 가장 좋습니다.**길이**: 1–5000자- 길이는 문자 수로 계산합니다(한중일 문자 하나는 1자).
- `images`를 보낼 때는 각 이미지의 역할을 적으세요. 예: "첫 번째 이미지는 제품, 두 번째 이미지는 배경으로 사용".**값이 잘못된 경우**- 누락: `"prompt" is required`
- 비어 있거나 한도보다 긴 경우: `"prompt" has an unsupported length`
- 문자열이 아닌 경우: `"prompt" must be a string`images
string[]
선택편집하거나 합성할 참조 이미지입니다. 이 필드를 보내면 요청이 텍스트로 이미지 생성에서 이미지 편집으로 바뀝니다.**항목 수**: 1–16  \
각 항목은 공개 `https://` URL입니다. 로컬 파일은 `POST /v1/files`로 [먼저 업로드](/quick-guide#upload-an-input-file)한 뒤 반환된 `data.url`을 전달하세요.- 각 링크는 공개 HTTPS로 이미지 파일 자체(PNG, JPEG, WebP, 최대 50 MB)를 반환해야 합니다. 게이트웨이는 작업을 만들기 전에 모든 링크의 처음 몇 바이트를 내려받아, 파일 이름이나 `Content-Type`이 아니라 그 바이트로 형식을 판별합니다.
- 웹 페이지, 로그인이 필요한 페이지, 만료된 서명 URL, 핫링크 방지 호스트로 연결되는 링크는 이미지를 반환하지 않으므로 거부됩니다.
- 오류 메시지의 위치는 0부터 시작합니다. `images[0]`이 첫 번째 링크입니다.**값이 잘못된 경우**- 최대 개수를 넘은 경우: `"images" accepts at most 16 items`
- 빈 배열: `"images" requires at least 1 item`
- https\:// 링크가 아닌 경우: `"images[0]" must be a public HTTPS URL`
- 비공개 또는 안전하지 않은 주소: `"images[0]" must be a publicly reachable HTTPS image URL`
- 호스트가 4xx 오류로 응답한 경우: `"images[0]" could not be downloaded: the URL returned HTTP 404`
- 링크가 PNG, JPEG, WebP 이외의 형식을 반환한 경우: `"images[0]" is not a PNG, JPEG or WebP image: the URL returned text/html`
- 50 MB보다 큰 경우: `"images[2]" is 63.4 MB; images must be 50 MB or smaller`**예시**```json
"images": [
  "https://cdn.beatapi.io/samples/smart-bottle.png",
  "https://cdn.beatapi.io/samples/neon-singer.png"
]
```aspect_ratio
string
선택기본값: auto가로:세로로 나타낸 이미지 모양입니다. `resolution`과 함께 보내거나, 둘 다 생략하고 `size`를 보내세요.**허용 값**: `auto`, `1:1`, `3:2`, `2:3`, `4:3`, `3:4`, `5:4`, `4:5`, `16:9`, `9:16`, `2:1`, `1:2`, `3:1`, `1:3`, `21:9`, `9:21`  \
**기본값**: `auto`- 기본값이 `auto`이므로 이 필드를 생략한 요청도 정사각형으로 렌더링됩니다.
- 파노라마 비율 `2:1`, `1:2`, `3:1`, `1:3`, `21:9`, `9:21`도 허용됩니다. 가장 넓거나 긴 프레임은 3:1입니다.
- `size`와 함께 사용할 수 없습니다.`auto`는 '참조 이미지를 따름'이 아닙니다. `images`가 있든 없든 선택한 `resolution`에서 정사각형 프레임을 요청합니다. 편집 결과를 다른 모양으로 바꾸려면 비율을 지정하거나 `size`를 보내세요.**값이 잘못된 경우**- 목록에 없는 값: `"aspect_ratio" must be one of: [auto 1:1 3:2 2:3 4:3 3:4 5:4 4:5 16:9 9:16 2:1 1:2 3:1 1:3 21:9 9:21]`
- `size`와 함께 보낸 경우: `"size" already fixes the output; do not send "aspect_ratio" with it`resolution
string
선택기본값: 1K이미지 크기 등급입니다. 등급이 높을수록 이미지가 커지고 비용도 늘어납니다. 정확한 픽셀 크기는 `aspect_ratio`에 따라 달라지며 모델이 정합니다.**허용 값**: `1K`, `2K`, `4K`  \
**기본값**: `1K`- 대문자 K를 사용하세요. `2k`는 거부됩니다.
- 이 페이지는 등급별 정확한 픽셀 크기를 보장하지 않습니다. 정확한 프레임이 필요하면 `size`를 보내세요.
- 자체 크기를 지정하는 `size`와 함께 사용할 수 없습니다.**값이 잘못된 경우**- 목록에 없는 값: `"resolution" must be one of: [1K 2K 4K]`
- `size`와 함께 보낸 경우: `"size" already fixes the output; do not send "resolution" with it`size
string
선택정확한 출력 프레임을 픽셀 단위의 `WIDTHxHEIGHT`로 지정합니다(예: `1536x1024`). `resolution`과 `aspect_ratio`를 대신합니다.- 가로와 세로 모두 16의 배수이면서 16\~3840 px여야 합니다.
- 전체 픽셀 수는 655,360\~8,294,400이어야 하며, 긴 변은 짧은 변의 3배를 넘을 수 없습니다.
- 구분자는 `x`, `X`, `×` 중 하나를 사용할 수 있으며, 앞뒤 공백은 무시됩니다.
- 픽셀 수에 따라 출력 토큰과 가격이 달라집니다. 작업이 정산되기 전까지는 픽셀 수가 속한 등급의 추정 금액이 보류됩니다. 2,097,152픽셀 이하는 1K, 5,898,240픽셀 이하는 2K, 그보다 크면 4K입니다.
- 기본값이라도 `resolution`이나 `aspect_ratio`를 함께 보내지 마세요.`size`는 보낸 그대로 검사하지만, 전달되는 이미지가 정확히 그 픽셀 크기라고 보장하지는 않습니다. 파이프라인이 정확한 크기에 의존한다면 저장된 파일을 확인하세요.**값이 잘못된 경우**- 문자열이 아닌 경우: `"size" must be a string`
- WIDTHxHEIGHT 형식이 아닌 경우(숫자만 있음, `auto`, 쉼표): `"size" must be WIDTHxHEIGHT in pixels, for example 1536x1024`
- 한 변이 16의 배수가 아닌 경우: `"size" width and height must be multiples of 16`
- 한 변이 16 미만 또는 3840 초과인 경우: `"size" edges must be between 16 and 3840 pixels`
- 픽셀 수가 너무 적거나 많은 경우: `"size" must have between 655,360 and 8,294,400 pixels; 512x512 has 262,144`
- 3:1보다 넓거나 긴 경우: `"size" must not be wider or taller than 3:1`
- `resolution`과 함께 보낸 경우: `"size" already fixes the output; do not send "resolution" with it`
- `aspect_ratio`와 함께 보낸 경우: `"size" already fixes the output; do not send "aspect_ratio" with it`**예시**```json
"size": "1536x1024"
```quality
string
선택기본값: medium모델이 이미지에 들이는 작업량입니다. 렌더링에 쓰이는 출력 토큰 수, 즉 가격을 정합니다. 값이 낮을수록 저렴하고 높을수록 비쌉니다.**허용 값**: `low`, `medium`, `high`, `xhigh`, `max`  \
**기본값**: `medium`- 생략하면 `medium`이며, 이 페이지의 이미지당 가격은 이 품질을 기준으로 추정했습니다.
- 고정 가격 [`gpt-image-2.5-flare`](/image-api/gpt-image-2-5-flare)는 이 필드를 받지 않으며 거부합니다.**값이 잘못된 경우**- 목록에 없는 값: `"quality" must be one of: [low medium high xhigh max]`**예시**```json
"quality": "low"
```background
string
선택기본값: auto이미지에 채워진 배경을 둘지, 투명 배경으로 할지 정합니다.**허용 값**: `auto`, `opaque`, `transparent`  \
**기본값**: `auto`- `auto`(기본값)는 모델에 맡깁니다. `opaque`는 채워진 배경을 요청합니다.
- `transparent`는 배경에 색이 없는 이미지를 요청합니다. 결과는 알파 채널이 있는 PNG이며, `output.media[].mime_type`을 확인하세요.**값이 잘못된 경우**- 목록에 없는 값: `"background" must be one of: [auto opaque transparent]`게이트웨이는 작업을 만들기 전에 다음 조합도 검사합니다.- size는 WIDTHxHEIGHT 형식이며 resolution과 aspect\_ratio를 대신합니다. 두 변 모두 16의 배수이면서 16-3840 px, 전체 655,360-8,294,400픽셀, 최대 3:1
- size는 등급이 아니라 렌더링에 쓰인 토큰으로 과금됩니다
- quality는 출력 토큰 수, 즉 가격을 정하며 기본값은 medium입니다
- 렌더링마다 사용한 토큰(텍스트 입력, 이미지 입력, 출력)에 표시된 토큰당 요금으로 과금됩니다. 표시된 이미지당 가격은 medium 품질 기준 추정치입니다
- 토큰 단위로 과금되는 공식 버전입니다. quality로 low, medium, high, xhigh, max를 받으며, gpt-image-2.5-flare(이미지당 고정 가격)는 이 값을 받지 않습니다## 입력 미디어 제한게이트웨이는 작업을 만들기 전에 모든 입력을 읽고, 아래 제한을 벗어난 입력은 해당 입력을 명시한 `400 bad_request`로 거부합니다. 과금되지 않습니다.- 참조 이미지: PNG, JPEG, WebP(파일 내용으로 판별), 각 최대 50 MB(10진 메가바이트, 호스트가 크기를 알려 줄 때 검사), 링크 1\~16개. GIF, HEIC, SVG는 거부됩니다.
- 참조 이미지 자체의 픽셀 수나 화면비 제한은 검사하지 않습니다.
- 호스트가 제시간에 응답하지 않아도 생성 시점에 링크를 거부하지는 않습니다. 작업이 실행될 때 게이트웨이가 다시 가져오며, 그때도 가져올 수 없으면 작업이 실패하고 환불됩니다.
- 로컬 파일이 있다면 `POST /v1/files`로 업로드하고 반환된 `data.url`을 전달하세요.## 프레임 선택: `resolution`과 `aspect_ratio`, 또는 `size`이미지의 크기와 모양을 지정하는 방법은 두 가지이며, 서로 함께 쓸 수 없습니다.- **등급과 비율.** `resolution`(`1K`, `2K` 또는 `4K`)을 보내고, 원하는 모양이 있으면 `aspect_ratio`도 보냅니다. 둘 다 생략하면 `1K`와 `auto`, 즉 정사각형 프레임이 됩니다.
- **정확한 크기.** `size`만 보냅니다(예: `1536x1024`). 픽셀 수에 따라 출력 토큰이 달라지며, 작업이 정산되기 전까지는 해당 등급 기준으로 보류됩니다(위 조합 규칙 참고).`size`를 `resolution` 또는 `aspect_ratio`와 함께 보내면 `"size" already fixes the output; do not send "resolution" with it`(또는 `"aspect_ratio"`)으로 거부됩니다. 다른 필드가 기본값이어도 마찬가지입니다.## 제출 후 폴링이 모델은 작업으로만 실행됩니다. `POST /v1/images/tasks`는 `data.id`에 작업 ID를 담아 즉시 응답합니다. 그다음 `data.status`가 `succeeded` 또는 `failed`가 될 때까지 `data.poll_after_seconds`마다 `GET /v1/tasks/{task_id}`를 호출하세요. 렌더링은 BeatAPI 측에서 실행되므로 오래 걸려도 연결을 붙잡거나 클라이언트 시간 제한에 걸리지 않습니다. 이 모델에서는 동기식 `POST /v1/images/generations`를 사용할 수 없습니다.```bash title="Submit, then poll"
# 1. Create the task. The call returns at once; the task ID is in data.id.
TASK_ID=$(curl -sS -X POST https://api.beatapi.io/v1/images/tasks \
  -H "Authorization: Bearer $BEATAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-image-2.5-flare-std","prompt":"A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field","resolution":"2K","quality":"medium"}' | jq -r '.data.id')

# 2. Poll until the task is final. The render runs on BeatAPI, not on this connection.
while true; do
  TASK=$(curl -sS "https://api.beatapi.io/v1/tasks/$TASK_ID" -H "Authorization: Bearer $BEATAPI_API_KEY")
  STATUS=$(echo "$TASK" | jq -r '.data.status')
  if [ "$STATUS" = "succeeded" ] || [ "$STATUS" = "failed" ]; then break; fi
  sleep 5
done
echo "$TASK" | jq '.data.output.media[].url, .data.usage'
```Capabilities API에서도 방식은 같습니다. `POST /v1/capabilities/run`으로 시작한 다음, 반환된 작업 ID로 `succeeded` 또는 `failed`가 될 때까지 상태 조회를 보내세요.```json title="POST /v1/capabilities/run"
{"reference":"model:gpt-image-2.5-flare-std","input":{"model":"gpt-image-2.5-flare-std","prompt":"A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field","resolution":"2K","quality":"medium"}}
``````json title="POST /v1/capabilities/run (status)"
{"reference":"model:gpt-image-2.5-flare-std","operation":"status","task_id":"<task_id>"}
```## 토큰 과금과 고정 가격 비교|                      | `gpt-image-2.5-flare-std`                   | `gpt-image-2.5-flare` |
| -------------------- | ------------------------------------------- | --------------------- |
| 가격                   | 렌더링에 쓴 토큰에 아래 1M 토큰당 요금 적용                  | 크기 등급별 이미지당 고정 가격     |
| 작업 생성 시 보류           | 등급별 이미지당 추정 금액                              | 이미지 가격                |
| 작업 성공 시 청구           | 실제로 쓴 토큰으로 정산. `data.usage`는 보류 금액과 다를 수 있음 | 보류된 가격                |
| `quality`            | 허용, 기본값 `medium`                            | 거부                    |
| 필드, 해상도, 화면비, 참조 이미지 | 동일                                          | 동일                    |
| 실패한 작업               | 무료                                          | 무료                    |## 이 모델이 받지 않는 필드이미지 엔드포인트는 다른 이미지 모델이 사용하는 필드도 몇 가지 알고 있습니다. 이 모델에서 그런 필드를 보내면 무시하지 않고 거부하므로, 효과 없는 설정에 비용을 내는 일이 없습니다.- `seed`, `output_format`, `enhance_prompt` → `field "seed" is not supported by model gpt-image-2.5-flare-std`(보낸 필드 포함). 결과 형식은 선택할 수 없으며, 출력의 `mime_type`을 확인하세요.
- `n`, `moderation` 같은 그 밖의 알 수 없는 필드 → `unknown field: n`. `n`은 없습니다. 작업 하나에 이미지 한 장입니다.고정 가격 [`gpt-image-2.5-flare`](/image-api/gpt-image-2-5-flare)와 달리 이 모델은 `quality`를 받습니다.## 요청 예시```bash title="cURL"
curl --request POST \
  --url https://api.beatapi.io/v1/images/tasks \
  --header "Authorization: Bearer $BEATAPI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
  "aspect_ratio": "3:2",
  "resolution": "2K",
  "quality": "medium"
}'
``````python title="Python"
import os
import requests

response = requests.post(
    "https://api.beatapi.io/v1/images/tasks",
    headers={"Authorization": f"Bearer {os.environ['BEATAPI_API_KEY']}"},
    json={
      "model": "gpt-image-2.5-flare-std",
      "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
      "aspect_ratio": "3:2",
      "resolution": "2K",
      "quality": "medium"
    },
    timeout=60,
)
body = response.json()
if not response.ok:
    raise RuntimeError(f"{response.status_code} {body['error']['code']}: {body['error']['message']}")
task = body["data"]
print(task["id"], task["status"])
``````javascript title="JavaScript"
const response = await fetch('https://api.beatapi.io/v1/images/tasks', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.BEATAPI_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "model": "gpt-image-2.5-flare-std",
    "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
    "aspect_ratio": "3:2",
    "resolution": "2K",
    "quality": "medium"
  }),
});
const body = await response.json();
if (!response.ok) throw new Error(`${response.status} ${body.error.code}: ${body.error.message}`);
console.log(body.data.id, body.data.status);
```### 텍스트로 이미지 생성등급과 비율을 지정해 프롬프트로 만드는 2K 가로 이미지입니다.```bash
curl --request POST \
  --url https://api.beatapi.io/v1/images/tasks \
  --header "Authorization: Bearer $BEATAPI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
  "aspect_ratio": "3:2",
  "resolution": "2K",
  "quality": "medium"
}'
```### 낮은 품질로 초안 만들기`quality: "low"`와 1K로 보내는 첫 번째 요청으로, 출력 토큰을 적게 써서 비용이 낮습니다. 초안과 미리 보기에 적합합니다.```bash
curl --request POST \
  --url https://api.beatapi.io/v1/images/tasks \
  --header "Authorization: Bearer $BEATAPI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
  "aspect_ratio": "3:2",
  "resolution": "1K",
  "quality": "low"
}'
```### 이미지 한 장 편집제품은 유지하고 배경만 바꿉니다. `auto`는 정사각형으로 렌더링하므로 모양을 명시합니다.```bash
curl --request POST \
  --url https://api.beatapi.io/v1/images/tasks \
  --header "Authorization: Bearer $BEATAPI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "Keep the bottle exactly as it is. Replace the background with a sunlit kitchen counter and add a soft reflection under the bottle.",
  "images": [
    "https://cdn.beatapi.io/samples/smart-bottle.png"
  ],
  "aspect_ratio": "1:1",
  "resolution": "1K"
}'
```### 여러 이미지 합성프롬프트에서 각 참조 이미지를 순서로 지칭하세요.```bash
curl --request POST \
  --url https://api.beatapi.io/v1/images/tasks \
  --header "Authorization: Bearer $BEATAPI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "Place the bottle from the first image on a neon-lit stage like the one in the second image. Keep the bottle label readable.",
  "images": [
    "https://cdn.beatapi.io/samples/smart-bottle.png",
    "https://cdn.beatapi.io/samples/neon-singer.png"
  ],
  "aspect_ratio": "16:9",
  "resolution": "2K"
}'
```### 정확한 크기1536x1024 프레임입니다. `size`는 단독으로 사용하며 `resolution`도 `aspect_ratio`도 보내지 않습니다. 1K 추정 금액으로 보류됩니다.```bash
curl --request POST \
  --url https://api.beatapi.io/v1/images/tasks \
  --header "Authorization: Bearer $BEATAPI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A flat illustration of a lighthouse on a cliff at dawn, pastel colours, clean shapes",
  "size": "1536x1024"
}'
```### 투명 배경배경이 없는 스티커 스타일 피사체입니다. 결과는 알파 채널이 있는 PNG입니다.```bash
curl --request POST \
  --url https://api.beatapi.io/v1/images/tasks \
  --header "Authorization: Bearer $BEATAPI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A single cartoon red fox sitting, sticker style, thick white outline, isolated on a transparent background",
  "aspect_ratio": "1:1",
  "resolution": "1K",
  "background": "transparent"
}'
```## 응답### 작업 생성(201)작업 객체입니다. 작업이 성공할 때까지 `output`는 `null`입니다. '실행 중'으로 표시된 필드는 작업이 끝나면 사라집니다.```json
{
  "data": {
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "object": "task",
    "task_kind": "image",
    "capability_id": "gpt-image-2.5-flare-std",
    "capability_version": 1,
    "media_type": "image",
    "model": "gpt-image-2.5-flare-std",
    "status": "queued",
    "stage": "queued",
    "created_at": 1791993600,
    "updated_at": 1791993600,
    "completed_at": null,
    "poll_after_seconds": 5,
    "output": null,
    "usage": {
      "credits_reserved": 0.017394,
      "credits_settled": 0,
      "credits_refunded": 0,
      "credits_charged": 0.017394
    },
    "request_id": "req_5f0c2a9e4b7d4e31",
    "error_code": null,
    "error_message": null
  }
}
```| 필드                                     | 타입                | 설명                                                                            |
| -------------------------------------- | ----------------- | ----------------------------------------------------------------------------- |
| `data.id`                              | `string`          | 작업 ID: `task_` 뒤에 영문자와 숫자 32자가 붙습니다. 폴링과 웹훅 이벤트 매칭에 사용합니다.                    |
| `data.object`                          | `string`          | 항상 `task`.                                                                    |
| `data.task_kind`                       | `string`          | `image` 또는 `video`.                                                           |
| `data.capability_id`                   | `string`          | 보낸 모델 ID입니다.                                                                  |
| `data.capability_version`              | `integer`         | 모델의 계약 버전으로, 현재 `1`입니다.                                                       |
| `data.media_type`                      | `string`          | `image` 또는 `video`.                                                           |
| `data.model`                           | `string`          | 보낸 모델 ID입니다(`capability_id`와 같음).                                             |
| `data.status`                          | `string`          | `queued`, `processing`, `succeeded` 또는 `failed`. 마지막 두 개만 최종 상태입니다.           |
| `data.stage`                           | `string`          | `status`와 같은 값으로, 오래된 클라이언트를 위해 유지합니다.                                        |
| `data.created_at`                      | `integer`         | 작업 생성 시각(Unix 초)입니다.                                                          |
| `data.updated_at`                      | `integer`         | 마지막 변경 시각(Unix 초)입니다.                                                         |
| `data.completed_at`                    | `integer \| null` | 작업 완료 시각(Unix 초)입니다. 실행 중에는 `null`입니다.                                        |
| `data.poll_after_seconds`              | `integer`         | 실행 중: 다음 폴링까지 기다릴 시간입니다(이미지 5, 영상 8).                                         |
| `data.typical_seconds`                 | `object`          | 실행 중이며 최근 작업이 충분할 때: 최근 `window` 동안 `samples`개 작업의 `p50` 및 `p90` 완료 시간(초)입니다. |
| `data.output`                          | `object \| null`  | 결과입니다. `status`가 `succeeded`가 될 때까지 `null`입니다. 아래 출력 필드를 참고하세요.               |
| `data.usage.credits_reserved`          | `number`          | 작업 생성 시 잔액에서 보류한 USD 금액입니다.                                                   |
| `data.usage.credits_charged`           | `number`          | 이 작업의 비용(USD)입니다. 실패한 작업에서는 `0`입니다.                                           |
| `data.usage.credits_settled`           | `number`          | 최종 청구 금액(USD)입니다. 작업이 성공하면 설정되고, 그렇지 않으면 `0`입니다.                              |
| `data.usage.credits_refunded`          | `number`          | 잔액으로 환불된 금액(USD)입니다. 실패한 작업에서는 환불이 기록되면 보류 금액과 같아집니다.                         |
| `data.usage.billable_duration_seconds` | `integer`         | 영상만 해당: 가격 산정의 기준이 되는 초입니다. 모델이 길이를 보고하지 않으면 없습니다.                            |
| `data.request_id`                      | `string`          | 요청 ID입니다. 지원팀에 문의할 때 함께 알려 주세요.                                               |
| `data.error_code`                      | `string \| null`  | 실패 코드입니다. 작업이 실패하지 않았다면 `null`입니다.                                            |
| `data.error_message`                   | `string \| null`  | 무엇이 잘못되었고 무엇을 바꿔야 하는지 설명합니다. 작업이 실패하지 않았다면 `null`입니다.                         |### 완료된 작업`GET /v1/tasks/{task_id}`는 HTTP 200과 함께 `status: "succeeded"`, 그리고 `data.output`에 결과를 반환합니다.```json
{
  "data": {
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "object": "task",
    "task_kind": "image",
    "capability_id": "gpt-image-2.5-flare-std",
    "capability_version": 1,
    "media_type": "image",
    "model": "gpt-image-2.5-flare-std",
    "status": "succeeded",
    "stage": "succeeded",
    "created_at": 1791993600,
    "updated_at": 1791993690,
    "completed_at": 1791993690,
    "output": {
      "media": [
        {
          "type": "image",
          "url": "https://media.beatapi.io/outputs/task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ/0.png",
          "mime_type": "image/png"
        }
      ],
      "r2_url": "https://media.beatapi.io/outputs/task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ/0.png"
    },
    "usage": {
      "credits_reserved": 0.017394,
      "credits_settled": 0.017394,
      "credits_refunded": 0,
      "credits_charged": 0.017394
    },
    "request_id": "req_5f0c2a9e4b7d4e31",
    "error_code": null,
    "error_message": null
  }
}
```#### 출력 필드| 필드                         | 타입         | 설명                                                                                                             |
| -------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------- |
| `output.media`             | `object[]` | 생성된 파일입니다. 이 모델은 항목이 하나입니다.                                                                                    |
| `output.media[].type`      | `string`   | 항상 `image`.                                                                                                    |
| `output.media[].url`       | `string`   | 저장된 이미지의 HTTPS 링크입니다. 다운로드해 보관하세요. 보관 기간은 보장되지 않습니다.                                                           |
| `output.media[].mime_type` | `string`   | 저장된 파일의 형식입니다(예: `image/png`). 이 모델에는 `output_format` 필드가 없으므로 BeatAPI가 파일을 변환하지 않습니다. 형식을 가정하지 말고 이 값을 확인하세요. |
| `output.r2_url`            | `string`   | 오래된 클라이언트를 위해 첫 번째 미디어 URL을 한 번 더 담습니다. 대신 `media`를 사용하세요.                                                     |### 실패한 작업실패한 작업도 `GET /v1/tasks/{task_id}`에서는 HTTP 200입니다. 실패 정보는 본문에 있습니다. 보류 금액이 전액 환불되므로 과금되지 않습니다.```json
{
  "data": {
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "object": "task",
    "task_kind": "image",
    "capability_id": "gpt-image-2.5-flare-std",
    "capability_version": 1,
    "media_type": "image",
    "model": "gpt-image-2.5-flare-std",
    "status": "failed",
    "stage": "failed",
    "created_at": 1791993600,
    "updated_at": 1791993690,
    "completed_at": 1791993690,
    "output": null,
    "usage": {
      "credits_reserved": 0.017394,
      "credits_settled": 0,
      "credits_refunded": 0.017394,
      "credits_charged": 0
    },
    "retryable": true,
    "request_id": "req_5f0c2a9e4b7d4e31",
    "error_code": "processing_failed",
    "error_message": "The task failed during processing on our side. Retry; a failed task is refunded."
  }
}
```| 필드                   | 타입        | 설명                                                                                                                                                                                           |
| -------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data.error_code`    | `string`  | `bad_request`, `content_policy_violation`(요청 수정 필요) 또는 `processing_unavailable`, `processing_timeout`, `processing_failed`, `result_transfer_failed`(나중에 재시도) 중 하나입니다. [오류](/errors)를 참고하세요. |
| `data.error_message` | `string`  | 문제와 해결 방법을 설명하는 문장입니다.                                                                                                                                                                       |
| `data.retryable`     | `boolean` | 실패한 작업에만 있습니다. 같은 요청을 다시 보내면 성공할 수 있을 때 `true`입니다.                                                                                                                                           |
| `data.usage`         | `object`  | 환불이 기록되면(보통 작업이 실패하는 시점): `credits_charged`와 `credits_settled`는 `0`이고, `credits_refunded`는 `credits_reserved`와 같습니다.                                                                         |## 전체 예시작업을 만들고, 서버의 폴링 안내에 따라 기다린 뒤 결과 URL을 출력합니다. 환경 변수에 `BEATAPI_API_KEY`를 설정하고 `requests`를 설치하세요.```python
import os
import time
import uuid

import requests

API = "https://api.beatapi.io"
HEADERS = {"Authorization": f"Bearer {os.environ['BEATAPI_API_KEY']}"}


def create_task(body: dict) -> dict:
    # One Idempotency-Key per logical request: a retry with the same key cannot create a second task.
    headers = {**HEADERS, "Idempotency-Key": str(uuid.uuid4())}
    for attempt in range(3):
        response = requests.post(f"{API}/v1/images/tasks", headers=headers, json=body, timeout=60)
        if response.status_code in (429, 503) and attempt < 2:
            time.sleep(int(response.headers.get("Retry-After", 10)))
            continue
        break
    try:
        payload = response.json()
    except ValueError:  # an edge error page is not JSON
        response.raise_for_status()
        raise
    if not response.ok:
        error = payload["error"]
        raise RuntimeError(f"{response.status_code} {error['code']}: {error['message']} (request_id={error.get('request_id')})")
    return payload["data"]


def wait_for_task(task_id: str, timeout_seconds: int = 1800) -> dict:
    deadline = time.monotonic() + timeout_seconds
    while time.monotonic() < deadline:
        response = requests.get(f"{API}/v1/tasks/{task_id}", headers=HEADERS, timeout=30)
        if response.status_code == 429 or response.status_code >= 500:
            time.sleep(int(response.headers.get("Retry-After", 10)))
            continue
        response.raise_for_status()
        task = response.json()["data"]
        if task["status"] in ("succeeded", "failed"):
            return task
        time.sleep(task.get("poll_after_seconds", 5))
    raise TimeoutError(f"task {task_id} is still running; keep polling later")


task = create_task({
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
  "aspect_ratio": "3:2",
  "resolution": "2K",
  "quality": "medium"
})
print("created", task["id"])
task = wait_for_task(task["id"])
if task["status"] == "failed":
    raise SystemExit(f"{task['error_code']}: {task['error_message']}")
for item in task["output"]["media"]:
    print(item["url"])
```## 과금- 아래 표의 1M 토큰당 요금으로 텍스트 입력(프롬프트), 이미지 입력(`images`의 참조 이미지), 출력(이미지) 토큰을 과금합니다. 토큰 수는 모델이 계산하며, `quality`, 프레임, 참조 이미지에 따라 모두 달라집니다.
- 이미지당 가격은 참조 이미지 없이 각 등급의 정사각형 프레임을 `medium` 품질로 한 번 렌더링한 추정치입니다. `low`는 출력 토큰을 더 적게, 높은 값은 더 많이 씁니다.
- 작업이 생성되면 해당 등급의 추정 금액이 잔액에서, 키에 한도가 있다면 키 한도에서도 보류됩니다. 작업이 성공하면 실제로 쓴 토큰으로 정산되므로 최종 `data.usage`는 보류 금액과 다를 수 있습니다. 작업이 생기기 전에 거부된 요청은 비용이 들지 않습니다.
- 실패한 작업은 전액 환불됩니다.
- 고정 가격 [`gpt-image-2.5-flare`](/image-api/gpt-image-2-5-flare)는 같은 모델을 렌더링 사용량과 관계없이 이미지당 고정 가격으로 제공합니다.현재 정가이며 [가격](https://beatapi.io/pricing) 페이지와 같습니다. 별도 할인 계약이 있는 계정은 더 적게 지불하며, 실제 청구 금액은 항상 작업의 `data.usage`에서 확인할 수 있습니다.| 옵션                            | 정가(USD)    |
| ----------------------------- | ---------- |
| 이미지 1장 · 1K · medium 품질 기준 추정 | \$0.008561 |
| 이미지 1장 · 2K · medium 품질 기준 추정 | \$0.017394 |
| 이미지 1장 · 4K · medium 품질 기준 추정 | \$0.028919 |
| 입력 · 1M 토큰당                   | \$3.25     |
| 이미지 입력 · 1M 토큰당               | \$5.2      |
| 출력 · 1M 토큰당                   | \$19.5     |## 자주 발생하는 오류| 오류 또는 증상                                                                         | 원인                                                               | 해결 방법                                                              |
| -------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------ |
| 400 `"size" already fixes the output; do not send "resolution" with it`          | `size`를 `resolution` 또는 `aspect_ratio`와 함께 보냈습니다. 기본값이어도 해당됩니다.  | `size`만 보내거나, `size` 없이 `resolution`과 `aspect_ratio`를 보내세요.        |
| 400 `"size" width and height must be multiples of 16`                            | `1000x1000`, `1920x1080` 같은 크기(1080이 16의 배수가 아님).                | 두 변을 16의 배수로 맞추세요(예: `1920x1088`).                                 |
| 400 `"size" must have between 655,360 and 8,294,400 pixels; 512x512 has 262,144` | 프레임이 너무 작거나 큽니다. `4096x4096`는 그 전에 3840 px 변 길이 제한에서 실패합니다.      | 변은 3840 px 이하로, 전체 픽셀 수는 655,360\~8,294,400으로 유지하세요.               |
| 400 `"resolution" must be one of: [1K 2K 4K]`                                    | 소문자 `2k`, `8K` 또는 `resolution`에 `2048x2048` 같은 픽셀 크기를 넣었습니다.     | `1K`, `2K`, `4K` 중 하나를 보내거나, 픽셀 크기는 `size` 필드를 사용하세요.              |
| 400 `"quality" must be one of: [low medium high xhigh max]`                      | 목록에 없는 값이거나 `High`처럼 대문자가 섞인 값입니다.                               | 목록에 있는 값 중 하나를 보내거나, 필드를 생략해 `medium`을 사용하세요.                      |
| 400 `field "seed" is not supported by model gpt-image-2.5-flare-std`             | 다른 이미지 모델의 필드(`seed`, `output_format`, `enhance_prompt`)를 보냈습니다. | 해당 필드를 삭제하세요.                                                      |
| 400 `unknown field: n`                                                           | 작업 하나에서 이미지 여러 장을 요청했습니다.                                        | `n`을 삭제하고 이미지마다 작업을 하나씩 만드세요.                                      |
| 400 `"images[0]" must be a public HTTPS URL`                                     | `http://` 링크, `data:` URI 또는 로컬 경로를 보냈습니다.                       | 파일을 HTTPS로 호스팅하거나 `POST /v1/files`로 업로드하고 `data.url`을 사용하세요.       |
| 400 `"images[1]" is not a PNG, JPEG or WebP image: the URL returned text/html`   | 링크가 파일 대신 웹 페이지, 로그인 페이지 또는 만료된 서명 URL을 엽니다.                     | 이미지 파일로 직접 연결되는 링크를 사용하세요.                                         |
| 400 `"images[0]" could not be downloaded: the URL returned HTTP 403`             | 호스트가 서버의 다운로드를 차단합니다(핫링크 방지 또는 비공개 버킷).                          | 파일을 공개하거나 `POST /v1/files`로 업로드하세요.                                |
| 편집한 이미지가 정사각형으로 나옵니다                                                             | `aspect_ratio`를 생략했거나 `auto`로 설정해 정사각형 프레임으로 렌더링되었습니다.           | 원하는 비율을 지정하거나 `size`를 보내세요.                                        |
| 작업이 `content_policy_violation`과 함께 `failed`                                      | 프롬프트, 참조 이미지 또는 생성된 이미지가 콘텐츠 검수에서 거부되었습니다.                       | 프롬프트나 이미지를 바꾸세요. 그대로 재시도하면 다시 실패하며, 과금되지 않습니다.                     |
| 작업이 `processing_timeout`과 함께 `failed`                                            | 처리 제한 시간 안에 이미지가 완성되지 않았습니다.                                     | 재시도하세요. 실패한 작업은 환불되었습니다.                                           |
| 404 `POST /v1/images/generations`                                                | 이 모델은 비동기 작업으로만 제공되며 동기식 엔드포인트는 사용할 수 없습니다.                      | `POST /v1/images/tasks`로 작업을 만들고 `GET /v1/tasks/{task_id}`를 폴링하세요. |
| 청구 금액이 이미지당 가격과 다릅니다                                                             | 청구 금액은 렌더링에 쓴 토큰으로 정산되며, 이미지당 가격은 추정치입니다.                        | 완료된 작업의 `data.usage`를 확인하세요. 출력 토큰을 줄이려면 `quality: "low"`를 보내세요.   |## HTTP 오류 요약작업이 생성되기 전의 오류는 2xx가 아닌 응답으로 오며 과금되지 않습니다. `error.code` 또는 `error.retryable`로 분기하세요. `message`에 문제가 표시됩니다. 전체 목록과 재시도 정책은 [오류](/errors)에 있습니다.```json
{
  "error": {
    "code": "bad_request",
    "message": "\"prompt\" is required",
    "retryable": false,
    "request_id": "req_5f0c2a9e4b7d4e31"
  }
}
```| HTTP 상태 | `error.code`                                                                                  | 조치                                                                     |
| ------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| 400     | `bad_request`, `content_policy_violation`                                                     | 요청을 수정하세요. 메시지에 해당 필드가 표시됩니다. 그대로 재시도하지 마세요.                           |
| 401     | `missing_api_key`, `invalid_api_key`(오래된 클라이언트에서는 `unauthorized`가 보일 수 있음)                    | 유효한 키를 `Authorization: Bearer <key>`로 보내세요.                            |
| 402     | `insufficient_credits`                                                                        | 충전하거나 키 한도를 올린 뒤 다시 보내세요.                                              |
| 403     | `forbidden`                                                                                   | 이 키나 계정으로는 이 모델을 사용할 수 없습니다(예: 무료 크레딧은 일부 모델만 지원). 그대로 재시도하지 마세요.      |
| 404     | `not_found`                                                                                   | `GET /v1/tasks/{task_id}`에서: 이 키의 계정에 해당 작업이 없습니다. ID를 확인하세요.          |
| 409     | `idempotency_conflict`                                                                        | 새 `Idempotency-Key`를 사용하거나, 이 키를 쓴 첫 요청이 끝날 때까지 기다리세요.                 |
| 429     | `rate_limit_exceeded`                                                                         | `Retry-After`에 표시된 시간(또는 `error.retry_after_seconds`초)만큼 기다린 뒤 재시도하세요. |
| 500     | `internal_error`                                                                              | 백오프를 적용해 재시도하고, 계속되면 `request_id`와 함께 지원팀에 문의하세요.                      |
| 503     | `processing_unavailable`, `processing_timeout`, `processing_failed`, `result_transfer_failed` | 과금되지 않았습니다. 지수 백오프를 적용해 재시도하세요.                                        |

Reference: https://docs.beatapi.io/api-reference/image-api/gpt-image-2-5-flare-std

## Authentication

- `Authorization` header (bearer token, required) — API 키를 `Authorization: Bearer <BEATAPI_API_KEY>`로 보내세요.

## Servers

- `https://api.beatapi.io` (Direct, default)
- `https://api.beatapi.io` (API)

## Request

### Headers

- `Idempotency-Key` (string, optional) — 본문은 `Content-Type: application/json`과 함께 JSON으로 보냅니다. `Idempotency-Key`는 선택 사항입니다. 논리적 요청마다 고유한 값(최대 255자)을 보내고, 완전히 같은 본문을 재시도할 때만 다시 사용하세요. 24시간 안에 같은 키와 본문으로 재시도하면 첫 응답을 `Idempotent-Replayed: true`와 함께 다시 반환하고, 같은 키에 다른 본문을 보내면 `409 idempotency_conflict`를 반환합니다. 2xx 이외의 응답은 저장되지 않으므로 400이나 402 이후의 재시도는 다시 실행됩니다.

### Body (application/json)

This endpoint expects a GptImage25FlareStdRequest.

- `model` (enum, required) — 실행할 모델입니다. **값**: `gpt-image-2.5-flare-std` **값이 잘못된 경우** - 누락: `"model" is required` - 알 수 없는 모델 ID: `"model" gpt-image-9 is not catalogued` - 이 엔드포인트로 영상 모델을 보낸 경우: `"model" seedance-2.5 is served by POST /v1/videos/tasks, not this endpoint`
  - Allowed values: `gpt-image-2.5-flare-std`
- `prompt` (string, required) — 그릴 내용 또는 참조 이미지에서 바꿀 내용입니다. 피사체, 스타일, 조명, 구도, 이미지에 꼭 들어가야 하는 텍스트를 평이한 말로 적는 것이 가장 좋습니다. **길이**: 1–5000자 - 길이는 문자 수로 계산합니다(한중일 문자 하나는 1자). - `images`를 보낼 때는 각 이미지의 역할을 적으세요. 예: "첫 번째 이미지는 제품, 두 번째 이미지는 배경으로 사용". **값이 잘못된 경우** - 누락: `"prompt" is required` - 비어 있거나 한도보다 긴 경우: `"prompt" has an unsupported length` - 문자열이 아닌 경우: `"prompt" must be a string`
- `aspect_ratio` (enum, optional, default: auto) — 가로:세로로 나타낸 이미지 모양입니다. `resolution`과 함께 보내거나, 둘 다 생략하고 `size`를 보내세요. **허용 값**: `auto`, `1:1`, `3:2`, `2:3`, `4:3`, `3:4`, `5:4`, `4:5`, `16:9`, `9:16`, `2:1`, `1:2`, `3:1`, `1:3`, `21:9`, `9:21` **기본값**: `auto` - 기본값이 `auto`이므로 이 필드를 생략한 요청도 정사각형으로 렌더링됩니다. - 파노라마 비율 `2:1`, `1:2`, `3:1`, `1:3`, `21:9`, `9:21`도 허용됩니다. 가장 넓거나 긴 프레임은 3:1입니다. - `size`와 함께 사용할 수 없습니다. **참고**: `auto`는 “참조를 따름”이 아닙니다. `images` 유무와 관계없이 선택한 `resolution`에서 정사각형 프레임을 요청합니다. 편집 결과를 다른 모양으로 바꾸려면 비율을 지정하거나 `size`를 보내세요. **값이 잘못된 경우** - 목록에 없는 값: `"aspect_ratio" must be one of: [auto 1:1 3:2 2:3 4:3 3:4 5:4 4:5 16:9 9:16 2:1 1:2 3:1 1:3 21:9 9:21]` - `size`와 함께 보낸 경우: `"size" already fixes the output; do not send "aspect_ratio" with it`
  - Allowed values: `auto`, `1:1`, `3:2`, `2:3`, `4:3`, `3:4`, `5:4`, `4:5`, `16:9`, `9:16`, `2:1`, `1:2`, `3:1`, `1:3`, `21:9`, `9:21`
- `background` (enum, optional, default: auto) — 이미지에 채워진 배경을 둘지, 투명 배경으로 할지 정합니다. **허용 값**: `auto`, `opaque`, `transparent` **기본값**: `auto` - `auto`(기본값)는 모델에 맡깁니다. `opaque`는 채워진 배경을 요청합니다. - `transparent`는 배경에 색이 없는 이미지를 요청합니다. 결과는 알파 채널이 있는 PNG이며, `output.media[].mime_type`을 확인하세요. **값이 잘못된 경우** - 목록에 없는 값: `"background" must be one of: [auto opaque transparent]`
  - Allowed values: `auto`, `opaque`, `transparent`
- `images` (list of string, optional) — 편집하거나 합성할 참조 이미지입니다. 이 필드를 보내면 요청이 텍스트로 이미지 생성에서 이미지 편집으로 바뀝니다. **항목 수**: 1–16 각 항목은 공개 `https://` URL입니다. 로컬 파일은 `POST /v1/files`로 [먼저 업로드](/quick-guide#upload-an-input-file)한 뒤 반환된 `data.url`을 전달하세요. - 각 링크는 공개 HTTPS로 이미지 파일 자체(PNG, JPEG, WebP, 최대 50 MB)를 반환해야 합니다. 게이트웨이는 작업을 만들기 전에 모든 링크의 처음 몇 바이트를 내려받아, 파일 이름이나 `Content-Type`이 아니라 그 바이트로 형식을 판별합니다. - 웹 페이지, 로그인이 필요한 페이지, 만료된 서명 URL, 핫링크 방지 호스트로 연결되는 링크는 이미지를 반환하지 않으므로 거부됩니다. - 오류 메시지의 위치는 0부터 시작합니다. `images[0]`이 첫 번째 링크입니다. **값이 잘못된 경우** - 최대 개수를 넘은 경우: `"images" accepts at most 16 items` - 빈 배열: `"images" requires at least 1 item` - https:// 링크가 아닌 경우: `"images[0]" must be a public HTTPS URL` - 비공개 또는 안전하지 않은 주소: `"images[0]" must be a publicly reachable HTTPS image URL` - 호스트가 4xx 오류로 응답한 경우: `"images[0]" could not be downloaded: the URL returned HTTP 404` - 링크가 PNG, JPEG, WebP 이외의 형식을 반환한 경우: `"images[0]" is not a PNG, JPEG or WebP image: the URL returned text/html` - 50 MB보다 큰 경우: `"images[2]" is 63.4 MB; images must be 50 MB or smaller` **예시** ```json "images": [ "https://cdn.beatapi.io/samples/smart-bottle.png", "https://cdn.beatapi.io/samples/neon-singer.png" ] ```
- `quality` (enum, optional, default: medium) — 모델이 이미지에 들이는 작업량입니다. 렌더링에 쓰이는 출력 토큰 수, 즉 가격을 정합니다. 값이 낮을수록 저렴하고 높을수록 비쌉니다. **허용 값**: `low`, `medium`, `high`, `xhigh`, `max` **기본값**: `medium` - 생략하면 `medium`이며, 이 페이지의 이미지당 가격은 이 품질을 기준으로 추정했습니다. - 고정 가격 [`gpt-image-2.5-flare`](/image-api/gpt-image-2-5-flare)는 이 필드를 받지 않으며 거부합니다. **값이 잘못된 경우** - 목록에 없는 값: `"quality" must be one of: [low medium high xhigh max]` **예시** ```json "quality": "low" ```
  - Allowed values: `low`, `medium`, `high`, `xhigh`, `max`
- `resolution` (enum, optional, default: 1K) — 이미지 크기 등급입니다. 등급이 높을수록 이미지가 커지고 비용도 늘어납니다. 정확한 픽셀 크기는 `aspect_ratio`에 따라 달라지며 모델이 정합니다. **허용 값**: `1K`, `2K`, `4K` **기본값**: `1K` - 대문자 K를 사용하세요. `2k`는 거부됩니다. - 이 페이지는 등급별 정확한 픽셀 크기를 보장하지 않습니다. 정확한 프레임이 필요하면 `size`를 보내세요. - 자체 크기를 지정하는 `size`와 함께 사용할 수 없습니다. **값이 잘못된 경우** - 목록에 없는 값: `"resolution" must be one of: [1K 2K 4K]` - `size`와 함께 보낸 경우: `"size" already fixes the output; do not send "resolution" with it`
  - Allowed values: `1K`, `2K`, `4K`
- `size` (string, optional) — 정확한 출력 프레임을 픽셀 단위의 `WIDTHxHEIGHT`로 지정합니다(예: `1536x1024`). `resolution`과 `aspect_ratio`를 대신합니다. - 가로와 세로 모두 16의 배수이면서 16~3840 px여야 합니다. - 전체 픽셀 수는 655,360~8,294,400이어야 하며, 긴 변은 짧은 변의 3배를 넘을 수 없습니다. - 구분자는 `x`, `X`, `×` 중 하나를 사용할 수 있으며, 앞뒤 공백은 무시됩니다. - 픽셀 수에 따라 출력 토큰과 가격이 달라집니다. 작업이 정산되기 전까지는 픽셀 수가 속한 등급의 추정 금액이 보류됩니다. 2,097,152픽셀 이하는 1K, 5,898,240픽셀 이하는 2K, 그보다 크면 4K입니다. - 기본값이라도 `resolution`이나 `aspect_ratio`를 함께 보내지 마세요. **참고**: `size`는 보낸 그대로 검사하지만, 제공되는 이미지가 정확히 그 픽셀 크기라고 보장하지는 않습니다. 파이프라인이 정확한 크기에 의존한다면 저장된 파일을 확인하세요. **값이 잘못된 경우** - 문자열이 아닌 경우: `"size" must be a string` - WIDTHxHEIGHT 형식이 아닌 경우(숫자만 있음, `auto`, 쉼표): `"size" must be WIDTHxHEIGHT in pixels, for example 1536x1024` - 한 변이 16의 배수가 아닌 경우: `"size" width and height must be multiples of 16` - 한 변이 16 미만 또는 3840 초과인 경우: `"size" edges must be between 16 and 3840 pixels` - 픽셀 수가 너무 적거나 많은 경우: `"size" must have between 655,360 and 8,294,400 pixels; 512x512 has 262,144` - 3:1보다 넓거나 긴 경우: `"size" must not be wider or taller than 3:1` - `resolution`과 함께 보낸 경우: `"size" already fixes the output; do not send "resolution" with it` - `aspect_ratio`와 함께 보낸 경우: `"size" already fixes the output; do not send "aspect_ratio" with it` **예시** ```json "size": "1536x1024" ```

## Response

### 201

작업 객체입니다. 작업이 성공할 때까지 `output`는 `null`입니다. '실행 중'으로 표시된 필드는 작업이 끝나면 사라집니다.

- `map from string to any`

## Errors

### 400 Bad Request Error

`bad_request`, `content_policy_violation` 요청을 수정하세요. 메시지에 해당 필드가 표시됩니다. 그대로 재시도하지 마세요.

- `map from string to any`

### 401 Unauthorized Error

`missing_api_key`, `invalid_api_key`(오래된 클라이언트에서는 `unauthorized`가 보일 수 있음) 유효한 키를 `Authorization: Bearer <key>`로 보내세요.

- `map from string to any`

### 402 Payment Required Error

`insufficient_credits` 충전하거나 키 한도를 올린 뒤 다시 보내세요.

- `map from string to any`

### 403 Forbidden Error

`forbidden` 이 키나 계정으로는 이 모델을 사용할 수 없습니다(예: 무료 크레딧은 일부 모델만 지원). 그대로 재시도하지 마세요.

- `map from string to any`

### 409 Conflict Error

`idempotency_conflict` 새 `Idempotency-Key`를 사용하거나, 이 키를 쓴 첫 요청이 끝날 때까지 기다리세요.

- `map from string to any`

### 429 Too Many Requests Error

`rate_limit_exceeded` `Retry-After`에 표시된 시간(또는 `error.retry_after_seconds`초)만큼 기다린 뒤 재시도하세요.

- `map from string to any`

### 500 Internal Server Error

`internal_error` 백오프를 적용해 재시도하고, 계속되면 `request_id`와 함께 지원팀에 문의하세요.

- `map from string to any`

### 503 Service Unavailable Error

`processing_unavailable`, `processing_timeout`, `processing_failed`, `result_transfer_failed` 과금되지 않았습니다. 지수 백오프를 적용해 재시도하세요.

- `map from string to any`

## Examples

### 텍스트로 이미지 생성

**Request**

```json
{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
  "aspect_ratio": "3:2",
  "quality": "medium",
  "resolution": "2K"
}
```

**Response**

```json
{
  "data": {
    "capability_id": "gpt-image-2.5-flare-std",
    "capability_version": 1,
    "completed_at": null,
    "created_at": 1791993600,
    "error_code": null,
    "error_message": null,
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "media_type": "image",
    "model": "gpt-image-2.5-flare-std",
    "object": "task",
    "output": null,
    "poll_after_seconds": 5,
    "request_id": "req_5f0c2a9e4b7d4e31",
    "stage": "queued",
    "status": "queued",
    "task_kind": "image",
    "updated_at": 1791993600,
    "usage": {
      "credits_charged": 0.017394,
      "credits_refunded": 0,
      "credits_reserved": 0.017394,
      "credits_settled": 0
    }
  }
}
```

**SDK Code**

```python 텍스트로 이미지 생성
import requests

url = "https://api.beatapi.io/v1/images/tasks"

payload = {
    "model": "gpt-image-2.5-flare-std",
    "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
    "aspect_ratio": "3:2",
    "quality": "medium",
    "resolution": "2K"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript 텍스트로 이미지 생성
const url = 'https://api.beatapi.io/v1/images/tasks';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model":"gpt-image-2.5-flare-std","prompt":"A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field","aspect_ratio":"3:2","quality":"medium","resolution":"2K"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 텍스트로 이미지 생성
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beatapi.io/v1/images/tasks"

	payload := strings.NewReader("{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field\",\n  \"aspect_ratio\": \"3:2\",\n  \"quality\": \"medium\",\n  \"resolution\": \"2K\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 텍스트로 이미지 생성
require 'uri'
require 'net/http'

url = URI("https://api.beatapi.io/v1/images/tasks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field\",\n  \"aspect_ratio\": \"3:2\",\n  \"quality\": \"medium\",\n  \"resolution\": \"2K\"\n}"

response = http.request(request)
puts response.read_body
```

```java 텍스트로 이미지 생성
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.beatapi.io/v1/images/tasks")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field\",\n  \"aspect_ratio\": \"3:2\",\n  \"quality\": \"medium\",\n  \"resolution\": \"2K\"\n}")
  .asString();
```

```php 텍스트로 이미지 생성
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.beatapi.io/v1/images/tasks', [
  'body' => '{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
  "aspect_ratio": "3:2",
  "quality": "medium",
  "resolution": "2K"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp 텍스트로 이미지 생성
using RestSharp;

var client = new RestClient("https://api.beatapi.io/v1/images/tasks");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field\",\n  \"aspect_ratio\": \"3:2\",\n  \"quality\": \"medium\",\n  \"resolution\": \"2K\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 텍스트로 이미지 생성
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
  "aspect_ratio": "3:2",
  "quality": "medium",
  "resolution": "2K"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beatapi.io/v1/images/tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### 낮은 품질로 초안 만들기

**Request**

```json
{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
  "aspect_ratio": "3:2",
  "quality": "low",
  "resolution": "1K"
}
```

**Response**

```json
{
  "data": {
    "capability_id": "gpt-image-2.5-flare-std",
    "capability_version": 1,
    "completed_at": null,
    "created_at": 1791993600,
    "error_code": null,
    "error_message": null,
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "media_type": "image",
    "model": "gpt-image-2.5-flare-std",
    "object": "task",
    "output": null,
    "poll_after_seconds": 5,
    "request_id": "req_5f0c2a9e4b7d4e31",
    "stage": "queued",
    "status": "queued",
    "task_kind": "image",
    "updated_at": 1791993600
  }
}
```

**SDK Code**

```python 낮은 품질로 초안 만들기
import requests

url = "https://api.beatapi.io/v1/images/tasks"

payload = {
    "model": "gpt-image-2.5-flare-std",
    "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
    "aspect_ratio": "3:2",
    "quality": "low",
    "resolution": "1K"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript 낮은 품질로 초안 만들기
const url = 'https://api.beatapi.io/v1/images/tasks';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model":"gpt-image-2.5-flare-std","prompt":"A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field","aspect_ratio":"3:2","quality":"low","resolution":"1K"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 낮은 품질로 초안 만들기
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beatapi.io/v1/images/tasks"

	payload := strings.NewReader("{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field\",\n  \"aspect_ratio\": \"3:2\",\n  \"quality\": \"low\",\n  \"resolution\": \"1K\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 낮은 품질로 초안 만들기
require 'uri'
require 'net/http'

url = URI("https://api.beatapi.io/v1/images/tasks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field\",\n  \"aspect_ratio\": \"3:2\",\n  \"quality\": \"low\",\n  \"resolution\": \"1K\"\n}"

response = http.request(request)
puts response.read_body
```

```java 낮은 품질로 초안 만들기
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.beatapi.io/v1/images/tasks")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field\",\n  \"aspect_ratio\": \"3:2\",\n  \"quality\": \"low\",\n  \"resolution\": \"1K\"\n}")
  .asString();
```

```php 낮은 품질로 초안 만들기
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.beatapi.io/v1/images/tasks', [
  'body' => '{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
  "aspect_ratio": "3:2",
  "quality": "low",
  "resolution": "1K"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp 낮은 품질로 초안 만들기
using RestSharp;

var client = new RestClient("https://api.beatapi.io/v1/images/tasks");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field\",\n  \"aspect_ratio\": \"3:2\",\n  \"quality\": \"low\",\n  \"resolution\": \"1K\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 낮은 품질로 초안 만들기
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A minimalist product photo of a glass water bottle on wet black stone, soft rim light, shallow depth of field",
  "aspect_ratio": "3:2",
  "quality": "low",
  "resolution": "1K"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beatapi.io/v1/images/tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### 이미지 한 장 편집

**Request**

```json
{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "Keep the bottle exactly as it is. Replace the background with a sunlit kitchen counter and add a soft reflection under the bottle.",
  "aspect_ratio": "1:1",
  "images": [
    "https://cdn.beatapi.io/samples/smart-bottle.png"
  ],
  "resolution": "1K"
}
```

**Response**

```json
{
  "data": {
    "capability_id": "gpt-image-2.5-flare-std",
    "capability_version": 1,
    "completed_at": null,
    "created_at": 1791993600,
    "error_code": null,
    "error_message": null,
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "media_type": "image",
    "model": "gpt-image-2.5-flare-std",
    "object": "task",
    "output": null,
    "poll_after_seconds": 5,
    "request_id": "req_5f0c2a9e4b7d4e31",
    "stage": "queued",
    "status": "queued",
    "task_kind": "image",
    "updated_at": 1791993600
  }
}
```

**SDK Code**

```python 이미지 한 장 편집
import requests

url = "https://api.beatapi.io/v1/images/tasks"

payload = {
    "model": "gpt-image-2.5-flare-std",
    "prompt": "Keep the bottle exactly as it is. Replace the background with a sunlit kitchen counter and add a soft reflection under the bottle.",
    "aspect_ratio": "1:1",
    "images": ["https://cdn.beatapi.io/samples/smart-bottle.png"],
    "resolution": "1K"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript 이미지 한 장 편집
const url = 'https://api.beatapi.io/v1/images/tasks';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model":"gpt-image-2.5-flare-std","prompt":"Keep the bottle exactly as it is. Replace the background with a sunlit kitchen counter and add a soft reflection under the bottle.","aspect_ratio":"1:1","images":["https://cdn.beatapi.io/samples/smart-bottle.png"],"resolution":"1K"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 이미지 한 장 편집
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beatapi.io/v1/images/tasks"

	payload := strings.NewReader("{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"Keep the bottle exactly as it is. Replace the background with a sunlit kitchen counter and add a soft reflection under the bottle.\",\n  \"aspect_ratio\": \"1:1\",\n  \"images\": [\n    \"https://cdn.beatapi.io/samples/smart-bottle.png\"\n  ],\n  \"resolution\": \"1K\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 이미지 한 장 편집
require 'uri'
require 'net/http'

url = URI("https://api.beatapi.io/v1/images/tasks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"Keep the bottle exactly as it is. Replace the background with a sunlit kitchen counter and add a soft reflection under the bottle.\",\n  \"aspect_ratio\": \"1:1\",\n  \"images\": [\n    \"https://cdn.beatapi.io/samples/smart-bottle.png\"\n  ],\n  \"resolution\": \"1K\"\n}"

response = http.request(request)
puts response.read_body
```

```java 이미지 한 장 편집
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.beatapi.io/v1/images/tasks")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"Keep the bottle exactly as it is. Replace the background with a sunlit kitchen counter and add a soft reflection under the bottle.\",\n  \"aspect_ratio\": \"1:1\",\n  \"images\": [\n    \"https://cdn.beatapi.io/samples/smart-bottle.png\"\n  ],\n  \"resolution\": \"1K\"\n}")
  .asString();
```

```php 이미지 한 장 편집
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.beatapi.io/v1/images/tasks', [
  'body' => '{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "Keep the bottle exactly as it is. Replace the background with a sunlit kitchen counter and add a soft reflection under the bottle.",
  "aspect_ratio": "1:1",
  "images": [
    "https://cdn.beatapi.io/samples/smart-bottle.png"
  ],
  "resolution": "1K"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp 이미지 한 장 편집
using RestSharp;

var client = new RestClient("https://api.beatapi.io/v1/images/tasks");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"Keep the bottle exactly as it is. Replace the background with a sunlit kitchen counter and add a soft reflection under the bottle.\",\n  \"aspect_ratio\": \"1:1\",\n  \"images\": [\n    \"https://cdn.beatapi.io/samples/smart-bottle.png\"\n  ],\n  \"resolution\": \"1K\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 이미지 한 장 편집
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "model": "gpt-image-2.5-flare-std",
  "prompt": "Keep the bottle exactly as it is. Replace the background with a sunlit kitchen counter and add a soft reflection under the bottle.",
  "aspect_ratio": "1:1",
  "images": ["https://cdn.beatapi.io/samples/smart-bottle.png"],
  "resolution": "1K"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beatapi.io/v1/images/tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### 여러 이미지 합성

**Request**

```json
{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "Place the bottle from the first image on a neon-lit stage like the one in the second image. Keep the bottle label readable.",
  "aspect_ratio": "16:9",
  "images": [
    "https://cdn.beatapi.io/samples/smart-bottle.png",
    "https://cdn.beatapi.io/samples/neon-singer.png"
  ],
  "resolution": "2K"
}
```

**Response**

```json
{
  "data": {
    "capability_id": "gpt-image-2.5-flare-std",
    "capability_version": 1,
    "completed_at": null,
    "created_at": 1791993600,
    "error_code": null,
    "error_message": null,
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "media_type": "image",
    "model": "gpt-image-2.5-flare-std",
    "object": "task",
    "output": null,
    "poll_after_seconds": 5,
    "request_id": "req_5f0c2a9e4b7d4e31",
    "stage": "queued",
    "status": "queued",
    "task_kind": "image",
    "updated_at": 1791993600
  }
}
```

**SDK Code**

```python 여러 이미지 합성
import requests

url = "https://api.beatapi.io/v1/images/tasks"

payload = {
    "model": "gpt-image-2.5-flare-std",
    "prompt": "Place the bottle from the first image on a neon-lit stage like the one in the second image. Keep the bottle label readable.",
    "aspect_ratio": "16:9",
    "images": ["https://cdn.beatapi.io/samples/smart-bottle.png", "https://cdn.beatapi.io/samples/neon-singer.png"],
    "resolution": "2K"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript 여러 이미지 합성
const url = 'https://api.beatapi.io/v1/images/tasks';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model":"gpt-image-2.5-flare-std","prompt":"Place the bottle from the first image on a neon-lit stage like the one in the second image. Keep the bottle label readable.","aspect_ratio":"16:9","images":["https://cdn.beatapi.io/samples/smart-bottle.png","https://cdn.beatapi.io/samples/neon-singer.png"],"resolution":"2K"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 여러 이미지 합성
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beatapi.io/v1/images/tasks"

	payload := strings.NewReader("{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"Place the bottle from the first image on a neon-lit stage like the one in the second image. Keep the bottle label readable.\",\n  \"aspect_ratio\": \"16:9\",\n  \"images\": [\n    \"https://cdn.beatapi.io/samples/smart-bottle.png\",\n    \"https://cdn.beatapi.io/samples/neon-singer.png\"\n  ],\n  \"resolution\": \"2K\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 여러 이미지 합성
require 'uri'
require 'net/http'

url = URI("https://api.beatapi.io/v1/images/tasks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"Place the bottle from the first image on a neon-lit stage like the one in the second image. Keep the bottle label readable.\",\n  \"aspect_ratio\": \"16:9\",\n  \"images\": [\n    \"https://cdn.beatapi.io/samples/smart-bottle.png\",\n    \"https://cdn.beatapi.io/samples/neon-singer.png\"\n  ],\n  \"resolution\": \"2K\"\n}"

response = http.request(request)
puts response.read_body
```

```java 여러 이미지 합성
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.beatapi.io/v1/images/tasks")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"Place the bottle from the first image on a neon-lit stage like the one in the second image. Keep the bottle label readable.\",\n  \"aspect_ratio\": \"16:9\",\n  \"images\": [\n    \"https://cdn.beatapi.io/samples/smart-bottle.png\",\n    \"https://cdn.beatapi.io/samples/neon-singer.png\"\n  ],\n  \"resolution\": \"2K\"\n}")
  .asString();
```

```php 여러 이미지 합성
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.beatapi.io/v1/images/tasks', [
  'body' => '{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "Place the bottle from the first image on a neon-lit stage like the one in the second image. Keep the bottle label readable.",
  "aspect_ratio": "16:9",
  "images": [
    "https://cdn.beatapi.io/samples/smart-bottle.png",
    "https://cdn.beatapi.io/samples/neon-singer.png"
  ],
  "resolution": "2K"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp 여러 이미지 합성
using RestSharp;

var client = new RestClient("https://api.beatapi.io/v1/images/tasks");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"Place the bottle from the first image on a neon-lit stage like the one in the second image. Keep the bottle label readable.\",\n  \"aspect_ratio\": \"16:9\",\n  \"images\": [\n    \"https://cdn.beatapi.io/samples/smart-bottle.png\",\n    \"https://cdn.beatapi.io/samples/neon-singer.png\"\n  ],\n  \"resolution\": \"2K\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 여러 이미지 합성
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "model": "gpt-image-2.5-flare-std",
  "prompt": "Place the bottle from the first image on a neon-lit stage like the one in the second image. Keep the bottle label readable.",
  "aspect_ratio": "16:9",
  "images": ["https://cdn.beatapi.io/samples/smart-bottle.png", "https://cdn.beatapi.io/samples/neon-singer.png"],
  "resolution": "2K"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beatapi.io/v1/images/tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### 정확한 크기

**Request**

```json
{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A flat illustration of a lighthouse on a cliff at dawn, pastel colours, clean shapes",
  "size": "1536x1024"
}
```

**Response**

```json
{
  "data": {
    "capability_id": "gpt-image-2.5-flare-std",
    "capability_version": 1,
    "completed_at": null,
    "created_at": 1791993600,
    "error_code": null,
    "error_message": null,
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "media_type": "image",
    "model": "gpt-image-2.5-flare-std",
    "object": "task",
    "output": null,
    "poll_after_seconds": 5,
    "request_id": "req_5f0c2a9e4b7d4e31",
    "stage": "queued",
    "status": "queued",
    "task_kind": "image",
    "updated_at": 1791993600
  }
}
```

**SDK Code**

```python 정확한 크기
import requests

url = "https://api.beatapi.io/v1/images/tasks"

payload = {
    "model": "gpt-image-2.5-flare-std",
    "prompt": "A flat illustration of a lighthouse on a cliff at dawn, pastel colours, clean shapes",
    "size": "1536x1024"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript 정확한 크기
const url = 'https://api.beatapi.io/v1/images/tasks';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model":"gpt-image-2.5-flare-std","prompt":"A flat illustration of a lighthouse on a cliff at dawn, pastel colours, clean shapes","size":"1536x1024"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 정확한 크기
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beatapi.io/v1/images/tasks"

	payload := strings.NewReader("{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A flat illustration of a lighthouse on a cliff at dawn, pastel colours, clean shapes\",\n  \"size\": \"1536x1024\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 정확한 크기
require 'uri'
require 'net/http'

url = URI("https://api.beatapi.io/v1/images/tasks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A flat illustration of a lighthouse on a cliff at dawn, pastel colours, clean shapes\",\n  \"size\": \"1536x1024\"\n}"

response = http.request(request)
puts response.read_body
```

```java 정확한 크기
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.beatapi.io/v1/images/tasks")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A flat illustration of a lighthouse on a cliff at dawn, pastel colours, clean shapes\",\n  \"size\": \"1536x1024\"\n}")
  .asString();
```

```php 정확한 크기
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.beatapi.io/v1/images/tasks', [
  'body' => '{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A flat illustration of a lighthouse on a cliff at dawn, pastel colours, clean shapes",
  "size": "1536x1024"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp 정확한 크기
using RestSharp;

var client = new RestClient("https://api.beatapi.io/v1/images/tasks");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A flat illustration of a lighthouse on a cliff at dawn, pastel colours, clean shapes\",\n  \"size\": \"1536x1024\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 정확한 크기
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A flat illustration of a lighthouse on a cliff at dawn, pastel colours, clean shapes",
  "size": "1536x1024"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beatapi.io/v1/images/tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### 투명 배경

**Request**

```json
{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A single cartoon red fox sitting, sticker style, thick white outline, isolated on a transparent background",
  "aspect_ratio": "1:1",
  "background": "transparent",
  "resolution": "1K"
}
```

**Response**

```json
{
  "data": {
    "capability_id": "gpt-image-2.5-flare-std",
    "capability_version": 1,
    "completed_at": null,
    "created_at": 1791993600,
    "error_code": null,
    "error_message": null,
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "media_type": "image",
    "model": "gpt-image-2.5-flare-std",
    "object": "task",
    "output": null,
    "poll_after_seconds": 5,
    "request_id": "req_5f0c2a9e4b7d4e31",
    "stage": "queued",
    "status": "queued",
    "task_kind": "image",
    "updated_at": 1791993600
  }
}
```

**SDK Code**

```python 투명 배경
import requests

url = "https://api.beatapi.io/v1/images/tasks"

payload = {
    "model": "gpt-image-2.5-flare-std",
    "prompt": "A single cartoon red fox sitting, sticker style, thick white outline, isolated on a transparent background",
    "aspect_ratio": "1:1",
    "background": "transparent",
    "resolution": "1K"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript 투명 배경
const url = 'https://api.beatapi.io/v1/images/tasks';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model":"gpt-image-2.5-flare-std","prompt":"A single cartoon red fox sitting, sticker style, thick white outline, isolated on a transparent background","aspect_ratio":"1:1","background":"transparent","resolution":"1K"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 투명 배경
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beatapi.io/v1/images/tasks"

	payload := strings.NewReader("{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A single cartoon red fox sitting, sticker style, thick white outline, isolated on a transparent background\",\n  \"aspect_ratio\": \"1:1\",\n  \"background\": \"transparent\",\n  \"resolution\": \"1K\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 투명 배경
require 'uri'
require 'net/http'

url = URI("https://api.beatapi.io/v1/images/tasks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A single cartoon red fox sitting, sticker style, thick white outline, isolated on a transparent background\",\n  \"aspect_ratio\": \"1:1\",\n  \"background\": \"transparent\",\n  \"resolution\": \"1K\"\n}"

response = http.request(request)
puts response.read_body
```

```java 투명 배경
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.beatapi.io/v1/images/tasks")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A single cartoon red fox sitting, sticker style, thick white outline, isolated on a transparent background\",\n  \"aspect_ratio\": \"1:1\",\n  \"background\": \"transparent\",\n  \"resolution\": \"1K\"\n}")
  .asString();
```

```php 투명 배경
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.beatapi.io/v1/images/tasks', [
  'body' => '{
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A single cartoon red fox sitting, sticker style, thick white outline, isolated on a transparent background",
  "aspect_ratio": "1:1",
  "background": "transparent",
  "resolution": "1K"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp 투명 배경
using RestSharp;

var client = new RestClient("https://api.beatapi.io/v1/images/tasks");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model\": \"gpt-image-2.5-flare-std\",\n  \"prompt\": \"A single cartoon red fox sitting, sticker style, thick white outline, isolated on a transparent background\",\n  \"aspect_ratio\": \"1:1\",\n  \"background\": \"transparent\",\n  \"resolution\": \"1K\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 투명 배경
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "model": "gpt-image-2.5-flare-std",
  "prompt": "A single cartoon red fox sitting, sticker style, thick white outline, isolated on a transparent background",
  "aspect_ratio": "1:1",
  "background": "transparent",
  "resolution": "1K"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beatapi.io/v1/images/tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```