# GPT Image 2.5 Flare — Scenepond API

Model ID: `openai/gpt-image-2.5/flare/text-to-image`

Model developer: OpenAI

Purpose: Text to image

Source page: https://open.scenepond.ai/en/models/openai/gpt-image-2.5/flare/text-to-image#api

Base URL: `https://open.scenepond.ai/v1`

Authenticate every request with Authorization: Bearer and your Scenepond API key. Keep the key on your server.

## Scenepond asynchronous tasks

`POST /v1/tasks`

### Request parameters

- `model` — **Required**; `string`. Use this exact public model ID.

- `parameters` — **Required**; `object`. Generation parameters for this model.

### Fields in parameters

These fields apply when parameters is supplied. A required child does not make its optional parent required.

- `parameters.prompt` — **Required**; `string`. Prompt
  - Constraints: Minimum characters: 1; Maximum characters: 32000; Must contain a non-whitespace character.

- `parameters.background` — **Optional**; `string | null`. For a transparent background, choose PNG or WebP output. JPEG does not support transparency.
  - Default: `"auto"`
  - Constraints: Allowed values: "auto", "transparent", "opaque", null

- `parameters.image_size` — **Optional**; `object | string | null`. Image size
  - Default: `"landscape_4_3"`
  - Constraints: Choose square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 or auto, or supply an object with width and height. Custom sides must be multiples of 16, at most 3840 pixels; total pixels must be 655360–8294400, and the longer side must not exceed three times the shorter side.; Prefer image_size in new requests. size is a compatibility alias. Do not supply both for a custom dimension object; matching preset names are allowed. Legacy sizes map as follows: 1024x1024 → square_hd, 512x512 → square, 768x1024 → portrait_4_3, 1024x768 → landscape_4_3.

### Fields in parameters.image_size

These fields apply when parameters.image_size is supplied. A required child does not make its optional parent required.

- `parameters.image_size.height` — **Conditional**; `integer`. Image height in pixels.
  - When image_size is an object.
  - Constraints: Minimum value: 16; Maximum value: 3840

- `parameters.image_size.width` — **Conditional**; `integer`. Image width in pixels.
  - When image_size is an object.
  - Constraints: Minimum value: 16; Maximum value: 3840


- `parameters.num_images` — **Optional**; `integer | null`. Image count
  - Constraints: Minimum value: 1; Maximum value: 10; num_images is the native image count, from 1 to 10. count is a compatibility alias; if both are supplied, they must match.

- `parameters.output_compression` — **Optional**; `integer | null`. Set output_compression to an integer from 0 to 100 only with an explicit output_format of jpeg or webp. Omit output_compression or set it to null for PNG. No fixed compression default is declared.
  - Constraints: Minimum value: 0; Maximum value: 100

- `parameters.output_format` — **Optional**; `string | null`. For a transparent background, choose PNG or WebP output. JPEG does not support transparency.
  - Default: `"png"`
  - Constraints: Allowed values: "png", "jpeg", "webp", null

- `parameters.quality` — **Optional**; `string | null`. Quality
  - Default: `"high"`
  - Constraints: Allowed values: "auto", "low", "medium", "high", "xhigh", "max", null

- `parameters.sync_mode` — **Optional**; `boolean | null`. When true, the provider returns image data inline without storing the result in its request history. Scenepond still runs an asynchronous task and returns hosted artifact URLs.

- `parameters.enable_safety_checker` — **Optional**; `boolean | null`. Safety checking is enabled by default. Authorized callers may set false to request relaxed provider screening.

- `parameters.image_passthrough` — **Optional**; `boolean | null`. Send reference images without resizing or re-encoding, and return the original generated image bytes and format. Output dimensions can differ from the reference image.

<details>
<summary>Compatibility parameters</summary>

- `parameters.count` — **Optional**; `integer`. Image count
  - Default: `1`
  - Constraints: Minimum value: 1; Maximum value: 10; num_images is the native image count, from 1 to 10. count is a compatibility alias; if both are supplied, they must match.

- `parameters.size` — **Optional**; `object | string | null`. Image size
  - Constraints: Choose square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 or auto, or supply an object with width and height. Custom sides must be multiples of 16, at most 3840 pixels; total pixels must be 655360–8294400, and the longer side must not exceed three times the shorter side.; Prefer image_size in new requests. size is a compatibility alias. Do not supply both for a custom dimension object; matching preset names are allowed. Legacy sizes map as follows: 1024x1024 → square_hd, 512x512 → square, 768x1024 → portrait_4_3, 1024x768 → landscape_4_3.

### Fields in parameters.size

These fields apply when parameters.size is supplied. A required child does not make its optional parent required.

- `parameters.size.height` — **Conditional**; `integer`. Image height in pixels.
  - When size is an object.
  - Constraints: Minimum value: 16; Maximum value: 3840

- `parameters.size.width` — **Conditional**; `integer`. Image width in pixels.
  - When size is an object.
  - Constraints: Minimum value: 16; Maximum value: 3840


</details>


- `callback_url` — **Optional**; `string`. Optional task completion webhook. Use a public HTTPS URL of at most 2048 bytes, without credentials or a fragment.

### Request headers

- `headers.Authorization` — **Required**; `string`. Bearer followed by your Scenepond API key.

- `headers.Content-Type` — **Required**; `string`. Use application/json for task submission.

- `headers.X-Scenepond-Max-Reservation` — **Optional**; `string`. Optional limit on the initial reservation in quota units. Final usage settlement can differ. A larger reservation is rejected before dispatch with reservation_changed.
  - Constraints: integer value = 0..2147483647

### Minimum request

#### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/tasks" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "openai/gpt-image-2.5/flare/text-to-image",
  "parameters": {
    "prompt": "A quiet lakeside at sunrise, soft light and a clear subject."
  }
}
JSON
```

#### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"openai/gpt-image-2.5/flare/text-to-image\",\n  \"parameters\": {\n    \"prompt\": \"A quiet lakeside at sunrise, soft light and a clear subject.\"\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/tasks",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

#### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/tasks", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "openai/gpt-image-2.5/flare/text-to-image",
  "parameters": {
    "prompt": "A quiet lakeside at sunrise, soft light and a clear subject."
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

### Optional parameter examples

#### Request with optional parameters 1

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/tasks" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "openai/gpt-image-2.5/flare/text-to-image",
  "parameters": {
    "prompt": "A quiet lakeside at sunrise, soft light and a clear subject.",
    "num_images": 1
  }
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"openai/gpt-image-2.5/flare/text-to-image\",\n  \"parameters\": {\n    \"prompt\": \"A quiet lakeside at sunrise, soft light and a clear subject.\",\n    \"num_images\": 1\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/tasks",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/tasks", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "openai/gpt-image-2.5/flare/text-to-image",
  "parameters": {
    "prompt": "A quiet lakeside at sunrise, soft light and a clear subject.",
    "num_images": 1
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

<details>
<summary>Compatibility examples</summary>

#### Request with optional parameters 1

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/tasks" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "openai/gpt-image-2.5/flare/text-to-image",
  "parameters": {
    "prompt": "A quiet lakeside at sunrise, soft light and a clear subject.",
    "background": "auto",
    "count": 1,
    "image_size": "landscape_4_3",
    "output_compression": 0,
    "output_format": "webp",
    "quality": "high",
    "sync_mode": true,
    "enable_safety_checker": true,
    "image_passthrough": false
  }
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"openai/gpt-image-2.5/flare/text-to-image\",\n  \"parameters\": {\n    \"prompt\": \"A quiet lakeside at sunrise, soft light and a clear subject.\",\n    \"background\": \"auto\",\n    \"count\": 1,\n    \"image_size\": \"landscape_4_3\",\n    \"output_compression\": 0,\n    \"output_format\": \"webp\",\n    \"quality\": \"high\",\n    \"sync_mode\": true,\n    \"enable_safety_checker\": true,\n    \"image_passthrough\": false\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/tasks",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/tasks", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "openai/gpt-image-2.5/flare/text-to-image",
  "parameters": {
    "prompt": "A quiet lakeside at sunrise, soft light and a clear subject.",
    "background": "auto",
    "count": 1,
    "image_size": "landscape_4_3",
    "output_compression": 0,
    "output_format": "webp",
    "quality": "high",
    "sync_mode": true,
    "enable_safety_checker": true,
    "image_passthrough": false
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Request with optional parameters 2

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/tasks" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "openai/gpt-image-2.5/flare/text-to-image",
  "parameters": {
    "prompt": "A quiet lakeside at sunrise, soft light and a clear subject.",
    "size": "landscape_4_3"
  }
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"openai/gpt-image-2.5/flare/text-to-image\",\n  \"parameters\": {\n    \"prompt\": \"A quiet lakeside at sunrise, soft light and a clear subject.\",\n    \"size\": \"landscape_4_3\"\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/tasks",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/tasks", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "openai/gpt-image-2.5/flare/text-to-image",
  "parameters": {
    "prompt": "A quiet lakeside at sunrise, soft light and a clear subject.",
    "size": "landscape_4_3"
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

</details>

### Follow-up requests

#### 2. Check task status

Poll every few seconds until succeeded or failed.

`GET /v1/tasks/{task_id}`

##### cURL

```bash
curl --fail-with-body -X GET "https://open.scenepond.ai/v1/tasks/$SCENEPOND_TASK_ID" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY"
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

request = Request(
    "https://open.scenepond.ai/v1/tasks/" + quote(os.environ["SCENEPOND_TASK_ID"], safe="") + "",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    method="GET",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
if (!process.env.SCENEPOND_TASK_ID) throw new Error("Set SCENEPOND_TASK_ID first");
const response = await fetch("https://open.scenepond.ai/v1/tasks/" + encodeURIComponent(process.env.SCENEPOND_TASK_ID) + "", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  }
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### 3. Get the results

After succeeded, list artifacts and download each content_url with the same API key.

`GET /v1/tasks/{task_id}/artifacts`

##### cURL

```bash
curl --fail-with-body -X GET "https://open.scenepond.ai/v1/tasks/$SCENEPOND_TASK_ID/artifacts" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY"
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

request = Request(
    "https://open.scenepond.ai/v1/tasks/" + quote(os.environ["SCENEPOND_TASK_ID"], safe="") + "/artifacts",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    method="GET",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
if (!process.env.SCENEPOND_TASK_ID) throw new Error("Set SCENEPOND_TASK_ID first");
const response = await fetch("https://open.scenepond.ai/v1/tasks/" + encodeURIComponent(process.env.SCENEPOND_TASK_ID) + "/artifacts", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  }
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### 4. Download before expiry

Set SCENEPOND_TASK_ID to task_id and SCENEPOND_ARTIFACT_KEY to artifacts[].key. Download the binary file before expires_at. The content endpoint supports GET, HEAD, and Range requests; saving content_url alone does not save the media.

`GET /v1/tasks/{task_id}/artifacts/{artifact_key}/content`

##### cURL

```bash
curl --fail-with-body --output output.bin -X GET "https://open.scenepond.ai/v1/tasks/$SCENEPOND_TASK_ID/artifacts/$SCENEPOND_ARTIFACT_KEY/content" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY"
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

request = Request(
    "https://open.scenepond.ai/v1/tasks/" + quote(os.environ["SCENEPOND_TASK_ID"], safe="") + "/artifacts/" + quote(os.environ["SCENEPOND_ARTIFACT_KEY"], safe="") + "/content",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    method="GET",
)
with urlopen(request) as response:
    with open("output.bin", "wb") as output:
        output.write(response.read())
print("Saved output.bin")
```

##### JavaScript

```javascript
import { writeFile } from "node:fs/promises";
if (!process.env.SCENEPOND_TASK_ID) throw new Error("Set SCENEPOND_TASK_ID first");
if (!process.env.SCENEPOND_ARTIFACT_KEY) throw new Error("Set SCENEPOND_ARTIFACT_KEY first");
const response = await fetch("https://open.scenepond.ai/v1/tasks/" + encodeURIComponent(process.env.SCENEPOND_TASK_ID) + "/artifacts/" + encodeURIComponent(process.env.SCENEPOND_ARTIFACT_KEY) + "/content", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  }
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
await writeFile("output.bin", Buffer.from(await response.arrayBuffer()));
console.log("Saved output.bin");
```

### Illustrative responses

Response examples show the structure only. IDs, URLs, and values are placeholders.

#### Submission response

```json
{
  "task_id": "task_EXAMPLE",
  "model": "openai/gpt-image-2.5/flare/text-to-image",
  "status": "queued",
  "progress": 0,
  "created_at": 1700000000,
  "finished_at": 0,
  "error": null,
  "links": {
    "self": "/v1/tasks/task_EXAMPLE",
    "artifacts": "/v1/tasks/task_EXAMPLE/artifacts"
  }
}
```

#### Completed task status

```json
{
  "task_id": "task_EXAMPLE",
  "model": "openai/gpt-image-2.5/flare/text-to-image",
  "status": "succeeded",
  "progress": 100,
  "created_at": 1700000000,
  "finished_at": 1700000060,
  "error": null,
  "links": {
    "self": "/v1/tasks/task_EXAMPLE",
    "artifacts": "/v1/tasks/task_EXAMPLE/artifacts"
  }
}
```

#### Failed task status (HTTP 200)

```json
{
  "task_id": "task_EXAMPLE",
  "model": "openai/gpt-image-2.5/flare/text-to-image",
  "status": "failed",
  "progress": 0,
  "created_at": 1700000000,
  "finished_at": 1700000060,
  "error": {
    "code": "input_media_unavailable",
    "message": "Reference media could not be downloaded or its format is unsupported / 参考素材无法下载或格式不支持",
    "retryable": false,
    "charged": false
  },
  "links": {
    "self": "/v1/tasks/task_EXAMPLE",
    "artifacts": "/v1/tasks/task_EXAMPLE/artifacts"
  }
}
```

#### Submission rejection (HTTP 400)

```json
{
  "error": {
    "code": "invalid_parameters",
    "message": "Invalid generation parameters / 生成参数无效",
    "retryable": false,
    "submission": "not_submitted"
  }
}
```

#### Artifact listing

```json
{
  "task_id": "task_EXAMPLE",
  "artifacts": [
    {
      "key": "image_0",
      "type": "image",
      "mime_type": "image/png",
      "content_url": "https://open.scenepond.ai/v1/tasks/task_EXAMPLE/artifacts/image_0/content",
      "expires_at": 1701209660
    }
  ]
}
```

#### Expired artifact response (API key authentication)

```json
{
  "error": {
    "message": "Artifact content has expired or is no longer available",
    "type": "artifact_expired",
    "code": "artifact_expired"
  }
}
```

### Response fields

- `response.task_id` — **Required**; `string`. Opaque task identifier. Save it and URL-encode it when building a path.

- `response.model` — **Required**; `string`. The public model ID used for this task.

- `response.status` — **Required**; `string`. Task state: queued, processing, succeeded, or failed.

- `response.progress` — **Required**; `integer`. Progress from 0 to 100; only succeeded guarantees 100.

- `response.created_at` — **Required**; `integer`. Creation time as Unix seconds.

- `response.finished_at` — **Required**; `integer`. Finish time as Unix seconds, or 0 before the task is terminal.

- `response.error` — **Required**; `object | null`. Null until a terminal failure is finalized.

### Fields in response.error

These fields apply when response.error is supplied. A required child does not make its optional parent required.

- `response.error.code` — **Required**; `string`. Public task failure classification.

- `response.error.message` — **Required**; `string`. Safe public failure explanation.

- `response.error.retryable` — **Required**; `boolean`. Whether retrying may succeed; check the existing task and billing before resubmitting.

- `response.error.charged` — **Required**; `boolean`. Whether the failed task retains a charge. Read this only when returned.


- `response.links` — **Required**; `object`. Relative paths for retrieving this task and its artifacts.

### Fields in response.links

These fields apply when response.links is supplied. A required child does not make its optional parent required.

- `response.links.self` — **Required**; `string`. Task status path.

- `response.links.artifacts` — **Required**; `string`. Artifact listing path.


- `response.attention` — **Optional**; `object`. Optional non-terminal observation notice. A delayed task keeps its queued or processing status; this is not a failed generation.

### Fields in response.attention

These fields apply when response.attention is supplied. A required child does not make its optional parent required.

- `response.attention.code` — **Required**; `string`. generation_delayed, provider_query_retrying, or provider_query_paused.

- `response.attention.message` — **Required**; `string`. Safe public observation notice.

- `response.attention.required_action` — **Required**; `string`. Wait and keep checking the original task for generation_delayed. Contact support for a paused task; this field does not authorize a new generation or refund.


### Request notes

- This interface does not return raw token counts. Final charges use the measured usage and published rates.
- Only model, parameters and callback_url are accepted at the request top level. Put generation settings inside parameters.
- Images and videos use the same Scenepond task API. Select a model and its generation settings.
- Authenticate every request with Authorization: Bearer and your Scenepond API key. Keep the key on your server.
- Submit once, save task_id, then poll until succeeded or failed. Download results from the artifacts endpoint.
- Creation returns the task ID after acceptance. Some tasks may already be complete when the ID is returned.
- Fresh accepted submissions return HTTP 202 with Location: /v1/tasks/{task_id}. Provider-specific submission recovery is not a published general idempotency API.
- Generated artifacts are stored for 14 days. Download them before expires_at; expired artifacts cannot be recovered.
- Do not automatically resubmit a timed-out POST. It may already have created a billable task.
- GET task status has no published filter or pagination parameters. There is no public task-list or task-cancel route in this contract.
- Task submission errors use error.code, error.message, and error.retryable; error.submission may be not_submitted for a pre-submission rejection. Submission errors do not include a charged guarantee. Authentication and routing failures may use a different error shape; also check the HTTP status.
- Current task failure codes are content_policy_violation, invalid_parameters, reservation_changed, input_media_unavailable, generation_timeout, upstream_unavailable, artifact_storage_failed, and generation_failed. Legacy aliases in troubleshooting are compatibility guidance, not additional current task codes.
- A failed task is returned by a successful HTTP 200 status query with error.retryable and error.charged. Retryable does not mean safe to submit another billable task automatically.
- An optional attention notice keeps the task non-terminal with error: null. generation_delayed means the original task is taking longer than usual and keeps its queued or processing status; it does not confirm a queue position or actual generation progress. provider_query_retrying means observation is retrying; provider_query_paused requires operator attention. No public resume, reconciliation, or operator-action endpoint is promised.
- Optional callback_url must be a non-null string containing a public HTTPS URL of at most 2048 UTF-8 bytes, without credentials, fragments, or whitespace. Public DNS and destination addresses are checked by the server.
- A completion callback is a POST of the terminal task JSON after billing is finalized. Verify Scenepond-Signature: t=<unix_seconds>,v1=<hex_hmac> and Scenepond-Event-ID using HMAC-SHA256 over timestamp + "." + event_id + "." + the exact raw request body.
- Use the full per-account whsec_ signing secret as the UTF-8 HMAC key, including its prefix; it is separate from your API key. Key retrieval and rotation require an authenticated account security flow and reauthentication. No public API-key endpoint for retrieving that secret is published here; contact support to arrange webhook verification before enabling callbacks.
- Verify signatures with constant-time comparison and enforce a timestamp freshness window. Deduplicate by Scenepond-Event-ID, return 2xx promptly, and process the event durably. Deliveries may repeat with the same event ID and body; each attempt gets a fresh signature timestamp.
- Callback delivery has a 5-second timeout, does not follow redirects, and accepts only 2xx. It makes at most 6 attempts, with retry delays of 10, 20, 40, 80, and 160 seconds after failures. Polling remains available if delivery fails.
- Generated images and videos are stored for 14 days. Download and save them before expiry.
- Each stored artifact includes expires_at, its expiry time as a Unix timestamp in seconds. Use that value for each file; do not calculate expiry from the task creation time.
- Some older results may omit expires_at. This does not mean unlimited storage; download them as soon as possible.
- After expiry, content requests authenticated with an API key (without an access query parameter) return HTTP 410 with code artifact_expired. Private access links may return 404 for unavailable content. Expired files cannot be downloaded or recovered.
- Keep content_url private. Saving a link does not preserve the file; download the actual bytes to your own storage before expires_at.

### Model parameters (JSON)

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "x-scenepond-constraints": {
        "version": 1,
        "rules": [
          {
            "kind": "image-dimensions",
            "path": "/image_size",
            "minimumSide": 16,
            "maximumSide": 3840,
            "sideMultipleOf": 16,
            "minimumPixels": 655360,
            "maximumPixels": 8294400,
            "maximumAspectRatio": 3
          },
          {
            "kind": "image-dimensions",
            "path": "/size",
            "minimumSide": 16,
            "maximumSide": 3840,
            "sideMultipleOf": 16,
            "minimumPixels": 655360,
            "maximumPixels": 8294400,
            "maximumAspectRatio": 3
          }
        ]
      },
      "type": "object",
      "properties": {
        "background": {
          "type": "string",
          "enum": [
            "auto",
            "transparent",
            "opaque"
          ],
          "default": "auto"
        },
        "count": {
          "default": 1,
          "allOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 4
            },
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 128
            }
          ]
        },
        "image_size": {
          "default": "landscape_4_3",
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "square_hd",
                "square",
                "portrait_4_3",
                "portrait_16_9",
                "landscape_4_3",
                "landscape_16_9",
                "auto"
              ]
            },
            {
              "type": "object",
              "properties": {
                "height": {
                  "type": "integer",
                  "minimum": 16,
                  "maximum": 3840
                },
                "width": {
                  "type": "integer",
                  "minimum": 16,
                  "maximum": 3840
                }
              },
              "required": [
                "width",
                "height"
              ],
              "additionalProperties": false
            }
          ]
        },
        "num_images": {
          "type": "integer",
          "minimum": 1,
          "maximum": 4
        },
        "output_compression": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "output_format": {
          "type": "string",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ],
          "default": "png"
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 32000
        },
        "quality": {
          "type": "string",
          "enum": [
            "auto",
            "low",
            "medium",
            "high",
            "xhigh",
            "max"
          ],
          "default": "high"
        },
        "size": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "square_hd",
                "square",
                "portrait_4_3",
                "portrait_16_9",
                "landscape_4_3",
                "landscape_16_9",
                "auto",
                "1024x1024",
                "512x512",
                "768x1024",
                "1024x768"
              ]
            },
            {
              "type": "object",
              "properties": {
                "height": {
                  "type": "integer",
                  "minimum": 16,
                  "maximum": 3840
                },
                "width": {
                  "type": "integer",
                  "minimum": 16,
                  "maximum": 3840
                }
              },
              "required": [
                "width",
                "height"
              ],
              "additionalProperties": false
            }
          ]
        },
        "sync_mode": {
          "type": "boolean"
        }
      },
      "required": [
        "prompt"
      ],
      "additionalProperties": false
    },
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "x-scenepond-constraints": {
        "version": 1,
        "rules": [
          {
            "kind": "image-dimensions",
            "path": "/image_size",
            "minimumSide": 16,
            "maximumSide": 3840,
            "sideMultipleOf": 16,
            "minimumPixels": 655360,
            "maximumPixels": 8294400,
            "maximumAspectRatio": 3
          },
          {
            "kind": "image-dimensions",
            "path": "/size",
            "minimumSide": 16,
            "maximumSide": 3840,
            "sideMultipleOf": 16,
            "minimumPixels": 655360,
            "maximumPixels": 8294400,
            "maximumAspectRatio": 3
          },
          {
            "kind": "parameter-effect",
            "path": "/output_compression",
            "behavior": "jpeg-webp-compression"
          }
        ]
      },
      "type": "object",
      "properties": {
        "background": {
          "default": "auto",
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "auto",
                "transparent",
                "opaque"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "count": {
          "default": 1,
          "allOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            },
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 128
            }
          ]
        },
        "enable_safety_checker": {
          "default": true,
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "image_passthrough": {
          "default": false,
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "image_size": {
          "default": "landscape_4_3",
          "anyOf": [
            {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "square_hd",
                    "square",
                    "portrait_4_3",
                    "portrait_16_9",
                    "landscape_4_3",
                    "landscape_16_9",
                    "auto"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "height": {
                      "type": "integer",
                      "minimum": 16,
                      "maximum": 3840,
                      "multipleOf": 16
                    },
                    "width": {
                      "type": "integer",
                      "minimum": 16,
                      "maximum": 3840,
                      "multipleOf": 16
                    }
                  },
                  "required": [
                    "width",
                    "height"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "image_urls": {
          "type": "array",
          "maxItems": 0
        },
        "num_images": {
          "default": 1,
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            },
            {
              "type": "null"
            }
          ]
        },
        "output_compression": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 100
            },
            {
              "type": "null"
            }
          ]
        },
        "output_format": {
          "default": "png",
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "jpeg",
                "png",
                "webp"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 32000,
          "pattern": "\\S"
        },
        "quality": {
          "default": "high",
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "auto",
                "low",
                "medium",
                "high",
                "xhigh",
                "max"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "size": {
          "default": "landscape_4_3",
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "square_hd",
                "square",
                "portrait_4_3",
                "portrait_16_9",
                "landscape_4_3",
                "landscape_16_9",
                "auto",
                "1024x1024",
                "512x512",
                "768x1024",
                "1024x768"
              ]
            },
            {
              "type": "null"
            },
            {
              "type": "object",
              "properties": {
                "height": {
                  "type": "integer",
                  "minimum": 16,
                  "maximum": 3840,
                  "multipleOf": 16
                },
                "width": {
                  "type": "integer",
                  "minimum": 16,
                  "maximum": 3840,
                  "multipleOf": 16
                }
              },
              "required": [
                "width",
                "height"
              ],
              "additionalProperties": false
            }
          ]
        },
        "sync_mode": {
          "default": false,
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "prompt"
      ],
      "additionalProperties": false,
      "allOf": [
        {
          "if": {
            "properties": {
              "count": {
                "allOf": [
                  {
                    "const": 1
                  },
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 128
                  }
                ]
              }
            },
            "required": [
              "count"
            ]
          },
          "then": {
            "properties": {
              "num_images": {
                "const": 1
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "count": {
                "allOf": [
                  {
                    "const": 2
                  },
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 128
                  }
                ]
              }
            },
            "required": [
              "count"
            ]
          },
          "then": {
            "properties": {
              "num_images": {
                "const": 2
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "count": {
                "allOf": [
                  {
                    "const": 3
                  },
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 128
                  }
                ]
              }
            },
            "required": [
              "count"
            ]
          },
          "then": {
            "properties": {
              "num_images": {
                "const": 3
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "count": {
                "allOf": [
                  {
                    "const": 4
                  },
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 128
                  }
                ]
              }
            },
            "required": [
              "count"
            ]
          },
          "then": {
            "properties": {
              "num_images": {
                "const": 4
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "count": {
                "allOf": [
                  {
                    "const": 5
                  },
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 128
                  }
                ]
              }
            },
            "required": [
              "count"
            ]
          },
          "then": {
            "properties": {
              "num_images": {
                "const": 5
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "count": {
                "allOf": [
                  {
                    "const": 6
                  },
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 128
                  }
                ]
              }
            },
            "required": [
              "count"
            ]
          },
          "then": {
            "properties": {
              "num_images": {
                "const": 6
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "count": {
                "allOf": [
                  {
                    "const": 7
                  },
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 128
                  }
                ]
              }
            },
            "required": [
              "count"
            ]
          },
          "then": {
            "properties": {
              "num_images": {
                "const": 7
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "count": {
                "allOf": [
                  {
                    "const": 8
                  },
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 128
                  }
                ]
              }
            },
            "required": [
              "count"
            ]
          },
          "then": {
            "properties": {
              "num_images": {
                "const": 8
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "count": {
                "allOf": [
                  {
                    "const": 9
                  },
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 128
                  }
                ]
              }
            },
            "required": [
              "count"
            ]
          },
          "then": {
            "properties": {
              "num_images": {
                "const": 9
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "count": {
                "allOf": [
                  {
                    "const": 10
                  },
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 128
                  }
                ]
              }
            },
            "required": [
              "count"
            ]
          },
          "then": {
            "properties": {
              "num_images": {
                "const": 10
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "size": {
                "type": "object"
              }
            },
            "required": [
              "size"
            ]
          },
          "then": {
            "not": {
              "required": [
                "image_size"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "size": {
                "const": "square_hd"
              }
            },
            "required": [
              "size"
            ]
          },
          "then": {
            "properties": {
              "image_size": {
                "const": "square_hd"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "size": {
                "const": "square"
              }
            },
            "required": [
              "size"
            ]
          },
          "then": {
            "properties": {
              "image_size": {
                "const": "square"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "size": {
                "const": "portrait_4_3"
              }
            },
            "required": [
              "size"
            ]
          },
          "then": {
            "properties": {
              "image_size": {
                "const": "portrait_4_3"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "size": {
                "const": "portrait_16_9"
              }
            },
            "required": [
              "size"
            ]
          },
          "then": {
            "properties": {
              "image_size": {
                "const": "portrait_16_9"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "size": {
                "const": "landscape_4_3"
              }
            },
            "required": [
              "size"
            ]
          },
          "then": {
            "properties": {
              "image_size": {
                "const": "landscape_4_3"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "size": {
                "const": "landscape_16_9"
              }
            },
            "required": [
              "size"
            ]
          },
          "then": {
            "properties": {
              "image_size": {
                "const": "landscape_16_9"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "size": {
                "const": "auto"
              }
            },
            "required": [
              "size"
            ]
          },
          "then": {
            "properties": {
              "image_size": {
                "const": "auto"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "size": {
                "const": "1024x1024"
              }
            },
            "required": [
              "size"
            ]
          },
          "then": {
            "properties": {
              "image_size": {
                "const": "square_hd"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "size": {
                "const": "512x512"
              }
            },
            "required": [
              "size"
            ]
          },
          "then": {
            "properties": {
              "image_size": {
                "const": "square"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "size": {
                "const": "768x1024"
              }
            },
            "required": [
              "size"
            ]
          },
          "then": {
            "properties": {
              "image_size": {
                "const": "portrait_4_3"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "size": {
                "const": "1024x768"
              }
            },
            "required": [
              "size"
            ]
          },
          "then": {
            "properties": {
              "image_size": {
                "const": "landscape_4_3"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "size": {
                "const": null
              }
            },
            "required": [
              "size"
            ]
          },
          "then": {
            "properties": {
              "image_size": {
                "const": null
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "background": {
                "const": "transparent"
              }
            },
            "required": [
              "background"
            ]
          },
          "then": {
            "properties": {
              "output_format": {
                "not": {
                  "const": "jpeg"
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "output_compression": {
                "not": {
                  "type": "null"
                }
              }
            },
            "required": [
              "output_compression"
            ]
          },
          "then": {
            "properties": {
              "output_format": {
                "enum": [
                  "jpeg",
                  "webp"
                ]
              }
            },
            "required": [
              "output_format"
            ]
          }
        }
      ]
    }
  ]
}
```
