# API reference

> Every HalationLab.ai API endpoint and object, generated from the OpenAPI contract.

Base URL: `https://api.halationlab.ai/v1`. Contract version `2026-11-28` (the `HalationLab-Version` response header). Authenticate with `Authorization: Bearer <API key or OAuth access token>`. The OpenAPI 3.1 document is https://docs.halationlab.ai/openapi.json; the interactive reference is https://docs.halationlab.ai/api/.

Send `Idempotency-Key` on every POST, PATCH and DELETE. `Prefer: wait=N` (N up to 60) is accepted where noted.

## Models

### GET /v1/models

**List models.** Every model you can generate with, filterable by task and output. No authentication needed.

- Scope: none, no credential needed
- Parameters: `task` (query): Only this task, for example `text-to-video`.; `output` (query): Only models that produce this.; `limit` (query): How many items to return, 1 to 100. Default 20.; `cursor` (query): The `next_cursor` of the previous page.
- Success: 200 with a list of ModelSummary
- Errors: [`parameter_invalid`](https://docs.halationlab.ai/errors/parameter-invalid.md) (422), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429)

### GET /v1/models/{model}

**Get a model.** One model with the JSON Schema of its `input`, its price and its limits. No authentication needed.

- Scope: none, no credential needed
- Parameters: `model` (path, required): The model ID.
- Success: 200 with [Model](#model)
- Errors: [`model_not_found`](https://docs.halationlab.ai/errors/model-not-found.md) (404), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429)

### GET /v1/voices

**List voices.** Voices for text-to-speech models. Pass a voice ID as `input.voice`. Every voice is on one page.

- Scope: `read`
- Parameters: `model` (query): Only voices for this model.
- Success: 200 with a list of Voice
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500)

## Generations

### POST /v1/quotes

**Get a quote.** Validates a request and returns its binding maximum price. Nothing runs and nothing is charged. Start it within 30 minutes by sending `quote` to `POST /v1/generations`.

- Scope: `generate`, `read`
- Request body: [QuoteCreate](#quotecreate)
- Success: 201 with [Quote](#quote)
- Send an `Idempotency-Key`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`model_not_found`](https://docs.halationlab.ai/errors/model-not-found.md) (404), [`parameter_missing`](https://docs.halationlab.ai/errors/parameter-missing.md) (422), [`parameter_invalid`](https://docs.halationlab.ai/errors/parameter-invalid.md) (422), [`parameter_unknown`](https://docs.halationlab.ai/errors/parameter-unknown.md) (422), [`media_invalid`](https://docs.halationlab.ai/errors/media-invalid.md) (422), [`media_not_ready`](https://docs.halationlab.ai/errors/media-not-ready.md) (409), [`model_unavailable`](https://docs.halationlab.ai/errors/model-unavailable.md) (503), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404)

### POST /v1/generations

**Start a generation.** Quotes the request, checks it against `max_cost` and the spending limit, reserves the maximum and starts the work, in one step. With `Prefer: wait=N` (up to 60 seconds) the response waits until the generation is final or the time runs out; either way you get the generation object. Send an `Idempotency-Key` so that a retry after a timeout never starts a second generation.

- Scope: `generate`, `read`
- Request body: [GenerationCreate](#generationcreate)
- Success: 201 with [Generation](#generation)
- Send an `Idempotency-Key`.
- Accepts `Prefer: wait=N`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`max_cost_exceeded`](https://docs.halationlab.ai/errors/max-cost-exceeded.md) (402), [`insufficient_balance`](https://docs.halationlab.ai/errors/insufficient-balance.md) (402), [`spending_limit_reached`](https://docs.halationlab.ai/errors/spending-limit-reached.md) (402), [`spending_not_authorized`](https://docs.halationlab.ai/errors/spending-not-authorized.md) (403), [`spending_limit_changed`](https://docs.halationlab.ai/errors/spending-limit-changed.md) (403), [`quote_expired`](https://docs.halationlab.ai/errors/quote-expired.md) (409), [`quote_used`](https://docs.halationlab.ai/errors/quote-used.md) (409), [`price_changed`](https://docs.halationlab.ai/errors/price-changed.md) (409), [`content_blocked`](https://docs.halationlab.ai/errors/content-blocked.md) (403), [`model_unavailable`](https://docs.halationlab.ai/errors/model-unavailable.md) (503), [`media_not_ready`](https://docs.halationlab.ai/errors/media-not-ready.md) (409), [`idempotency_key_reused`](https://docs.halationlab.ai/errors/idempotency-key-reused.md) (409), [`request_in_progress`](https://docs.halationlab.ai/errors/request-in-progress.md) (409), [`outcome_unknown`](https://docs.halationlab.ai/errors/outcome-unknown.md) (409), [`model_not_found`](https://docs.halationlab.ai/errors/model-not-found.md) (404), [`parameter_missing`](https://docs.halationlab.ai/errors/parameter-missing.md) (422), [`parameter_invalid`](https://docs.halationlab.ai/errors/parameter-invalid.md) (422), [`parameter_unknown`](https://docs.halationlab.ai/errors/parameter-unknown.md) (422), [`media_invalid`](https://docs.halationlab.ai/errors/media-invalid.md) (422), [`media_fetch_failed`](https://docs.halationlab.ai/errors/media-fetch-failed.md) (422), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404), [`consent_required`](https://docs.halationlab.ai/errors/consent-required.md) (403)

### GET /v1/generations

**List generations.** Generations in the projects this credential can see, newest first. Includes work started in the app.

- Scope: `read`
- Parameters: `project` (query): Only this project.; `status` (query): Only this status.; `limit` (query): How many items to return, 1 to 100. Default 20.; `cursor` (query): The `next_cursor` of the previous page.
- Success: 200 with a list of Generation
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404)

### GET /v1/generations/{id}

**Get a generation.** The generation's status, outputs and cost. With `Prefer: wait=N` the response waits up to N seconds (at most 60) for a final status.

- Scope: `read`
- Parameters: `id` (path, required): The generation ID.
- Success: 200 with [Generation](#generation)
- Accepts `Prefer: wait=N`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404)

### POST /v1/generations/{id}/cancel

**Cancel a generation.** Cancels a generation. Work not yet sent to a model host is cancelled and its tokens are released. Work already running may still finish, and is then charged within its quote.

- Scope: `generate`, `read`
- Parameters: `id` (path, required): The generation ID.
- Success: 200 with [Generation](#generation)
- Send an `Idempotency-Key`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404), [`request_in_progress`](https://docs.halationlab.ai/errors/request-in-progress.md) (409), [`outcome_unknown`](https://docs.halationlab.ai/errors/outcome-unknown.md) (409)

## Projects

### GET /v1/projects

**List projects.** Projects this credential can see, most recently changed first.

- Scope: `read`
- Parameters: `status` (query): Default `active`.; `limit` (query): How many items to return, 1 to 100. Default 20.; `cursor` (query): The `next_cursor` of the previous page.
- Success: 200 with a list of Project
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500)

### POST /v1/projects

**Create a project.** Creates a project. Needs a credential with access to all projects.

- Scope: `projects:write`
- Request body: [ProjectCreate](#projectcreate)
- Success: 201 with [Project](#project)
- Send an `Idempotency-Key`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`project_not_shared`](https://docs.halationlab.ai/errors/project-not-shared.md) (403), [`parameter_invalid`](https://docs.halationlab.ai/errors/parameter-invalid.md) (422), [`limit_reached`](https://docs.halationlab.ai/errors/limit-reached.md) (403)

### GET /v1/projects/{id}

**Get a project.** One project with its brief.

- Scope: `read`
- Parameters: `id` (path, required): The project ID.
- Success: 200 with [Project](#project)
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404)

### PATCH /v1/projects/{id}

**Update a project.** Changes the name, intent or brief.

- Scope: `projects:write`, `read`
- Parameters: `id` (path, required): The project ID.
- Request body: [ProjectUpdate](#projectupdate)
- Success: 200 with [Project](#project)
- Send an `Idempotency-Key`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404), [`parameter_invalid`](https://docs.halationlab.ai/errors/parameter-invalid.md) (422), [`conflict`](https://docs.halationlab.ai/errors/conflict.md) (409)

### POST /v1/projects/{id}/archive

**Archive a project.** Archives a project. Its assets stay available.

- Scope: `projects:write`
- Parameters: `id` (path, required): The project ID.
- Success: 200 with [Project](#project)
- Send an `Idempotency-Key`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404)

## Assets

### GET /v1/assets

**List assets.** Uploads, imports and generated outputs in the projects this credential can see.

- Scope: `read`
- Parameters: `project` (query): Only this project.; `type` (query): Only this kind of file.; `origin` (query): Only uploads, generated outputs or derived copies.; `limit` (query): How many items to return, 1 to 100. Default 20.; `cursor` (query): The `next_cursor` of the previous page.
- Success: 200 with a list of Asset
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404)

### POST /v1/assets

**Import a file.** Adds a file from a public HTTPS URL, or a small file sent inline as a data URI. The asset is `processing` while it is checked, usually a few seconds. For files over about 700 KB that are not online, use `POST /v1/uploads`.

- Scope: `assets:write`, `read`
- Request body: [AssetCreate](#assetcreate)
- Success: 201 with [Asset](#asset)
- Send an `Idempotency-Key`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`consent_required`](https://docs.halationlab.ai/errors/consent-required.md) (403), [`media_fetch_failed`](https://docs.halationlab.ai/errors/media-fetch-failed.md) (422), [`unsupported_media_type`](https://docs.halationlab.ai/errors/unsupported-media-type.md) (415), [`parameter_invalid`](https://docs.halationlab.ai/errors/parameter-invalid.md) (422), [`limit_reached`](https://docs.halationlab.ai/errors/limit-reached.md) (403), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404)

### GET /v1/assets/{id}

**Get an asset.** An asset with a download URL and its expiry.

- Scope: `read`
- Parameters: `id` (path, required): The asset ID.
- Success: 200 with [Asset](#asset)
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404)

### DELETE /v1/assets/{id}

**Delete an asset.** Moves an asset to the account's trash, from which the owner can restore it in the app for 30 days.

- Scope: `assets:write`, `read`
- Parameters: `id` (path, required): The asset ID.
- Success: 200 with [Deleted](#deleted)
- Send an `Idempotency-Key`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404)

### POST /v1/assets/{id}/transform

**Transform an asset.** Makes a cropped, trimmed or resized copy. The copy is a new asset with origin `derived`.

- Scope: `assets:write`, `read`
- Parameters: `id` (path, required): The asset ID.
- Request body: [AssetTransform](#assettransform)
- Success: 201 with [Asset](#asset)
- Send an `Idempotency-Key`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404), [`parameter_invalid`](https://docs.halationlab.ai/errors/parameter-invalid.md) (422), [`media_not_ready`](https://docs.halationlab.ai/errors/media-not-ready.md) (409)

## Uploads

### POST /v1/uploads

**Start an upload.** Starts a direct upload of a large file. PUT the bytes to each URL in `parts` with the headers given, then call complete. Files up to 16 MiB use one PUT; larger files use 16 MiB parts.

- Scope: `assets:write`, `read`
- Request body: [UploadCreate](#uploadcreate)
- Success: 201 with [Upload](#upload)
- Send an `Idempotency-Key`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`consent_required`](https://docs.halationlab.ai/errors/consent-required.md) (403), [`unsupported_media_type`](https://docs.halationlab.ai/errors/unsupported-media-type.md) (415), [`parameter_invalid`](https://docs.halationlab.ai/errors/parameter-invalid.md) (422), [`limit_reached`](https://docs.halationlab.ai/errors/limit-reached.md) (403), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404)

### GET /v1/uploads/{id}

**Get an upload.** An upload's status, the parts that have arrived and, once completed, its asset. Fresh part URLs are issued for parts not yet received.

- Scope: `read`
- Parameters: `id` (path, required): The upload ID.
- Success: 200 with [Upload](#upload)
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404)

### POST /v1/uploads/{id}/complete

**Complete an upload.** Finishes an upload. The file is then checked; the upload is `processing` until its asset is ready.

- Scope: `assets:write`, `read`
- Parameters: `id` (path, required): The upload ID.
- Request body: [UploadComplete](#uploadcomplete)
- Success: 200 with [Upload](#upload)
- Send an `Idempotency-Key`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404), [`parameter_invalid`](https://docs.halationlab.ai/errors/parameter-invalid.md) (422)

## Account

### GET /v1/account

**Get the account.** Who this credential acts for, its permissions and projects, the token balance and what is left of its spending limit.

- Scope: none (any credential)
- Success: 200 with [Account](#account)
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500)

## Webhooks

### GET /v1/webhook_endpoints

**List webhook endpoints.** This credential's webhook endpoints, without their secrets. Every endpoint is on one page (at most 10).

- Scope: `webhooks`, `read`
- Success: 200 with a list of WebhookEndpoint
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500)

### POST /v1/webhook_endpoints

**Create a webhook endpoint.** Registers an HTTPS URL for signed events. The signing secret is in this response only.

- Scope: `webhooks`, `read`
- Request body: [WebhookEndpointCreate](#webhookendpointcreate)
- Success: 201 with [WebhookEndpoint](#webhookendpoint)
- Send an `Idempotency-Key`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`parameter_invalid`](https://docs.halationlab.ai/errors/parameter-invalid.md) (422), [`limit_reached`](https://docs.halationlab.ai/errors/limit-reached.md) (403)

### DELETE /v1/webhook_endpoints/{id}

**Delete a webhook endpoint.** Removes an endpoint. Queued deliveries stop at once.

- Scope: `webhooks`, `read`
- Parameters: `id` (path, required): The endpoint ID.
- Success: 200 with [Deleted](#deleted)
- Send an `Idempotency-Key`.
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`not_found`](https://docs.halationlab.ai/errors/not-found.md) (404)

## Events

### GET /v1/events

**List events.** Events in order, oldest first, for catching up after missed webhooks. Store the last `next_cursor` and pass it next time. Events are kept for 14 days.

- Scope: `read`
- Parameters: `project` (query): Only this project.; `limit` (query): How many events, 1 to 100. Default 50.; `cursor` (query): The `next_cursor` from the previous call. Omit to start from the oldest retained event.
- Success: 200 with a list of Event
- Errors: [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) (401), [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) (401), [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) (429), [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) (500), [`parameter_invalid`](https://docs.halationlab.ai/errors/parameter-invalid.md) (422)

## Schemas

### Error

An error. Every error response has this shape, with a matching HTTP status.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | object | Yes | The error. |

### ModelPrice

A model's published price. Display only: `POST /v1/quotes` gives the binding maximum.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `unit` | string | Yes | What one unit is: a second of output, one image or clip, or characters of text. |
| `from_per_unit` | integer | Yes | The lowest price per unit over the settings in `varies_by`. In tokens. |
| `varies_by` | array | Yes | Parameters that change the price, for example `resolution`. |
| `typical` | object | Yes | A typical request and its price. |
| `discount_percent` | number or null | Yes | An active discount already applied to the figures above, as a percentage, or null. |

### ModelSummary

A model in a list. Read `GET /v1/models/{model}` for its input schema.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | Yes | Always `model`. |
| `id` | string | Yes | A model ID from `GET /v1/models`, for example `seedance-2.5`. |
| `name` | string | Yes | The model's display name. |
| `family` | string | Yes | The model family. |
| `task` | string | Yes | What the model does. One model ID has exactly one task. |
| `output` | string | Yes | What it produces. |
| `status` | string | Yes | `paused` models are listed but refuse new generations for now. |
| `description` | string | Yes | A one-line description. |
| `price` | ModelPrice or null | Yes | The published price, or null when it cannot be priced right now. |
| `terms_url` | string | Yes | The model's docs page, with its parameters and limits. Each quote names the processor that runs the model. |
| `deprecation` | object or null | Yes | Set when the model is deprecated. The response also carries `Deprecation` and `Sunset` headers. |

### Model

A model with the JSON Schema of its `input`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | Yes | Always `model`. |
| `id` | string | Yes | A model ID from `GET /v1/models`, for example `seedance-2.5`. |
| `name` | string | Yes | The model's display name. |
| `family` | string | Yes | The model family. |
| `task` | string | Yes | What the model does. One model ID has exactly one task. |
| `output` | string | Yes | What it produces. |
| `status` | string | Yes | `paused` models are listed but refuse new generations for now. |
| `description` | string | Yes | A one-line description. |
| `price` | ModelPrice or null | Yes | The published price, or null when it cannot be priced right now. |
| `terms_url` | string | Yes | The model's docs page, with its parameters and limits. Each quote names the processor that runs the model. |
| `deprecation` | object or null | Yes | Set when the model is deprecated. The response also carries `Deprecation` and `Sunset` headers. |
| `input_schema` | object | Yes | The JSON Schema (2020-12) of the `input` object this model takes. Defaults are applied for omitted fields; unknown fields are refused. |
| `restrictions` | array | Yes | Plain-language limits that the schema cannot express, for example input clip length rules. |

### Voice

A voice for text-to-speech models.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | Yes | Always `voice`. |
| `id` | string | Yes | The voice ID. Pass it as `input.voice`. |
| `name` | string | Yes | The voice's name. |
| `language` | string | Yes | Its language, as a BCP 47 tag. |
| `models` | array | Yes | The models it works with. |

### Cost

What a generation costs, in tokens.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `quoted_max` | integer | Yes | The binding maximum, fixed before work started. You are never charged more. In tokens. |
| `charged` | integer or null | Yes | Tokens charged so far. Final once `final` is true. Failed and late work is free. In tokens. |
| `final` | boolean | Yes | Whether `charged` is the final charge. |

### Output

One output file. Outputs are project assets and can be used as inputs by their asset ID.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `asset` | string | Yes | An asset ID. |
| `type` | string | Yes | The kind of file. |
| `content_type` | string or null | Yes | The MIME type, for example `video/mp4`. |
| `width` | integer or null | Yes | Width in pixels, for images and videos. |
| `height` | integer or null | Yes | Height in pixels, for images and videos. |
| `duration` | number or null | Yes | Length in seconds, for videos and audio. |
| `url` | string or null | Yes | A download URL. It needs no credentials and expires at `url_expires_at`; read the generation again for a new one. Null while the file is still being checked. |
| `url_expires_at` | string or null | Yes | When `url` stops working. |

### Generation

A generation: one model run that produces one or more outputs.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The generation ID. It stays the same across automatic technical retries. |
| `object` | string | Yes | Always `generation`. |
| `status` | string | Yes | `queued` → `processing` → `completed`, `failed` or `canceled`. The last three are final. |
| `model` | string | Yes | A model ID from `GET /v1/models`, for example `seedance-2.5`. |
| `task` | string | Yes | The model's task. |
| `project` | string | Yes | A project ID. |
| `input` | object | Yes | The model parameters as applied, defaults included. Media inputs are listed by asset ID. |
| `cost` | Cost | Yes |  |
| `outputs` | array | Yes | The output files. Empty until the generation completes. |
| `error` | object or null | Yes | Set when `status` is `failed` or `canceled`. Failed work is never charged. |
| `metadata` | object | Yes | Your own key-value pairs from the request. |
| `poll_after_seconds` | integer or null | Yes | When the status is not final: a sensible wait before reading it again. Null when final. |
| `created_at` | string | Yes | When the generation was created. |
| `started_at` | string or null | Yes | When a model host started the work. |
| `completed_at` | string or null | Yes | When it reached a final status. |

### GenerationCreate

Starts a generation. Send `model` and `input`, or a `quote` you requested earlier.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `model` | string | No | The model ID. Required unless `quote` is sent. |
| `project` | string | No | The project to put the outputs in. Defaults to the credential's default project. |
| `input` | object | No | The model parameters. Their names, types and defaults are the model's `input_schema`. Required unless `quote` is sent. |
| `max_cost` | integer | No | The most you are willing to pay. If the quoted maximum is higher, nothing is created and the response is `402 max_cost_exceeded` with the quote. In tokens. |
| `quote` | string | No | Start from this quote instead of `model` and `input`. The quote must be unused and unexpired. |
| `use_brief` | boolean | No | Apply the project's brief (product, audience, mood) to the prompt. Default false. |
| `metadata` | object | No | Up to 20 key-value pairs of your own (keys up to 40 characters, values up to 500). Returned on the generation and in webhooks. |

### QuoteCreate

Prices a request without starting it. Same body as a generation, without `max_cost` and `quote`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `model` | string | Yes | A model ID from `GET /v1/models`, for example `seedance-2.5`. |
| `project` | string | No | The project the generation would use. Defaults to the credential's default project. |
| `input` | object | Yes | The model parameters, as for a generation. |
| `use_brief` | boolean | No | Price the request with the project's brief applied. Default false. |

### Quote

A binding price for one request. Pass its ID as `quote` to start it within 30 minutes; you are never charged more than `max_cost`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | A quote ID. |
| `object` | string | Yes | Always `quote`. |
| `model` | string | Yes | A model ID from `GET /v1/models`, for example `seedance-2.5`. |
| `project` | string | Yes | A project ID. |
| `input` | object | Yes | The parameters priced, defaults included. |
| `max_cost` | integer | Yes | The binding maximum price. In tokens. |
| `list_cost` | integer or null | Yes | The price before a model discount, when one applies. In tokens. |
| `unit` | string | Yes | The billing unit. |
| `quantity` | number | Yes | How many units are priced. |
| `processor` | string | Yes | The company that will run the model. Named because your content is sent to it. |
| `expires_at` | string | Yes | When the quote can no longer be started. |
| `created_at` | string | Yes | When the quote was made. |

### Brief

A project brief: what the product is and who it is for. Applied to prompts with `use_brief`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `goal` | string | Yes | What the work is for. |
| `product` | string | Yes | The product or service. |
| `audience` | string | Yes | Who it is for. |
| `selling_points` | array | Yes | What to show or say about it. |
| `brand_guidance` | string | Yes | Brand voice and look. |
| `claims_to_avoid` | array | Yes | Claims the work must not make. |
| `mood` | string | Yes | The tone and feel. |
| `story` | string | Yes | A story or structure to follow. |

### Project

A project: a folder for assets and generations.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | A project ID. |
| `object` | string | Yes | Always `project`. |
| `name` | string | Yes | The project name. |
| `intent` | string | Yes | Whether the work is for personal or commercial use. |
| `status` | string | Yes | Archived projects are read-only in the app. |
| `brief` | Brief or null | Yes | The project brief, or null when none is set. |
| `generation_count` | integer | Yes | How many generated assets the project holds. |
| `created_at` | string | Yes | When it was created. |
| `updated_at` | string | Yes | When it last changed. |

### ProjectCreate

Creates a project.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | The project name. |
| `intent` | string | No | Default `unspecified`. |
| `brief` | object | No | An initial brief. Omitted fields are empty. |

### ProjectUpdate

Changes a project. Send only the fields to change.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | No | A new name. |
| `intent` | string | No | A new intent. |
| `brief` | object | No | Brief fields to change. Omitted fields keep their value. |

### Asset

A file in a project: an upload, an import or a generated output.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | An asset ID. |
| `object` | string | Yes | Always `asset`. |
| `project` | string | Yes | A project ID. |
| `name` | string | Yes | The file's label. |
| `type` | string | Yes | The kind of file. |
| `content_type` | string or null | Yes | The MIME type. |
| `origin` | string | Yes | Where it came from. `derived` is a transformed copy. |
| `status` | string | Yes | `processing` while the file is checked; only `ready` assets can be used or downloaded. |
| `width` | integer or null | Yes | Width in pixels. |
| `height` | integer or null | Yes | Height in pixels. |
| `duration` | number or null | Yes | Length in seconds. |
| `bytes` | integer | Yes | Size in bytes. |
| `generation` | string or null | Yes | The generation that made it, for generated assets. |
| `url` | string or null | Yes | A download URL that needs no credentials, valid until `url_expires_at`. Null unless `status` is `ready`. |
| `url_expires_at` | string or null | Yes | When `url` stops working. |
| `created_at` | string | Yes | When it was added. |

### AssetCreate

Adds a file to a project from a public HTTPS URL, or from a small file sent inline as a data URI.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | No | A public HTTPS URL to fetch. Up to 100 MB; it must answer within 20 seconds. |
| `data` | string | No | A base64 data URI of a file up to about 700 KB. Use `POST /v1/uploads` for larger files. |
| `project` | string | No | The project. Defaults to the credential's default project. |
| `name` | string | No | A label. Defaults to the file name in the URL. |

### AssetTransform

Makes a cropped, trimmed or resized copy of an asset. The copy is a new asset.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `crop` | object | No | A rectangle to keep, in source pixels from the top-left corner. |
| `trim` | object | No | The part of a video or audio file to keep, in seconds. |
| `resize` | object | No | The output size in pixels. |

### Upload

A direct upload of a large file. The SDKs handle this for you.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | An upload ID. |
| `object` | string | Yes | Always `upload`. |
| `status` | string | Yes | `pending` until you complete it, `processing` while it is checked, then `completed` (see `asset`) or `failed`. |
| `name` | string | Yes | The file name. |
| `content_type` | string | Yes | The declared MIME type. |
| `size` | integer | Yes | The declared size in bytes. |
| `part_size` | integer or null | Yes | The size of every part but the last, for multi-part uploads; null for a single PUT. |
| `parts` | array | Yes | Where to PUT the bytes. Empty once the upload is completed. |
| `received_parts` | array | Yes | Part numbers already received, for resuming. |
| `asset` | string or null | Yes | The resulting asset, once `completed`. |
| `error` | object or null | Yes | Set when `failed`. |
| `expires_at` | string | Yes | When an unfinished upload is discarded. |
| `created_at` | string | Yes | When it was created. |

### UploadCreate

Starts an upload. The response gives the URLs to PUT the bytes to.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | The file name. |
| `content_type` | string | Yes | The MIME type, for example `image/png` or `video/mp4`. |
| `size` | integer | Yes | The file size in bytes. |
| `sha256` | string | Yes | The SHA-256 of the whole file, as 64 lower-case hex characters. The upload URLs only accept these exact bytes. |
| `project` | string | No | The project. Defaults to the credential's default project. |

### UploadComplete

Finishes an upload once every part has been sent.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `parts` | array | No | For multi-part uploads: every part with its `ETag`. Omit for a single PUT. |

### Account

Who this credential acts for, what it may do and what it may still spend.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | Yes | Always `account`. |
| `balance` | object or null | Yes | The account's token balance. Null when the credential cannot read it (an OAuth app without the `read` scope). |
| `spending_limit` | object or null | Yes | The spending limit for this credential, or null when it has no spending authority yet. |
| `credential` | object | Yes | The credential this request used. |
| `uploads_allowed` | boolean | Yes | Whether the owner accepted the upload rights and processing terms for this credential. |

### WebhookEndpoint

A URL that receives signed events. Signed with Standard Webhooks.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | A webhook endpoint ID. |
| `object` | string | Yes | Always `webhook_endpoint`. |
| `url` | string | Yes | The HTTPS URL events are POSTed to. |
| `events` | array | Yes | The event types it receives. |
| `projects` | string or array | Yes | `all`, or the projects whose events it receives. |
| `status` | string | Yes | `failing` after repeated delivery failures; deliveries continue. |
| `secret` | string or null | Yes | The signing secret (`whsec_…`). Shown only in the response that creates the endpoint. |
| `last_delivery_at` | string or null | Yes | When an event was last delivered. |
| `last_error` | string or null | Yes | The last delivery error, if any. |
| `created_at` | string | Yes | When it was created. |

### WebhookEndpointCreate

Registers a webhook endpoint.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | Yes | A public HTTPS URL on port 443. |
| `events` | array | No | Default: the three final events. |
| `projects` | array | No | Limit events to these projects. Default: every project the credential can see. |

### Event

Something that happened. Webhooks POST this object; `GET /v1/events` lists them.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The event ID. Use it to deduplicate: an event can be delivered more than once. |
| `object` | string | Yes | Always `event`. |
| `type` | string | Yes | `generation.updated` fires on every status change; the others only on that final status. |
| `created_at` | string | Yes | When it happened. |
| `data` | Generation | Yes | The generation, as `GET /v1/generations/{id}` answers it: when the event was sent (webhooks) or read (`GET /v1/events`). |

### Deleted

The answer to a delete.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The deleted object's ID. |
| `object` | string | Yes | The kind of object deleted. |
| `deleted` | boolean | Yes | Always true. |

Source: https://docs.halationlab.ai/api/
