> ## Documentation Index
> Fetch the complete documentation index at: https://docs.perchanceai.art/agent-docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Doubao Seedream 5.0 Pro API Documentation

> PerchanceAI image generation model.

POST https://api.perchanceai.art/api/v1/developer/generations

## Model

- `model_key`: `doubao-seedream-5-0-pro`
- `modality`: `image`
- `operation`: `image_generation`
- provider: seedream
- price: 100 credits per generation

## Authorizations

| Name | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `Authorization` | string | header | required | Formal account API Key or OAuth token, for example `Bearer pca_live_...` |
| `Idempotency-Key` | string | header | required | Unique key for the generation request |
| `X-App-Id` | string | header | optional | Fixed to `perchanceai` for this deployment |

## Body

`application/json`

| Field | Type | Required |
| --- | --- | --- |
| `negative_prompt` | string | optional |
| `prompt` | string | optional |
| `reference_upload_ids` | array | optional |

## Parameters

| Name | Accepted values |
| --- | --- |
| `aspect_ratios` | 1:1, 4:3, 3:4, 16:9, 9:16, 2:3, 3:2, 21:9, 5:4, 4:5 |
| `reference_image_count` | 0 |
| `max_reference_uploads` | 8 |
| `max_n` | 4 |
| `max_prompt_chars` | 8000 |

## Example request

```bash
curl --request POST \
  --url https://api.perchanceai.art/api/v1/developer/generations \
  --header 'Authorization: Bearer <pca_live_key>' \
  --header 'X-App-Id: perchanceai' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <uuid>' \
  --data '{"model_key":"doubao-seedream-5-0-pro","operation":"image_generation","prompt":"your prompt"}'
```

## Responses

- `202` — accepted; durable generation identifier returned, not task completion.
- `401` `DEVELOPER_TOKEN_REQUIRED` — the bearer token is missing.
- `401` `DEVELOPER_TOKEN_INVALID` — the bearer token is invalid, including historical anonymous credentials.
- `422` `FIELD_INVALID` / `FIELD_REQUIRED` — the payload does not match the model schema.
- `429` `RATE_LIMITED` — too many requests.
