# HalationLab.ai API > Frontier video models, briefed on your product. Generate video, images and audio with one API, priced before you spend. Frontier video models, briefed on your product. The HalationLab.ai API runs video, image and audio models behind one request shape. Every paid request is quoted first: the maximum is fixed and reserved before work starts, and you are never charged more. Failed work is free. ## Start here - [Quickstart](https://docs.halationlab.ai/quickstart.md): create an API key and make your first video with one `curl`. - [Authentication](https://docs.halationlab.ai/authentication.md): API keys for your own account, OAuth for apps that act for other people. - [Concepts](https://docs.halationlab.ai/concepts.md): models and tasks, projects, assets, generations, quotes, tokens and spending limits. - [Models](https://docs.halationlab.ai/models.md): every model, its parameters and an example request. ## Build - [Generating video and images](https://docs.halationlab.ai/guides/generating.md) and the [edit tools](https://docs.halationlab.ai/guides/edit-tools.md). - [Waiting and polling](https://docs.halationlab.ai/guides/waiting-and-polling.md), or [webhooks](https://docs.halationlab.ai/guides/webhooks.md) to be told when work finishes. - [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md), [spending limits](https://docs.halationlab.ai/guides/spending-limits.md) and [errors](https://docs.halationlab.ai/guides/errors.md). - [SDKs](https://docs.halationlab.ai/sdks/typescript.md) for TypeScript and Python, and the [MCP server](https://docs.halationlab.ai/agents/connect.md) for AI assistants. ## Reference - [API reference](https://docs.halationlab.ai/api.md), interactive, generated from the [OpenAPI document](https://docs.halationlab.ai/openapi.json). - [Error codes](https://docs.halationlab.ai/errors.md) and [billing outcomes](https://docs.halationlab.ai/billing-outcomes.md). - For tools and language models: [llms.txt](https://docs.halationlab.ai/llms.txt), [llms-full.txt](https://docs.halationlab.ai/llms-full.txt), and every page as Markdown at the same path with `.md`, such as [/quickstart.md](https://docs.halationlab.ai/quickstart.md). Base URL: `https://api.halationlab.ai/v1`. Source: https://docs.halationlab.ai/ --- # Quickstart > Create an API key and make your first video with the HalationLab.ai API in under five minutes. You need a HalationLab.ai account with tokens in it and a terminal with `curl`. ## 1. Create an API key 1. In the HalationLab.ai app, open **Account → Developers** and create a key. 2. Choose the projects it can use (all by default) and its spending limit (on by default, resets monthly). 3. Copy the key. It starts with `hl_live_` and is shown only once. Put it in an environment variable for the commands below: ```sh export HALATIONLAB_API_KEY="hl_live_..." ``` > **Keep the key on your server:** An API key spends tokens from your account. Never put it in a web page, a mobile app or a public repository. Apps that run in a browser use [OAuth](https://docs.halationlab.ai/apps/oauth.md) instead. ## 2. Generate a video ```sh # Generates a 5-second video and waits up to 60 seconds for it. Spends at most 400 tokens. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" curl -sS --fail-with-body "$API/generations" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2.5", "input": { "prompt": "A red fox running through snow", "duration": 5, "aspect_ratio": "16:9" }, "max_cost": 400 }' ``` What this request does: - `model` and `input` say what to make. `input` follows the model's parameters; see [Seedance 2.5](https://docs.halationlab.ai/models/seedance-2.5.md). - `max_cost` is the most you will pay, in tokens. If the quoted price is higher, nothing is created or charged and the answer is [`402 max_cost_exceeded`](https://docs.halationlab.ai/errors/max-cost-exceeded.md) with the quote. - `Idempotency-Key` makes a retry safe: sending the same request again with the same key never starts a second video. See [Idempotency](https://docs.halationlab.ai/guides/idempotency.md). - `Prefer: wait=60` holds the response for up to 60 seconds until the video is ready. The answer is a generation (`201`). When it has finished, `status` is `completed` and `outputs[0].url` is the video: ```json { "id": "gen_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "object": "generation", "status": "completed", "model": "seedance-2.5", "cost": { "quoted_max": 380, "charged": 372, "final": true }, "outputs": [ { "asset": "asset_01JD3Y7M2K8P4W6R0T3V5X9Z1B", "type": "video", "url": "https://app.halationlab.ai/media/d/…", "url_expires_at": "2026-11-28T11:41:12Z" } ], "poll_after_seconds": null } ``` If the video is not ready within 60 seconds, `status` is still `queued` or `processing`: read the generation again with `GET /v1/generations/{id}` (it accepts `Prefer: wait=60` too), waiting `poll_after_seconds` between reads. See [Waiting and polling](https://docs.halationlab.ai/guides/waiting-and-polling.md). The download URL needs no credentials and expires after an hour; read the generation again for a fresh one. ## 3. The same with an SDK TypeScript (`npm install @halationlab/sdk`): ```ts // Generates a 5-second video with the TypeScript SDK and prints its download URL. Spends at most 400 tokens. import { HalationLab } from '@halationlab/sdk'; const hl = new HalationLab({ apiKey: process.env.HALATIONLAB_API_KEY }); // run() starts the generation and waits until it is completed, failed or canceled. const generation = await hl.generations.run({ model: 'seedance-2.5', input: { prompt: 'A red fox running through snow', duration: 5, aspect_ratio: '16:9' }, max_cost: 400, }); console.log(generation.status, generation.cost.charged, generation.outputs[0]?.url); ``` Python (`pip install halationlab`): ```python # Generates a 5-second video with the Python SDK and prints its download URL. Spends at most 400 tokens. import os from halationlab import HalationLab client = HalationLab(api_key=os.environ["HALATIONLAB_API_KEY"]) # run() starts the generation and waits until it is completed, failed or canceled. generation = client.generations.run( model="seedance-2.5", input={"prompt": "A red fox running through snow", "duration": 5, "aspect_ratio": "16:9"}, max_cost=400, ) print(generation["status"], generation["cost"]["charged"], generation["outputs"][0]["url"] if generation["outputs"] else None) ``` `run()` starts the generation and waits for a final status, so you do not write the polling loop yourself. ## Next - [Authentication](https://docs.halationlab.ai/authentication.md): what a key can do and how long it lasts. - [Generating video and images](https://docs.halationlab.ai/guides/generating.md): images, image to video from a URL, and your own files. - [Webhooks](https://docs.halationlab.ai/guides/webhooks.md): be told when work finishes instead of waiting. - [Go-live checklist](https://docs.halationlab.ai/go-live.md) before you ship. Source: https://docs.halationlab.ai/quickstart/ --- # Authentication > Authenticate with an API key for your own account, or an OAuth access token for apps that act for other HalationLab.ai users. Every request sends one credential in the `Authorization` header: ```http Authorization: Bearer hl_live_... ``` There are two kinds: | | API key | OAuth access token | | --- | --- | --- | | For | Your own account: scripts, servers, back ends | Apps that act for other HalationLab.ai users | | Created | In the app, at **Account → Developers** | By the [OAuth flow](https://docs.halationlab.ai/apps/oauth.md), after the user approves your app | | Permissions | Every scope | The scopes the user granted | | Spending | The spending limit you set for the key | The spending limit the user set when connecting your app | | Where it may live | Your server only | A server, or a browser app (public client with PKCE) | `GET /v1/models` and `GET /v1/models/{model}` need no credential. ## API keys A key acts for its owner's account, within the projects chosen for it (all projects by default) and its [spending limit](https://docs.halationlab.ai/guides/spending-limits.md) (on by default, resets monthly; it can be switched off, and the key can then spend up to the account balance). - A key starts with `hl_live_` and is shown once, when you create it. HalationLab.ai stores only a hash, so a lost key cannot be shown again: create a new one. - A key holds every scope. - A key that is not used for 30 days expires. Create a new one, or use keys at least monthly. - You can revoke a key at any time in **Account → Developers**. A revoked or mistyped key gets [`401 api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md). - Creating keys and changing their projects or spending limits is possible only in the app, never through the API. > **Never put an API key in a browser or app:** Keep keys on your server, in an environment variable or a secret manager. Never ship one in a web page, a mobile or desktop app, or a repository. The API allows cross-origin calls so that browser apps can use OAuth access tokens; that does not make it safe to use an API key there. ## OAuth access tokens Apps that act for other people use OAuth 2.0 authorisation code with PKCE, and send the access token as `Authorization: Bearer …`. The user chooses what your app may do and sets its spending limit on the consent screen. See [For app builders](https://docs.halationlab.ai/apps/register.md). ## Scopes | Scope | Allows | | --- | --- | | `read` | Read models, projects, assets, generations, the account and events. | | `projects:write` | Create and change projects. | | `assets:write` | Upload and import files, and make transformed copies. | | `generate` | Start and cancel paid generations within the spending limit the account owner set. | | `webhooks` | Register and remove webhook endpoints. | | `offline_access` | Receive a refresh token (OAuth only). | API keys hold all of these. `GET /v1/account` needs no scope. A request without the scope it needs gets [`403 insufficient_scope`](https://docs.halationlab.ai/errors/insufficient-scope.md), with the missing scopes in `details.required_scopes`. The [scopes page](https://docs.halationlab.ai/apps/scopes.md) lists the scope each endpoint needs. ## Uploading needs consent Uploading or importing files needs the account owner's acceptance of the upload rights and processing terms for that credential. It is given when the key is created, or on the OAuth consent page. Without it, uploads and imports get [`403 consent_required`](https://docs.halationlab.ai/errors/consent-required.md) with a `manage_url` where the owner can accept. ## Check a credential `GET /v1/account` shows who the credential acts for, its scopes and projects, the balance and what is left of its spending limit: ```sh # Shows who the API key acts for, its balance and what is left of its spending limit. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" curl -sS --fail-with-body "$API/account" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" ``` ## Errors | Status | Code | Meaning | | --- | --- | --- | | 401 | [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) | No credential was sent. | | 401 | [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) | The API key is revoked, expired or mistyped. | | 401 | [`access_token_invalid`](https://docs.halationlab.ai/errors/access-token-invalid.md) | The access token is invalid or expired, or the connection has ended. | | 403 | [`insufficient_scope`](https://docs.halationlab.ai/errors/insufficient-scope.md) | The credential lacks a scope this request needs. | Source: https://docs.halationlab.ai/authentication/ --- # Concepts > Models and tasks, projects, assets, generations, quotes, tokens and spending limits. ## Models and tasks A model is identified by a stable ID such as `seedance-2.5`. Each model ID has exactly one **task**, the kind of work it does, and one output type. The same underlying model can appear under several IDs, one per task: `seedance-2.5` (text to video), `seedance-2.5-image-to-video`, `seedance-2.5-extend` and so on. | Task | Output | Models | | --- | --- | --- | | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | video | 15 | | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | video | 15 | | [`reference-to-video`](https://docs.halationlab.ai/models.md#reference-to-video) | video | 9 | | [`extend-video`](https://docs.halationlab.ai/models.md#extend-video) | video | 3 | | [`edit-video`](https://docs.halationlab.ai/models.md#edit-video) | video | 4 | | [`reframe-video`](https://docs.halationlab.ai/models.md#reframe-video) | video | 2 | | [`upscale-video`](https://docs.halationlab.ai/models.md#upscale-video) | video | 3 | | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | image | 16 | | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | image | 17 | | [`expand-image`](https://docs.halationlab.ai/models.md#expand-image) | image | 1 | | [`upscale-image`](https://docs.halationlab.ai/models.md#upscale-image) | image | 1 | | [`text-to-speech`](https://docs.halationlab.ai/models.md#text-to-speech) | audio | 2 | | [`text-to-sound`](https://docs.halationlab.ai/models.md#text-to-sound) | audio | 1 | `GET /v1/models` lists them and `GET /v1/models/{model}` gives one model's `input_schema`, the JSON Schema of its parameters. The [model pages](https://docs.halationlab.ai/models.md) show the same thing. A model whose `status` is `paused` is listed but refuses new generations for now. ## Projects A project is a folder for assets and generations, with an optional [brief](https://docs.halationlab.ai/guides/projects-and-assets.md) that describes the product and audience. A request that names no project uses the credential's default project. An API key can be limited to some projects; it cannot see the others. ## Assets An asset is a file in a project: an upload, an import from a URL, a generated output or a transformed copy. Assets are `processing` while they are checked, then `ready` or `failed`. Only ready assets can be used or downloaded. Every generated output is an asset, so it can be the input of the next generation. ## Generations A generation is one model run that produces one or more outputs. Its status moves `queued` → `processing` → `completed`, `failed` or `canceled`; the last three are final. The ID never changes, also when a failed attempt is retried automatically. See [Generating video and images](https://docs.halationlab.ai/guides/generating.md). ## Quotes A quote is a binding price for one request. `POST /v1/generations` quotes and starts in one step; `POST /v1/quotes` prices a request without starting it, and the quote can be started within 30 minutes. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Tokens Money is counted in **tokens**, the same unit the app shows. Every amount in the API is a whole number of tokens: `max_cost`, `cost.quoted_max`, `cost.charged`, balances and limits. Tokens are added to the account in the app. A generation reserves its quoted maximum (`cost.quoted_max`) before work starts and is never charged more. Failed work, work cancelled before it was sent to a model host, and late results are free. See [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md). ## Spending limits Spending is limited per credential by a person in the app: an amount per period, optionally with a cap per generation. An API key's limit is on by default and can be switched off; an OAuth app's limit is set by the user who connects it. No API call can create or raise a limit. See [Spending limits](https://docs.halationlab.ai/guides/spending-limits.md). ## Conventions - JSON in and out with `Content-Type: application/json`, snake_case fields, US spelling in identifiers. - Prefixed IDs: `gen_` generation, `asset_` asset, `proj_` project, `quote_` quote, `upl_` upload, `we_` webhook endpoint, `evt_` event, `key_` API key. - Timestamps are RFC 3339 UTC strings named `…_at`. Durations are seconds. - Lists take `?limit=` (1 to 100, default 20) and `?cursor=`, and answer `{ "object": "list", "data": [...], "has_more", "next_cursor" }`. - Request bodies are strict: an unknown field is [`422 parameter_unknown`](https://docs.halationlab.ai/errors/parameter-unknown.md). Response objects may gain fields at any time, so ignore fields you do not know. - Every response has a `Request-Id` header. Quote it when you contact [support](https://docs.halationlab.ai/support.md). Source: https://docs.halationlab.ai/concepts/ --- # Go-live checklist > What to check before an integration with the HalationLab.ai API goes to production. ## Credentials - [ ] API keys live only on your server, in an environment variable or a secret manager. None is in client code, logs or a repository. - [ ] Each key has the projects and [spending limit](https://docs.halationlab.ai/guides/spending-limits.md) it needs, and no more. - [ ] You know that a key unused for 30 days expires, and keys you rely on are used at least that often. - [ ] Apps that act for other people use [OAuth](https://docs.halationlab.ai/apps/oauth.md), not your API key. - [ ] If you upload or import files, the upload rights and processing terms are accepted for the credential. ## Money - [ ] Every paid start sends `max_cost`, or starts from a [quote](https://docs.halationlab.ai/guides/pricing-and-quotes.md) you checked. - [ ] You handle `402 insufficient_balance`, `402 spending_limit_reached` and `402 max_cost_exceeded`, and show `manage_url` to the account owner where one is given. - [ ] You read `cost.charged` once `cost.final` is true, rather than assuming the quoted maximum was charged. ## Reliability - [ ] Every `POST`, `PATCH` and `DELETE` sends an `Idempotency-Key`, and a retry reuses the key of the request it repeats. See [Idempotency](https://docs.halationlab.ai/guides/idempotency.md). - [ ] You retry only when the response has `Retry-After`, and wait that long. See [Errors](https://docs.halationlab.ai/guides/errors.md) and [Rate limits](https://docs.halationlab.ai/guides/rate-limits.md). - [ ] You wait for results with [webhooks](https://docs.halationlab.ai/guides/webhooks.md) or by polling at `poll_after_seconds`, not in a tight loop. - [ ] Webhooks verify the signature on the raw body, reject old timestamps, deduplicate on `webhook-id` and answer 2xx within 10 seconds. - [ ] After downtime you catch up with `GET /v1/events`. - [ ] Output URLs expire after an hour: you download or store outputs promptly, or read the object again for a fresh URL. ## Compatibility - [ ] Your code ignores response fields it does not know. - [ ] You log the `Request-Id` of failed requests. - [ ] You read a model's `deprecation` field (and the `Deprecation` and `Sunset` headers), and have a plan for its `replacement`. See [Versioning](https://docs.halationlab.ai/guides/versioning.md). ## Content - [ ] Your prompts and inputs follow the [acceptable use policy](https://halationlab.ai/legal/acceptable-use), and you handle `403 content_blocked` and failed generations. See [Moderation and acceptable use](https://docs.halationlab.ai/guides/moderation.md). Source: https://docs.halationlab.ai/go-live/ --- # Generating video and images > Start a generation with one call, pass media by URL, asset or generation ID, and read the outputs. One request quotes the work, checks it against `max_cost` and the spending limit, reserves the quoted maximum and starts it: `POST /v1/generations`. The answer is `201` with the generation. ## The request | Field | Required | Description | | --- | --- | --- | | `model` | Yes, unless `quote` is sent | The model ID, for example `seedance-2.5`. See [Models](https://docs.halationlab.ai/models.md). | | `input` | Yes, unless `quote` is sent | The model's parameters. Their names, types and defaults are the model's `input_schema`. | | `max_cost` | No | The most you will pay, in tokens. If the quoted maximum is higher, nothing is created and the answer is `402 max_cost_exceeded` with the quote. Without it the spending limit is the only ceiling. | | `project` | No | Where the outputs go. Defaults to the credential's default project. | | `quote` | No | Start a quote you requested earlier instead of sending `model` and `input`. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). | | `use_brief` | No | Apply the project's brief to the prompt. Default `false`. See [Projects and assets](https://docs.halationlab.ai/guides/projects-and-assets.md). | | `metadata` | No | Up to 20 key-value strings of your own (keys up to 40 characters, values up to 500). Returned on the generation and in webhooks. | Send an `Idempotency-Key` with every start, so that a retry after a timeout never starts a second generation. ## Text to video ```sh # Generates a 5-second video and waits up to 60 seconds for it. Spends at most 400 tokens. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" curl -sS --fail-with-body "$API/generations" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2.5", "input": { "prompt": "A red fox running through snow", "duration": 5, "aspect_ratio": "16:9" }, "max_cost": 400 }' ``` ## Text to image ```sh # Generates one square image. Spends at most 100 tokens; if the price is higher, nothing starts. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" curl -sS --fail-with-body "$API/generations" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d '{ "model": "flux.2-pro", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" }, "max_cost": 100 }' ``` ## Image to video from a URL Media parameters take a public HTTPS URL directly. The file is imported into the project as an asset first, then used: ```sh # Animates an image from a public URL. The URL is imported as an asset first. Spends at most 400 tokens. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" IMAGE="${HL_SAMPLE_IMAGE_URL:-https://docs.halationlab.ai/media/sample-image.png}" curl -sS --fail-with-body "$API/generations" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Extend, edit, reframe, upscale and expand existing media, and change only a region of an image. Edit tools are models whose task works on existing media. They use the same call as any generation, `POST /v1/generations`, with the media to change in `source` (and sometimes `references`). `source` takes an asset ID, a generation ID, a public HTTPS URL or a small data URI, so the output of one generation can go straight into the next. Each model's page lists its exact parameters, limits and an example. ## Extend a video Continues a video with new footage. `duration` is the length added. ```sh # Extends a video by 5 seconds. SOURCE is an asset ID, a generation ID or a public HTTPS URL. Spends at most 400 tokens. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" SOURCE="${HL_VIDEO:-https://docs.halationlab.ai/media/sample-video.mp4}" curl -sS --fail-with-body "$API/generations" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Wait for a generation with Prefer wait, then poll at poll_after_seconds until it is final. A generation is final when its `status` is `completed`, `failed` or `canceled`. There are three ways to get there. ## Wait in the request Send `Prefer: wait=N`, with N up to 60, on `POST /v1/generations` or `GET /v1/generations/{id}`. The response is held until the generation is final or N seconds pass. Either way the answer is the generation, with `Preference-Applied: wait=N`. ## Poll When the status is not final, `poll_after_seconds` suggests how long to wait before reading it again. Combine both: read with `Prefer: wait=60`, and if it is still not final, wait `poll_after_seconds` and read again. ```ts // Starts a generation, then reads it until it is final, with fetch only. Spends at most 100 tokens. // Run it with Node 22.18 or later (`node start-and-poll.ts`) or `npx tsx start-and-poll.ts`. const API = process.env.HL_API_BASE ?? 'https://api.halationlab.ai/v1'; const auth = { Authorization: `Bearer ${process.env.HALATIONLAB_API_KEY}` }; const FINAL = ['completed', 'failed', 'canceled']; async function api(path: string, init: RequestInit = {}) { const res = await fetch(`${API}${path}`, { ...init, headers: { ...auth, 'Content-Type': 'application/json', ...init.headers } }); const body = await res.json(); if (!res.ok) throw new Error(`${res.status} ${body.error.code}: ${body.error.message} (${body.error.request_id})`); return body; } // Prefer: wait=60 holds the response until the generation is final or 60 seconds pass. let generation = await api('/generations', { method: 'POST', headers: { 'Idempotency-Key': crypto.randomUUID(), Prefer: 'wait=60' }, body: JSON.stringify({ model: 'flux.2-pro', input: { prompt: 'A red ceramic mug on a linen tablecloth' }, max_cost: 100 }), }); // Not final yet: wait the suggested time, then read it again (each read can also wait up to 60 seconds). while (!FINAL.includes(generation.status)) { await new Promise(resolve => setTimeout(resolve, (generation.poll_after_seconds ?? 5) * 1000)); generation = await api(`/generations/${generation.id}`, { headers: { Prefer: 'wait=60' } }); } console.log(generation.id, generation.status, `charged ${generation.cost.charged} of at most ${generation.cost.quoted_max} tokens`); for (const output of generation.outputs) console.log(output.type, output.url); export {}; ``` The same loop for an existing generation, in Python with the standard library: ```python # Reads a generation until it is final, using only the standard library. Reading is free. # Usage: HL_GENERATION_ID=gen_... python3 poll.py import json import os import time import urllib.request API = os.environ.get("HL_API_BASE", "https://api.halationlab.ai/v1") KEY = os.environ["HALATIONLAB_API_KEY"] FINAL = {"completed", "failed", "canceled"} def get_generation(generation_id: str) -> dict: # Prefer: wait=60 holds the response until the generation is final or 60 seconds pass. request = urllib.request.Request( f"{API}/generations/{generation_id}", headers={"Authorization": f"Bearer {KEY}", "Prefer": "wait=60"}, ) with urllib.request.urlopen(request, timeout=90) as response: return json.load(response) generation = get_generation(os.environ["HL_GENERATION_ID"]) while generation["status"] not in FINAL: time.sleep(generation["poll_after_seconds"] or 5) generation = get_generation(generation["id"]) print(generation["id"], generation["status"], generation["cost"]) for output in generation["outputs"]: print(output["type"], output["url"]) ``` The SDKs do this for you: `hl.generations.run()` in TypeScript and `client.generations.run()` in Python start a generation and return it once it is final. ## Be told Register a [webhook endpoint](https://docs.halationlab.ai/guides/webhooks.md) and start generations without waiting. A `generation.completed` event carries the whole generation, outputs included, so no follow-up call is needed. ## Good practice - Keep polling slow: use `poll_after_seconds`, and never poll in a tight loop. Reads count towards the [rate limit](https://docs.halationlab.ai/guides/rate-limits.md) of 300 a minute. - Do not assume a generation failed because a request timed out. Read it again; its ID never changes, also when a failed attempt is retried automatically. - A `failed` generation has `error.code` and `error.message`, and is never charged. Source: https://docs.halationlab.ai/guides/waiting-and-polling/ --- # Webhooks > Receive signed generation events (Standard Webhooks), verify them, deduplicate on webhook-id and recover missed events. A webhook endpoint is an HTTPS URL on your server that receives an event each time a generation reaches a final status. Events are signed with [Standard Webhooks](https://www.standardwebhooks.com/), so any Standard Webhooks library can verify them. ## Register an endpoint ```sh # Registers your HTTPS endpoint for final generation events. The response holds the signing secret, once. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" curl -sS --fail-with-body "$API/webhook_endpoints" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{ \"url\": \"$HL_WEBHOOK_URL\", \"events\": [\"generation.completed\", \"generation.failed\", \"generation.canceled\"] }" ``` - `url` must be a public HTTPS URL on port 443. - `events` defaults to the three final events: `generation.completed`, `generation.failed` and `generation.canceled`. `generation.updated` fires on every status change. - `projects` limits events to some projects. By default the endpoint receives events from every project the credential can see. The response holds the signing secret (`whsec_…`) once. Store it with your other secrets; it is not shown again. An endpoint belongs to the credential that created it: an API key, or an OAuth app's connection to one user. List endpoints with `GET /v1/webhook_endpoints` and remove one with `DELETE /v1/webhook_endpoints/{id}`. ## The delivery Each delivery is a `POST` of the event object: ```json { "id": "evt_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "object": "event", "type": "generation.completed", "created_at": "2026-11-28T10:41:12Z", "data": { "id": "gen_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "object": "generation", "status": "completed", "outputs": ["…"], "cost": { "quoted_max": 380, "charged": 372, "final": true } } } ``` `data` is the whole generation, as `GET /v1/generations/{id}` returned it at the time, so no follow-up call is needed. Its output URLs expire after an hour like any other. With these headers: | Header | Value | | --- | --- | | `webhook-id` | The event ID. The same on every retry of this event. | | `webhook-timestamp` | Unix seconds when this attempt was signed. | | `webhook-signature` | `v1,`. During a secret rotation, several space-separated signatures. | ## Verify the signature The signature is the base64 HMAC-SHA256 of `${webhook-id}.${webhook-timestamp}.${raw body}`, keyed with the base64-decoded part of the secret after `whsec_`. Accept the delivery if any `v1` signature matches, and reject timestamps more than 5 minutes from now. > **Caution:** Verify the raw request body exactly as received. Parsing and re-serialising the JSON first changes the bytes, and the signature no longer matches. TypeScript, with `node:crypto` only: ```ts // Verifies a HalationLab.ai webhook (Standard Webhooks) with node:crypto only. Run it to check it against a signed // test event: `node verify.ts` (Node 22.18+) or `npx tsx verify.ts`. import { createHmac, timingSafeEqual } from 'node:crypto'; const TOLERANCE_SECONDS = 5 * 60; /** Returns the event if the signature is valid and fresh; throws otherwise. `rawBody` must be the exact bytes received. */ export function verifyWebhook(rawBody: string, headers: Record, secret: string, nowSeconds = Date.now() / 1000) { const id = headers['webhook-id']; const timestamp = headers['webhook-timestamp']; const signatures = headers['webhook-signature']; if (!id || !timestamp || !signatures) throw new Error('Missing webhook-id, webhook-timestamp or webhook-signature.'); if (Math.abs(nowSeconds - Number(timestamp)) > TOLERANCE_SECONDS) throw new Error('Timestamp is more than 5 minutes from now.'); // The key is the base64-decoded part of the secret after `whsec_`. const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64'); const expected = createHmac('sha256', key).update(`${id}.${timestamp}.${rawBody}`).digest(); // During a secret rotation the header carries several space-separated `v1,` signatures. const valid = signatures.split(' ').some(entry => { const [version, signature] = entry.split(','); if (version !== 'v1' || !signature) return false; const received = Buffer.from(signature, 'base64'); return received.length === expected.length && timingSafeEqual(received, expected); }); if (!valid) throw new Error('No valid signature.'); return JSON.parse(rawBody) as { id: string; type: string; created_at: string; data: Record }; } // Self-check with a test secret: a correctly signed event passes, a tampered body fails. if (import.meta.url === new URL(`file://${process.argv[1]}`).href) { const secret = `whsec_${Buffer.from('test-secret-for-the-docs-sample').toString('base64')}`; const body = JSON.stringify({ id: 'evt_01JD3Y5RJ6M3XW6J8K2N4P7Q9T', object: 'event', type: 'generation.completed', created_at: '2026-11-28T10:41:12Z', data: {} }); const timestamp = String(Math.floor(Date.now() / 1000)); const key = Buffer.from(secret.slice('whsec_'.length), 'base64'); const signature = createHmac('sha256', key).update(`evt_01JD3Y5RJ6M3XW6J8K2N4P7Q9T.${timestamp}.${body}`).digest('base64'); const headers = { 'webhook-id': 'evt_01JD3Y5RJ6M3XW6J8K2N4P7Q9T', 'webhook-timestamp': timestamp, 'webhook-signature': `v1,${signature}` }; console.log('valid event:', verifyWebhook(body, headers, secret).type); try { verifyWebhook(body.replace('completed', 'failed'), headers, secret); throw new Error('tampered body was accepted'); } catch (e) { if ((e as Error).message !== 'No valid signature.') throw e; console.log('tampered body rejected'); } } ``` Python, with the standard library only: ```python # Verifies a HalationLab.ai webhook (Standard Webhooks) with the standard library only. Run it to check it against a # signed test event: python3 verify.py import base64 import hashlib import hmac import json import time TOLERANCE_SECONDS = 5 * 60 def verify_webhook(raw_body: bytes, headers: dict, secret: str, now: float | None = None) -> dict: """Returns the event if the signature is valid and fresh; raises ValueError otherwise. `raw_body` must be the exact bytes received; `headers` keys are lower case. """ msg_id = headers.get("webhook-id") timestamp = headers.get("webhook-timestamp") signatures = headers.get("webhook-signature") if not msg_id or not timestamp or not signatures: raise ValueError("Missing webhook-id, webhook-timestamp or webhook-signature.") if abs((now or time.time()) - int(timestamp)) > TOLERANCE_SECONDS: raise ValueError("Timestamp is more than 5 minutes from now.") # The key is the base64-decoded part of the secret after `whsec_`. key = base64.b64decode(secret.removeprefix("whsec_")) signed = msg_id.encode() + b"." + timestamp.encode() + b"." + raw_body expected = base64.b64encode(hmac.new(key, signed, hashlib.sha256).digest()).decode() # During a secret rotation the header carries several space-separated `v1,` signatures. for entry in signatures.split(" "): version, _, signature = entry.partition(",") if version == "v1" and hmac.compare_digest(signature, expected): return json.loads(raw_body) raise ValueError("No valid signature.") if __name__ == "__main__": # Self-check with a test secret: a correctly signed event passes, a tampered body fails. secret = "whsec_" + base64.b64encode(b"test-secret-for-the-docs-sample").decode() body = json.dumps({"id": "evt_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "object": "event", "type": "generation.completed", "created_at": "2026-11-28T10:41:12Z", "data": {}}).encode() ts = str(int(time.time())) key = base64.b64decode(secret.removeprefix("whsec_")) sig = base64.b64encode(hmac.new(key, b"evt_01JD3Y5RJ6M3XW6J8K2N4P7Q9T." + ts.encode() + b"." + body, hashlib.sha256).digest()).decode() headers = {"webhook-id": "evt_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "webhook-timestamp": ts, "webhook-signature": f"v1,{sig}"} print("valid event:", verify_webhook(body, headers, secret)["type"]) try: verify_webhook(body.replace(b"completed", b"failed"), headers, secret) raise SystemExit("tampered body was accepted") except ValueError: print("tampered body rejected") ``` With the SDKs: ```ts // Verifies a webhook with the TypeScript SDK. Pass the raw body exactly as received, not re-serialised JSON. import { HalationLab } from '@halationlab/sdk'; const hl = new HalationLab({ apiKey: process.env.HALATIONLAB_API_KEY }); export async function handle(rawBody: string, headers: Record) { // Rejects if the signature or timestamp is not valid. const event = await hl.webhooks.verify(rawBody, headers, process.env.HL_WEBHOOK_SECRET!); return event; } ``` ```python # Verifies a webhook with the Python SDK. Pass the raw body exactly as received, not re-serialised JSON. import os import halationlab def handle(raw_body: bytes, headers: dict) -> dict: # Raises if the signature or timestamp is not valid. return halationlab.webhooks.verify(raw_body, headers, os.environ["HL_WEBHOOK_SECRET"]) ``` ## Handle the event - Answer with any 2xx within 10 seconds. Do slow work after answering. - Delivery is at least once and unordered. Deduplicate on `webhook-id`, for example with a unique key in your database. - Failed deliveries are retried with backoff for about a day. A delivery never re-runs paid work. - After repeated failures the endpoint's `status` becomes `failing`; deliveries continue. A minimal receiver: ```ts // A minimal webhook receiver with node:http: verify the signature on the raw body, deduplicate on webhook-id, // answer 2xx quickly, then do the work. Run: HL_WEBHOOK_SECRET=whsec_... node handler.ts import { createServer } from 'node:http'; import { verifyWebhook } from './verify.ts'; const secret = process.env.HL_WEBHOOK_SECRET!; // Use a durable store (a database table with a unique key) in production; deliveries are at-least-once. const seen = new Set(); createServer((req, res) => { const chunks: Buffer[] = []; req.on('data', chunk => chunks.push(chunk)); req.on('end', () => { const raw = Buffer.concat(chunks).toString('utf8'); let event; try { event = verifyWebhook(raw, req.headers as Record, secret); } catch { res.writeHead(400).end(); return; } const id = req.headers['webhook-id'] as string; res.writeHead(204).end(); // Acknowledge within 10 seconds; do slow work afterwards. if (seen.has(id)) return; seen.add(id); if (event.type === 'generation.completed') { const generation = event.data as { id: string; outputs: { url: string }[] }; console.log('completed', generation.id, generation.outputs.map(o => o.url)); } }); }).listen(Number(process.env.PORT ?? 8080)); ``` ## Recover missed events `GET /v1/events` lists events oldest first, kept for 14 days. Store the last `next_cursor` and pass it as `cursor` next time to read only what is new: ```sh # Reads the event feed, oldest first, to catch up after missed webhooks. Store next_cursor and pass it as cursor next time. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" CURSOR="${HL_EVENTS_CURSOR:-}" curl -sS --fail-with-body "$API/events?limit=50${CURSOR:+&cursor=$CURSOR}" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" ``` Source: https://docs.halationlab.ai/guides/webhooks/ --- # Uploading media > Use your own images, video and audio as inputs, from a URL, a data URI or a direct upload checked with SHA-256. There are four ways to get a file into HalationLab.ai. All of them end with an asset in a project. | Your file is | Use | Limit | | --- | --- | --- | | Online | Its URL, directly in a generation's `input` | As for an import | | Online | `POST /v1/assets` with `url` | Up to 100 MB; the server must answer within 20 seconds | | Small and local | `POST /v1/assets` with `data` (a data URI) | About 700 KB; request bodies are limited to 1 MiB | | Large and local | `POST /v1/uploads`, then PUT the bytes | 16 MiB per PUT; larger files are sent in 16 MiB parts | Supported files: JPEG, PNG and WebP images; MP4, MOV and WebM video; MP3, WAV and M4A audio. Other types are refused with [`415 unsupported_media_type`](https://docs.halationlab.ai/errors/unsupported-media-type.md). > **Consent comes first:** Uploading and importing need the account owner's acceptance of the upload rights and processing terms for the credential, given when an API key is created or on the OAuth consent page. Without it the answer is [`403 consent_required`](https://docs.halationlab.ai/errors/consent-required.md) with a `manage_url`. ## Import from a URL ```sh # Imports a file from a public HTTPS URL into the default project. The asset is `processing` until it is checked. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" IMAGE="${HL_SAMPLE_IMAGE_URL:-https://docs.halationlab.ai/media/sample-image.png}" curl -sS --fail-with-body "$API/assets" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{ \"url\": \"$IMAGE\", \"name\": \"Sample image\" }" ``` The URL must be a public HTTPS URL. The answer is the asset with `status: "processing"` while the file is checked, usually a few seconds; then it is `ready` or `failed`. Read it with `GET /v1/assets/{id}`. A URL that cannot be fetched is [`422 media_fetch_failed`](https://docs.halationlab.ai/errors/media-fetch-failed.md). You can also put the URL straight into a generation's `input`. It is imported first; if the check takes longer than about 20 seconds, the generation request answers [`409 media_not_ready`](https://docs.halationlab.ai/errors/media-not-ready.md) with `Retry-After`. Send the identical request again with the same `Idempotency-Key` and it continues where it stopped. ## Send a small file inline ```sh # Sends a small local file inline as a data URI (up to about 700 KB). Use an upload for anything larger. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" FILE="${1:-$(dirname "$0")/../../public/media/sample-image.png}" data="data:image/png;base64,$(base64 < "$FILE" | tr -d '\n')" curl -sS --fail-with-body "$API/assets" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- < 1 else DEFAULT def call(method: str, route: str, body: dict | None = None) -> dict: headers = {"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"} if method != "GET": headers["Idempotency-Key"] = str(uuid.uuid4()) data = json.dumps(body).encode() if body is not None else None request = urllib.request.Request(f"{API}{route}", data=data, method=method, headers=headers) with urllib.request.urlopen(request, timeout=60) as response: return json.load(response) with open(path, "rb") as f: content = f.read() upload = call("POST", "/uploads", { "name": os.path.basename(path), "content_type": mimetypes.guess_type(path)[0] or "application/octet-stream", "size": len(content), "sha256": hashlib.sha256(content).hexdigest(), }) # One PUT up to 16 MiB; larger files use parts of `part_size` bytes. The response may list only the next parts: # reading the upload again issues URLs for the parts still missing. part_size = upload["part_size"] total = math.ceil(len(content) / part_size) if part_size else 1 etags: dict[int, str] = {} while len(etags) < total: for part in upload["parts"]: n = part["part_number"] if n in etags: continue chunk = content[(n - 1) * part_size: n * part_size] if part_size else content put = urllib.request.Request(part["url"], data=chunk, method="PUT", headers=part["headers"]) with urllib.request.urlopen(put, timeout=300) as response: etags[n] = response.headers["ETag"] if len(etags) < total: upload = call("GET", f"/uploads/{upload['id']}") parts = [{"part_number": n, "etag": etag} for n, etag in sorted(etags.items())] upload = call("POST", f"/uploads/{upload['id']}/complete", {"parts": parts} if part_size else {}) # The file is checked before it can be used; this usually takes seconds. while upload["status"] == "processing": time.sleep(2) upload = call("GET", f"/uploads/{upload['id']}") if upload["status"] != "completed": sys.exit(f"Upload {upload['status']}: {upload['error']}") print("asset", upload["asset"]) ``` The SDKs do all of this in one call: ```ts // Uploads a local file with the TypeScript SDK, which hashes it, sends the parts and waits for the asset. import { HalationLab } from '@halationlab/sdk'; const hl = new HalationLab({ apiKey: process.env.HALATIONLAB_API_KEY }); const asset = await hl.assets.upload(process.argv[2] ?? 'product.png'); console.log(asset.id, asset.status); ``` ```python # Uploads a local file with the Python SDK, which hashes it, sends the parts and waits for the asset. import os import sys from halationlab import HalationLab client = HalationLab(api_key=os.environ["HALATIONLAB_API_KEY"]) asset = client.assets.upload(sys.argv[1] if len(sys.argv) > 1 else "product.png") print(asset["id"], asset["status"]) ``` ## Use the asset Pass the asset ID as a media input, for example `"first_frame": "asset_…"`. Generated outputs are assets too: pass `outputs[0].asset`, or the generation ID for its first output. Asset download URLs need no credentials and expire at `url_expires_at` (one hour). Read the asset again for a fresh URL. `url` is null unless `status` is `ready`. ## Crop, trim and resize `POST /v1/assets/{id}/transform` makes a copy with `crop` (a rectangle in source pixels), `trim` (`start` and `end` in seconds, for video and audio) or `resize` (`width` and `height` in pixels), or a combination. The copy is a new asset with `origin: "derived"`. ```json { "crop": { "x": 0, "y": 140, "width": 1080, "height": 1080 } } ``` ## Delete `DELETE /v1/assets/{id}` moves an asset to the account's trash, from which the owner can restore it in the app for 30 days. Source: https://docs.halationlab.ai/guides/uploading-media/ --- # Projects and assets > Organise work in projects, give a project a brief, and apply it to prompts with use_brief. ## Projects A project holds assets and generations. Every request that creates something takes an optional `project`; without it, the credential's default project is used. For an API key the default is chosen when the key is created. For an OAuth app it is the only project the user shared, when they shared exactly one. | Endpoint | Does | | --- | --- | | `GET /v1/projects` | Lists the projects the credential can see, most recently changed first. `?status=archived` lists archived ones. | | `POST /v1/projects` | Creates a project. Needs a credential with access to all projects, or the answer is [`403 project_not_shared`](https://docs.halationlab.ai/errors/project-not-shared.md). | | `GET /v1/projects/{id}` | One project with its brief. | | `PATCH /v1/projects/{id}` | Changes the name, intent or brief. Send only the fields to change. | | `POST /v1/projects/{id}/archive` | Archives a project. Its assets stay available; it is read-only in the app. | A project the credential cannot see answers [`404 not_found`](https://docs.halationlab.ai/errors/not-found.md), the same as one that does not exist. ## The brief A brief describes what the work is for. Every field is optional: | Field | Meaning | | --- | --- | | `goal` | What the work is for. | | `product` | The product or service. | | `audience` | Who it is for. | | `selling_points` | What to show or say about it (a list). | | `brand_guidance` | Brand voice and look. | | `claims_to_avoid` | Claims the work must not make (a list). | | `mood` | The tone and feel. | | `story` | A story or structure to follow. | ```sh # Creates a project with a brief. Needs an API key with access to all projects. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" curl -sS --fail-with-body "$API/projects" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "name": "Spring campaign", "intent": "commercial", "brief": { "product": "A reusable steel water bottle that keeps drinks cold for 24 hours", "audience": "Commuters who cycle to work", "mood": "Bright, fresh, early morning", "claims_to_avoid": ["Medical or health claims"] } }' ``` ## Generate with the brief Send `"use_brief": true` to apply the project's brief to the prompt. It is off by default. Quote with the same flag to price the request with the brief applied. ```sh # Generates into a project with its brief applied to the prompt. Spends at most 100 tokens. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" curl -sS --fail-with-body "$API/generations" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < How prices work: published prices, binding quotes, max_cost, the quoted maximum and what is free. Every amount is a whole number of **tokens**, the unit the app shows. ## The rules - Every paid request is quoted before it starts. The quoted maximum is reserved before dispatch and re-checked at start. - You are never charged more than `cost.quoted_max`. What was charged is `cost.charged`, final once `cost.final` is true. - Failed work is free. Work cancelled before it was sent to a model host is free and its tokens are released. A late result is delivered free. - Every refusal (an error response) is free. The [billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) page lists every case. ## Published prices `GET /v1/models/{model}` returns `price`, for display: | Field | Meaning | | --- | --- | | `unit` | What one unit is: `second` of output, one `output`, a `character` or `thousand_characters` of text. | | `from_per_unit` | The lowest price per unit over the settings in `varies_by`. | | `varies_by` | Parameters that change the price, for example `resolution`. | | `typical` | A typical request, its quantity and its price. | | `discount_percent` | An active model discount already applied to the figures, or null. | `price` is null when a model cannot be priced right now. A published price is not binding; a quote is. ## Set a ceiling with max_cost `POST /v1/generations` quotes and starts in one step. Send `max_cost`, the most you will pay. If the quoted maximum is higher, nothing is created or charged, and the answer is [`402 max_cost_exceeded`](https://docs.halationlab.ai/errors/max-cost-exceeded.md) with the quote in `error.details.quote`. Without `max_cost`, the [spending limit](https://docs.halationlab.ai/guides/spending-limits.md) is the only ceiling. ## Get a quote first `POST /v1/quotes` takes the same `model`, `input`, `project` and `use_brief` as a generation, and returns a binding quote. Nothing runs and nothing is charged. ```sh # Prices a request without starting it. Quotes are free and valid for 30 minutes. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" curl -sS --fail-with-body "$API/quotes" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2.5", "input": { "prompt": "A red fox running through snow", "duration": 5, "resolution": "1080p" } }' ``` | Field | Meaning | | --- | --- | | `max_cost` | The binding maximum price. | | `list_cost` | The price before a model discount, when one applies. | | `unit`, `quantity` | The billing unit and how many units are priced. | | `processor` | The company that will run the model, named because your content is sent to it. | | `input` | The parameters priced, defaults included. | | `expires_at` | 30 minutes after the quote was made. | Start it with `POST /v1/generations` and `{"quote": "quote_…"}`. A quote starts at most once: ```sh # Gets a quote, shows the price, then starts exactly that request from the quote. Needs jq. # Refuses to start if the quoted maximum is above MAX_COST (default 100 tokens). set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" MAX_COST="${MAX_COST:-100}" quote=$(curl -sS --fail-with-body "$API/quotes" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "model": "flux.2-pro", "input": { "prompt": "A red ceramic mug on a linen tablecloth" } }') price=$(jq -r .max_cost <<<"$quote") echo "Quoted maximum: $price tokens (processor: $(jq -r .processor <<<"$quote"), expires $(jq -r .expires_at <<<"$quote"))" if (( price > MAX_COST )); then echo "Above MAX_COST ($MAX_COST); not starting."; exit 0; fi curl -sS --fail-with-body "$API/generations" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d "{ \"quote\": \"$(jq -r .id <<<"$quote")\" }" ``` | Error | When | | --- | --- | | [`409 quote_expired`](https://docs.halationlab.ai/errors/quote-expired.md) | The quote is more than 30 minutes old. | | [`409 quote_used`](https://docs.halationlab.ai/errors/quote-used.md) | The quote already started a generation. | | [`409 price_changed`](https://docs.halationlab.ai/errors/price-changed.md) | The model's price, host or terms changed since the quote. Nothing was charged; get a new quote. | Quotes count towards the [rate limit](https://docs.halationlab.ai/guides/rate-limits.md) of 15 paid starts or quotes a minute. Source: https://docs.halationlab.ai/guides/pricing-and-quotes/ --- # Spending limits > How spending limits bound what an API key or app can spend, how to read them, and what happens at the limit. A spending limit is set by a person in the HalationLab.ai app, for one credential. No API call can create a limit or raise it. - **API keys** have a limit that is on by default and resets monthly. It can also cap the price of a single generation. The owner can switch it off; the key can then spend up to the account balance. Keys and their limits are managed in **Account → Developers**. - **OAuth apps** get the limit the user set on the consent screen when connecting the app. The app cannot raise it. See [Budgets](https://docs.halationlab.ai/apps/budgets.md). ## Read the limit `GET /v1/account` returns `spending_limit` for the credential: | Field | Meaning | | --- | --- | | `enabled` | Whether a limit applies. When false the credential may spend up to the account balance. | | `amount` | The limit per period. | | `per_generation` | The most one generation may cost. | | `period` | `month`: resets monthly. `fixed`: applies once until it ends. | | `used`, `held`, `remaining` | Spent in this period, reserved for work in progress, and what is left. | | `resets_at` | When the period ends. | | `manage_url` | Where the account owner changes the limit. | `spending_limit` is null when the credential has no spending authority yet. The account's own token balance is in `balance` (`available` and `held`). ```sh # Shows who the API key acts for, its balance and what is left of its spending limit. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" curl -sS --fail-with-body "$API/account" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" ``` ## At the limit A start that would go over the limit, or over the balance, is refused before anything runs. Every refusal is free. | Error | Meaning | What to do | | --- | --- | --- | | [`402 spending_limit_reached`](https://docs.halationlab.ai/errors/spending-limit-reached.md) | This generation would go over the limit. | Wait for `resets_at`, or ask the owner to raise the limit at `manage_url`. | | [`402 insufficient_balance`](https://docs.halationlab.ai/errors/insufficient-balance.md) | The account does not have enough tokens. | Add tokens in the app, or choose a cheaper model or settings. | | [`402 max_cost_exceeded`](https://docs.halationlab.ai/errors/max-cost-exceeded.md) | The price is above your own `max_cost`. | Raise `max_cost` or change the request. | | [`403 spending_not_authorized`](https://docs.halationlab.ai/errors/spending-not-authorized.md) | No limit covers this model and project. | Ask the owner to allow spending at `manage_url`. | | [`403 spending_limit_changed`](https://docs.halationlab.ai/errors/spending-limit-changed.md) | The limit is paused, revoked or expired. | Ask the owner to review it at `manage_url`. | Spending limits and balances never answer `429`. Retrying does not help; show the `manage_url` to the account owner instead. Source: https://docs.halationlab.ai/guides/spending-limits/ --- # Test keys > Build and test an integration for free with a test API key: simulated generations, sample outputs and forced failures. A test key starts with `hl_test_`. Create one in **Account → Developers** by choosing **Test key**. It works like a live key with one difference: **quotes and generations are simulated**. Nothing is sent to a model host and nothing is charged. ## What is simulated - `POST /v1/quotes` answers a quote with `max_cost: 0`. - `POST /v1/generations` answers a generation that is `queued` for about a second, `processing` for about four, then `completed` with a sample file of the model's output type (image, video or audio). `cost` is always 0. - `GET /v1/generations`, `GET /v1/generations/{id}` and `POST /v1/generations/{id}/cancel` read and cancel test generations only. `Prefer: wait=N` works as it does live. - Requests are validated exactly as live ones: the model, its `input_schema`, `max_cost`, `Idempotency-Key` and `quote` rules are the same, so a request that works with a test key works with a live key. Test generations do not send webhooks and do not appear in `GET /v1/events`. Their sample outputs are not assets, so they cannot be used as inputs. ## Forcing an outcome Put one of these markers anywhere in a string input (usually the prompt), or set the metadata key `test_outcome`: | Marker | `metadata.test_outcome` | Result | |---|---|---| | `[fail]` | `fail` | `failed` with `generation_failed` | | `[blocked]` | `blocked` | `failed` with `content_blocked` | | `[slow]` | `slow` | `processing` for about a minute, then `completed` | ```sh curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_TEST_KEY" \ -H "Content-Type: application/json" \ -H "Prefer: wait=10" \ -d '{ "model": "seedance-2.5", "input": { "prompt": "A red fox [fail]" } }' ``` ## What is real Everything else acts on your real account: projects, assets, uploads, imports, the account endpoint and webhook endpoints. A test key never spends tokens, so it has no spending limit; it can still upload files, which count towards your storage. Source: https://docs.halationlab.ai/guides/test-keys/ --- # Errors > The error shape, error types and HTTP statuses, and how to handle errors and retries. Every error has the same shape and a matching HTTP status: ```json { "error": { "type": "invalid_request_error", "code": "parameter_invalid", "message": "`duration` must be between 4 and 15 seconds.", "param": "input.duration", "doc_url": "https://docs.halationlab.ai/errors/parameter-invalid/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` | Field | Meaning | | --- | --- | | `type` | The kind of error. Use it for broad handling. | | `code` | A stable, specific code. It never changes meaning. Each has a [page](https://docs.halationlab.ai/errors.md). | | `message` | A human-readable explanation, safe to show to a developer. Do not parse it. | | `param` | The parameter at fault, such as `input.duration`, or null. | | `doc_url` | The page for this code. | | `request_id` | The request's ID, also sent as the `Request-Id` header. Quote it to [support](https://docs.halationlab.ai/support.md). | | `retry_after` | Seconds to wait before retrying. Present only when retrying can succeed; also the `Retry-After` header. | | `manage_url` | A page where the account owner can fix the cause, such as a spending limit or consent. | | `errors` | Every problem, when there was more than one, each with `param`, `code` and `message`. | | `details` | Extra facts. `max_cost_exceeded` carries the `quote`. | ## Types and statuses | Type | Status | Meaning | | --- | --- | --- | | `invalid_request_error` | 400, 405, 413, 415, 422 | Bad JSON (400), wrong method (405), a body over 1 MiB (413), an unsupported file type (415), or validation (422, with `param`). | | `authentication_error` | 401 | The credential is missing or not valid. | | `payment_required_error` | 402 | Money: balance, spending limit or `max_cost`. | | `permission_error` | 403, 410 | The credential may not do this, or access was withdrawn. | | `not_found_error` | 404 | No such object, or the credential cannot see it. The two look the same. | | `conflict_error` | 409 | The request conflicts with the current state, such as an expired quote. | | `idempotency_error` | 409 | An `Idempotency-Key` problem. See [Idempotency](https://docs.halationlab.ai/guides/idempotency.md). | | `rate_limit_error` | 429 | Too many requests. Only rate limits use 429. | | `api_error` | 500, 503 | A problem on our side, or a model or service is unavailable. | The [error codes](https://docs.halationlab.ai/errors.md) page lists every code. ## Handle errors 1. Branch on `code` for the cases you handle specifically, and on `type` for the rest. 2. Retry only when the response has `Retry-After` (and `retry_after`), after that many seconds, with the same `Idempotency-Key` and the identical body. 3. For `402` and `403` refusals with a `manage_url`, show it to the account owner. Retrying does not help. 4. For `422`, fix the parameter named in `param` (and in `errors`, when there are several). 5. Log `request_id` for anything you cannot handle. ```ts // A request helper that handles errors by their stable `code`: it retries only what can succeed later, with the // same Idempotency-Key, after Retry-After. Run it to see a 404 handled: `node handle-errors.ts` or `npx tsx handle-errors.ts`. const API = process.env.HL_API_BASE ?? 'https://api.halationlab.ai/v1'; type ApiError = { type: string; code: string; message: string; param: string | null; doc_url: string; request_id: string; retry_after?: number; manage_url?: string }; export class HalationLabApiError extends Error { constructor(readonly status: number, readonly error: ApiError) { super(`${error.code}: ${error.message}`); } } export async function call(method: string, path: string, body?: unknown, attempts = 5) { // One key for every attempt, so a retry never starts a second generation. const key = method === 'GET' ? undefined : crypto.randomUUID(); for (let attempt = 1; ; attempt++) { const res = await fetch(`${API}${path}`, { method, headers: { Authorization: `Bearer ${process.env.HALATIONLAB_API_KEY}`, 'Content-Type': 'application/json', ...(key ? { 'Idempotency-Key': key } : {}), }, body: body === undefined ? undefined : JSON.stringify(body), }); if (res.ok) return res.json(); const { error } = (await res.json()) as { error: ApiError }; // Retry-After is sent exactly when retrying can succeed: rate limits, in-progress or unknown outcomes, // media still being checked and temporary outages. const retryAfter = Number(res.headers.get('Retry-After') ?? error.retry_after); if (retryAfter > 0 && attempt < attempts) { await new Promise(resolve => setTimeout(resolve, retryAfter * 1000)); continue; } throw new HalationLabApiError(res.status, error); } } if (import.meta.url === new URL(`file://${process.argv[1]}`).href) { try { await call('GET', '/models/not-a-model'); } catch (e) { if (!(e instanceof HalationLabApiError)) throw e; const { status, error } = e; console.log(status, error.type, error.code, error.doc_url, error.request_id); if (error.code !== 'model_not_found') process.exit(1); } } ``` ```python # A request helper that handles errors by their stable `code`: it retries only what can succeed later, with the # same Idempotency-Key, after Retry-After. Run it to see a 404 handled: python3 handle-errors.py import json import os import time import urllib.error import urllib.request import uuid API = os.environ.get("HL_API_BASE", "https://api.halationlab.ai/v1") class HalationLabApiError(Exception): def __init__(self, status: int, error: dict): super().__init__(f"{error['code']}: {error['message']}") self.status = status self.error = error def call(method: str, path: str, body: dict | None = None, attempts: int = 5) -> dict: # One key for every attempt, so a retry never starts a second generation. headers = {"Authorization": f"Bearer {os.environ.get('HALATIONLAB_API_KEY', '')}", "Content-Type": "application/json"} if method != "GET": headers["Idempotency-Key"] = str(uuid.uuid4()) data = json.dumps(body).encode() if body is not None else None for attempt in range(1, attempts + 1): request = urllib.request.Request(f"{API}{path}", data=data, method=method, headers=headers) try: with urllib.request.urlopen(request, timeout=90) as response: return json.load(response) except urllib.error.HTTPError as e: error = json.load(e)["error"] # Retry-After is sent exactly when retrying can succeed. retry_after = int(e.headers.get("Retry-After") or error.get("retry_after") or 0) if retry_after > 0 and attempt < attempts: time.sleep(retry_after) continue raise HalationLabApiError(e.code, error) from None raise RuntimeError("unreachable") if __name__ == "__main__": try: call("GET", "/models/not-a-model") except HalationLabApiError as e: print(e.status, e.error["type"], e.error["code"], e.error["doc_url"], e.error["request_id"]) if e.error["code"] != "model_not_found": raise SystemExit(1) ``` ## Failed generations are not errors A generation that starts and then fails is not an error response: the start succeeded. The generation's `status` becomes `failed` (or `canceled`), with `error.code` one of `generation_failed`, `content_blocked`, `canceled`, `expired` or `input_rejected`, and `error.message`. Failed work is never charged. Source: https://docs.halationlab.ai/guides/errors/ --- # Idempotency > Make every write safe to retry with an Idempotency-Key, and recover from timeouts without paying twice. Send `Idempotency-Key: ` on every `POST`, `PATCH` and `DELETE`. A UUID is a good key; up to 128 printable characters are allowed. ## How it works - The same key with the same body, from the same credential, returns the first response again, including an error, without acting again. - The first response is kept for 30 days, and for 400 days for paid starts. - The same key with a different body is [`409 idempotency_key_reused`](https://docs.halationlab.ai/errors/idempotency-key-reused.md). - If the first request with that key is still running, the answer is [`409 request_in_progress`](https://docs.halationlab.ai/errors/request-in-progress.md) with `Retry-After`. Send the identical request again after that time. - If the outcome is uncertain, the answer is [`409 outcome_unknown`](https://docs.halationlab.ai/errors/outcome-unknown.md). Send the identical request again with the same key: it never runs twice. - A key too old to replay is [`409 idempotency_key_expired`](https://docs.halationlab.ai/errors/idempotency-key-expired.md). Look the result up instead, for example with `GET /v1/generations`. Without a key, a request is not protected against retries: a timeout followed by a retry can start two generations. The SDKs always send one. ## Retry safely 1. Create the key before you send the request, and keep it with the work it belongs to. 2. On a timeout, a network error, a `5xx` or a response with `Retry-After`, send the identical request again with the same key. 3. Use a new key only for a new request. See it with a free request: the same quote request sent twice with one key returns the same quote. ```sh # Sends the same quote request twice with one Idempotency-Key: the second answer is the first one replayed, # with the same quote ID. Quotes are free, so this is a safe way to see it. Needs jq. set -euo pipefail API="${HL_API_BASE:-https://api.halationlab.ai/v1}" KEY="$(uuidgen)" BODY='{ "model": "flux.2-pro", "input": { "prompt": "A red ceramic mug" } }' quote() { curl -sS --fail-with-body "$API/quotes" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $KEY" \ -H "Content-Type: application/json" \ -d "$BODY" | jq -r .id } first=$(quote) second=$(quote) echo "first: $first, second: $second" [ "$first" = "$second" ] ``` The [error-handling helper](https://docs.halationlab.ai/guides/errors.md#handle-errors) reuses one key for every attempt of a request. Source: https://docs.halationlab.ai/guides/idempotency/ --- # Rate limits > Requests per minute per credential, the 429 answer and Retry-After. Limits apply per credential, per minute: | Kind of request | Limit per minute | | --- | --- | | Reads (`GET`) | 300 | | Writes (other `POST`, `PATCH`, `DELETE`) | 60 | | Paid starts and quotes (`POST /v1/generations`, `POST /v1/quotes`) | 15 | These sit inside the account's own ceilings, which the account shares with the app. Authenticated responses carry `X-RateLimit-Limit`: the limit for this credential and this kind of request. ## When you exceed a limit The answer is [`429 rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) with `Retry-After`. Wait that many seconds, then retry with the same `Idempotency-Key`. Spread requests out rather than retrying at once. `429` is used only for rate limits. Spending limits and balances answer `402` or `403`, never `429`; see [Spending limits](https://docs.halationlab.ai/guides/spending-limits.md). ## Stay under the limits - Wait for results with [webhooks](https://docs.halationlab.ai/guides/webhooks.md), or poll at `poll_after_seconds` with `Prefer: wait=60`, instead of polling quickly. - Read lists with `?limit=100` and `?cursor=` rather than one object at a time. - Quote only when you need the price before starting; `POST /v1/generations` with `max_cost` quotes and starts in one request. Source: https://docs.halationlab.ai/guides/rate-limits/ --- # Moderation and acceptable use > What happens when a request or a result conflicts with the acceptable use policy, and the account states that stop paid work. Use of the API is covered by the HalationLab.ai [terms](https://halationlab.ai/legal/terms) and [acceptable use policy](https://halationlab.ai/legal/acceptable-use). Read them before you build, and pass their rules on to your own users if they write prompts or supply files. ## Refused requests A request that conflicts with the acceptable use policy is refused before anything runs: [`403 content_blocked`](https://docs.halationlab.ai/errors/content-blocked.md). Nothing is charged. Change the prompt or inputs. ## Failed generations A generation can also stop after it started. It then has `status: "failed"` with `error.code` set, for example `content_blocked` or `input_rejected`. Failed work is never charged. ## Model rules Some models have their own limits on inputs, for example models that cannot use reference images or videos showing real people's faces. Each [model page](https://docs.halationlab.ai/models.md) lists them under its media inputs and restrictions. A file a model cannot use is [`422 media_invalid`](https://docs.halationlab.ai/errors/media-invalid.md). ## Account states | Error | Meaning | | --- | --- | | [`403 age_confirmation_required`](https://docs.halationlab.ai/errors/age-confirmation-required.md) | The account owner must confirm they are an adult before paid generation. Sign in to the app once and confirm. | | [`403 account_restricted`](https://docs.halationlab.ai/errors/account-restricted.md) | The account cannot start paid work at the moment. | | [`403 account_suspended`](https://docs.halationlab.ai/errors/account-suspended.md) | The account is on hold. | | [`403 account_read_only`](https://docs.halationlab.ai/errors/account-read-only.md) | The account can download its work but cannot start new work. | For a restricted or suspended account, contact support from the HalationLab.ai app. Source: https://docs.halationlab.ai/guides/moderation/ --- # Versioning > The /v1 path, the HalationLab-Version header, the additive-only promise, and how models are deprecated. ## The version The version is in the path: `https://api.halationlab.ai/v1`. Every response also carries `HalationLab-Version: 2026-11-28`, the date of the contract it follows. That header is reserved for a future breaking change, which would need a new dated version. ## Additive changes only Now that these docs are public, the v1 contract changes only by addition: - New endpoints, new optional request fields and new models can appear. - Response objects can gain fields at any time. Your code must ignore fields it does not know. - An error `code` never changes meaning once published. Request bodies stay strict: a field the API does not know is refused with [`422 parameter_unknown`](https://docs.halationlab.ai/errors/parameter-unknown.md), so send only documented fields. The [changelog](https://docs.halationlab.ai/changelog.md) records every change. ## Model deprecation Model IDs are stable. When a model is deprecated, `GET /v1/models/{model}` sets `deprecation`. Its shape, with illustrative values: ```json { "deprecated_at": "2026-12-01T00:00:00Z", "sunset_at": "2027-03-01T00:00:00Z", "replacement": "seedance-2.5" } ``` The response also carries `Deprecation` and `Sunset` headers. From `sunset_at` the model stops accepting generations. Move to `replacement` before then. A model whose `status` is `paused` is listed but refuses new generations for now. Source: https://docs.halationlab.ai/guides/versioning/ --- # Models > Every model the HalationLab.ai API offers, grouped by task, with its output type. 89 models across 13 tasks. Each model ID has exactly one task. The same list is `GET /v1/models` (no API key needed); filter it with `?task=` or `?output=`. Each model page lists its parameters, media inputs, limits and an example. Prices are live: read them from `GET /v1/models/{id}` or get a binding quote with `POST /v1/quotes`. ## Text to video Generates a video from a text prompt. Task: `text-to-video`. | Model | ID | Output | | --- | --- | --- | | [Gemini Omni Flash 1.1](https://docs.halationlab.ai/models/gemini-omni-flash-1.1.md) | `gemini-omni-flash-1.1` | video | | [Grok Imagine Video 1.5](https://docs.halationlab.ai/models/grok-imagine-video-1.5.md) | `grok-imagine-video-1.5` | video | | [Kling 2.5 Turbo Pro](https://docs.halationlab.ai/models/kling-2.5-turbo-pro.md) | `kling-2.5-turbo-pro` | video | | [Kling 3.0](https://docs.halationlab.ai/models/kling-3.0.md) | `kling-3.0` | video | | [Luma Ray 3.2](https://docs.halationlab.ai/models/luma-ray-3.2.md) | `luma-ray-3.2` | video | | [MiniMax H3](https://docs.halationlab.ai/models/minimax-h3.md) | `minimax-h3` | video | | [Seedance 1.0 Pro](https://docs.halationlab.ai/models/seedance-1.0-pro.md) | `seedance-1.0-pro` | video | | [Seedance 1.0 Pro Fast](https://docs.halationlab.ai/models/seedance-1.0-pro-fast.md) | `seedance-1.0-pro-fast` | video | | [Seedance 2.0](https://docs.halationlab.ai/models/seedance-2.0.md) | `seedance-2.0` | video | | [Seedance 2.0 Fast](https://docs.halationlab.ai/models/seedance-2.0-fast.md) | `seedance-2.0-fast` | video | | [Seedance 2.0 Mini](https://docs.halationlab.ai/models/seedance-2.0-mini.md) | `seedance-2.0-mini` | video | | [Seedance 2.5](https://docs.halationlab.ai/models/seedance-2.5.md) | `seedance-2.5` | video | | [Veo 3.1](https://docs.halationlab.ai/models/veo-3.1.md) | `veo-3.1` | video | | [Veo 3.1 Fast](https://docs.halationlab.ai/models/veo-3.1-fast.md) | `veo-3.1-fast` | video | | [Wan 3.0](https://docs.halationlab.ai/models/wan-3.0.md) | `wan-3.0` | video | ## Image to video Animates an image into a video, from a first frame and optionally a last frame. Task: `image-to-video`. | Model | ID | Output | | --- | --- | --- | | [Gemini Omni Flash 1.1 image-to-video](https://docs.halationlab.ai/models/gemini-omni-flash-1.1-image-to-video.md) | `gemini-omni-flash-1.1-image-to-video` | video | | [Grok Imagine Video 1.5 image-to-video](https://docs.halationlab.ai/models/grok-imagine-video-1.5-image-to-video.md) | `grok-imagine-video-1.5-image-to-video` | video | | [Kling 2.5 Turbo Pro image-to-video](https://docs.halationlab.ai/models/kling-2.5-turbo-pro-image-to-video.md) | `kling-2.5-turbo-pro-image-to-video` | video | | [Kling 3.0 image-to-video](https://docs.halationlab.ai/models/kling-3.0-image-to-video.md) | `kling-3.0-image-to-video` | video | | [Luma Ray 3.2](https://docs.halationlab.ai/models/luma-ray-3.2-image-to-video.md) | `luma-ray-3.2-image-to-video` | video | | [MiniMax H3 image-to-video](https://docs.halationlab.ai/models/minimax-h3-image-to-video.md) | `minimax-h3-image-to-video` | video | | [Seedance 1.0 Pro Fast image-to-video](https://docs.halationlab.ai/models/seedance-1.0-pro-fast-image-to-video.md) | `seedance-1.0-pro-fast-image-to-video` | video | | [Seedance 1.0 Pro image-to-video](https://docs.halationlab.ai/models/seedance-1.0-pro-image-to-video.md) | `seedance-1.0-pro-image-to-video` | video | | [Seedance 2.0 Fast image-to-video](https://docs.halationlab.ai/models/seedance-2.0-fast-image-to-video.md) | `seedance-2.0-fast-image-to-video` | video | | [Seedance 2.0 image-to-video](https://docs.halationlab.ai/models/seedance-2.0-image-to-video.md) | `seedance-2.0-image-to-video` | video | | [Seedance 2.0 Mini image-to-video](https://docs.halationlab.ai/models/seedance-2.0-mini-image-to-video.md) | `seedance-2.0-mini-image-to-video` | video | | [Seedance 2.5 image-to-video](https://docs.halationlab.ai/models/seedance-2.5-image-to-video.md) | `seedance-2.5-image-to-video` | video | | [Veo 3.1 Fast image-to-video](https://docs.halationlab.ai/models/veo-3.1-fast-image-to-video.md) | `veo-3.1-fast-image-to-video` | video | | [Veo 3.1 image-to-video](https://docs.halationlab.ai/models/veo-3.1-image-to-video.md) | `veo-3.1-image-to-video` | video | | [Wan 3.0 image-to-video](https://docs.halationlab.ai/models/wan-3.0-image-to-video.md) | `wan-3.0-image-to-video` | video | ## Reference to video Generates a video that follows reference images or clips. Task: `reference-to-video`. | Model | ID | Output | | --- | --- | --- | | [Gemini Omni Flash 1.1 references](https://docs.halationlab.ai/models/gemini-omni-flash-1.1-references.md) | `gemini-omni-flash-1.1-references` | video | | [Grok Imagine Video 1.5 reference-to-video](https://docs.halationlab.ai/models/grok-imagine-video-1.5-references.md) | `grok-imagine-video-1.5-references` | video | | [MiniMax H3 references](https://docs.halationlab.ai/models/minimax-h3-references.md) | `minimax-h3-references` | video | | [Seedance 2.0](https://docs.halationlab.ai/models/seedance-2.0-references.md) | `seedance-2.0-references` | video | | [Seedance 2.0 Fast](https://docs.halationlab.ai/models/seedance-2.0-fast-references.md) | `seedance-2.0-fast-references` | video | | [Seedance 2.0 Mini](https://docs.halationlab.ai/models/seedance-2.0-mini-references.md) | `seedance-2.0-mini-references` | video | | [Seedance 2.5](https://docs.halationlab.ai/models/seedance-2.5-references.md) | `seedance-2.5-references` | video | | [Veo 3.1 references](https://docs.halationlab.ai/models/veo-3.1-references.md) | `veo-3.1-references` | video | | [Wan 3.0 references](https://docs.halationlab.ai/models/wan-3.0-references.md) | `wan-3.0-references` | video | ## Extend video Continues a video with new footage. Task: `extend-video`. | Model | ID | Output | | --- | --- | --- | | [FLUX.3 Extend](https://docs.halationlab.ai/models/flux.3-extend.md) | `flux.3-extend` | video | | [Gemini Omni Flash 1.1 Extend](https://docs.halationlab.ai/models/gemini-omni-flash-1.1-extend.md) | `gemini-omni-flash-1.1-extend` | video | | [Seedance 2.5 Extend](https://docs.halationlab.ai/models/seedance-2.5-extend.md) | `seedance-2.5-extend` | video | ## Edit video Changes a video by instruction. Task: `edit-video`. | Model | ID | Output | | --- | --- | --- | | [FLUX.3 Edit Video [fast]](https://docs.halationlab.ai/models/flux.3-edit-video-fast.md) | `flux.3-edit-video-fast` | video | | [Gemini Omni Flash 1.1 Edit](https://docs.halationlab.ai/models/gemini-omni-flash-1.1-edit.md) | `gemini-omni-flash-1.1-edit` | video | | [Kling O3 Edit](https://docs.halationlab.ai/models/kling-o3-edit.md) | `kling-o3-edit` | video | | [Seedance 2.5 Edit](https://docs.halationlab.ai/models/seedance-2.5-edit.md) | `seedance-2.5-edit` | video | ## Reframe video Changes the frame shape of a video, filling the new area. Task: `reframe-video`. | Model | ID | Output | | --- | --- | --- | | [LTX 2.3 Reframe](https://docs.halationlab.ai/models/ltx-2.3-reframe.md) | `ltx-2.3-reframe` | video | | [Wan VACE Long Reframe](https://docs.halationlab.ai/models/wan-vace-long-reframe.md) | `wan-vace-long-reframe` | video | ## Upscale video Raises the resolution of a video. Task: `upscale-video`. | Model | ID | Output | | --- | --- | --- | | [ByteDance Upscaler](https://docs.halationlab.ai/models/bytedance-upscaler.md) | `bytedance-upscaler` | video | | [FLUX Video Upscale](https://docs.halationlab.ai/models/flux-video-upscale.md) | `flux-video-upscale` | video | | [Seedance 2.5 Finish in 1080p](https://docs.halationlab.ai/models/seedance-2.5-finish-in-1080p.md) | `seedance-2.5-finish-in-1080p` | video | ## Text to image Generates images from a text prompt. Task: `text-to-image`. | Model | ID | Output | | --- | --- | --- | | [FLUX.2 [pro]](https://docs.halationlab.ai/models/flux.2-pro.md) | `flux.2-pro` | image | | [GPT Image 2.5 Flare](https://docs.halationlab.ai/models/gpt-image-2.5-flare.md) | `gpt-image-2.5-flare` | image | | [GPT Image 2.5 Sunburst](https://docs.halationlab.ai/models/gpt-image-2.5-sunburst.md) | `gpt-image-2.5-sunburst` | image | | [Grok Imagine Image 2.0](https://docs.halationlab.ai/models/grok-imagine-image-2.0.md) | `grok-imagine-image-2.0` | image | | [Ideogram 4.0](https://docs.halationlab.ai/models/ideogram-4.0.md) | `ideogram-4.0` | image | | [Nano Banana 2.1](https://docs.halationlab.ai/models/nano-banana-2.1.md) | `nano-banana-2.1` | image | | [Nano Banana Pro](https://docs.halationlab.ai/models/nano-banana-pro.md) | `nano-banana-pro` | image | | [Recraft V4](https://docs.halationlab.ai/models/recraft-v4.md) | `recraft-v4` | image | | [Recraft V4 Pro](https://docs.halationlab.ai/models/recraft-v4-pro.md) | `recraft-v4-pro` | image | | [Recraft V4 Pro Vector](https://docs.halationlab.ai/models/recraft-v4-pro-vector.md) | `recraft-v4-pro-vector` | image | | [Recraft V4 Vector](https://docs.halationlab.ai/models/recraft-v4-vector.md) | `recraft-v4-vector` | image | | [Seedream 4.0](https://docs.halationlab.ai/models/seedream-4.0.md) | `seedream-4.0` | image | | [Seedream 4.5](https://docs.halationlab.ai/models/seedream-4.5.md) | `seedream-4.5` | image | | [Seedream 5.0 Flash](https://docs.halationlab.ai/models/seedream-5.0-flash.md) | `seedream-5.0-flash` | image | | [Seedream 5.0 Lite](https://docs.halationlab.ai/models/seedream-5.0-lite.md) | `seedream-5.0-lite` | image | | [Seedream 5.0 Pro](https://docs.halationlab.ai/models/seedream-5.0-pro.md) | `seedream-5.0-pro` | image | ## Edit image Changes or combines images by instruction. Task: `edit-image`. | Model | ID | Output | | --- | --- | --- | | [FLUX.2 [pro] Edit](https://docs.halationlab.ai/models/flux.2-pro-edit.md) | `flux.2-pro-edit` | image | | [GPT Image 2.5 Flare Edit](https://docs.halationlab.ai/models/gpt-image-2.5-flare-edit.md) | `gpt-image-2.5-flare-edit` | image | | [GPT Image 2.5 Flare Region Edit](https://docs.halationlab.ai/models/gpt-image-2.5-flare-region-edit.md) | `gpt-image-2.5-flare-region-edit` | image | | [GPT Image 2.5 Sunburst](https://docs.halationlab.ai/models/gpt-image-2.5-sunburst-edit.md) | `gpt-image-2.5-sunburst-edit` | image | | [GPT Image 2.5 Sunburst Region Edit](https://docs.halationlab.ai/models/gpt-image-2.5-sunburst-region-edit.md) | `gpt-image-2.5-sunburst-region-edit` | image | | [Grok Imagine Image 2.0 Edit](https://docs.halationlab.ai/models/grok-imagine-image-2.0-edit.md) | `grok-imagine-image-2.0-edit` | image | | [Nano Banana 2.1 Edit](https://docs.halationlab.ai/models/nano-banana-2.1-edit.md) | `nano-banana-2.1-edit` | image | | [Nano Banana Pro Edit](https://docs.halationlab.ai/models/nano-banana-pro-edit.md) | `nano-banana-pro-edit` | image | | [Seedream 4.0 Edit](https://docs.halationlab.ai/models/seedream-4.0-edit.md) | `seedream-4.0-edit` | image | | [Seedream 4.5 Edit](https://docs.halationlab.ai/models/seedream-4.5-edit.md) | `seedream-4.5-edit` | image | | [Seedream 5.0 Flash Edit](https://docs.halationlab.ai/models/seedream-5.0-flash-edit.md) | `seedream-5.0-flash-edit` | image | | [Seedream 5.0 Flash Layers](https://docs.halationlab.ai/models/seedream-5.0-flash-layers.md) | `seedream-5.0-flash-layers` | image | | [Seedream 5.0 Flash Region Edit](https://docs.halationlab.ai/models/seedream-5.0-flash-region-edit.md) | `seedream-5.0-flash-region-edit` | image | | [Seedream 5.0 Lite Edit](https://docs.halationlab.ai/models/seedream-5.0-lite-edit.md) | `seedream-5.0-lite-edit` | image | | [Seedream 5.0 Pro Edit](https://docs.halationlab.ai/models/seedream-5.0-pro-edit.md) | `seedream-5.0-pro-edit` | image | | [Seedream 5.0 Pro Layers](https://docs.halationlab.ai/models/seedream-5.0-pro-layers.md) | `seedream-5.0-pro-layers` | image | | [Seedream 5.0 Pro Region Edit](https://docs.halationlab.ai/models/seedream-5.0-pro-region-edit.md) | `seedream-5.0-pro-region-edit` | image | ## Expand image Extends an image beyond its borders. Task: `expand-image`. | Model | ID | Output | | --- | --- | --- | | [Ideogram 3.0 Reframe](https://docs.halationlab.ai/models/ideogram-3.0-reframe.md) | `ideogram-3.0-reframe` | image | ## Upscale image Raises the resolution of an image. Task: `upscale-image`. | Model | ID | Output | | --- | --- | --- | | [Recraft Crisp Upscale](https://docs.halationlab.ai/models/recraft-crisp-upscale.md) | `recraft-crisp-upscale` | image | ## Text to speech Speaks a script in a chosen voice. Task: `text-to-speech`. | Model | ID | Output | | --- | --- | --- | | [ElevenLabs Eleven v4](https://docs.halationlab.ai/models/elevenlabs-eleven-v4.md) | `elevenlabs-eleven-v4` | audio | | [ElevenLabs Eleven v4 Turbo](https://docs.halationlab.ai/models/elevenlabs-eleven-v4-turbo.md) | `elevenlabs-eleven-v4-turbo` | audio | ## Text to sound Generates a sound effect from a description. Task: `text-to-sound`. | Model | ID | Output | | --- | --- | --- | | [ElevenLabs Sound Effects v2](https://docs.halationlab.ai/models/elevenlabs-sound-effects-v2.md) | `elevenlabs-sound-effects-v2` | audio | Source: https://docs.halationlab.ai/models/ --- # Gemini Omni Flash 1.1 > Gemini Omni Flash 1.1. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `gemini-omni-flash-1.1` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Gemini Omni | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/gemini-omni-flash-1.1` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/gemini-omni-flash-1.1`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 20000 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer or "auto" | `8` | 3 to 10 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16` | No | Frame shape. | | `resolution` | string | `720p` | `360p`, `720p`, `1080p`, `4k` | No | 360p is a fast draft; 1080p and 4K are upscaled and cost more. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "gemini-omni-flash-1.1", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 8, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Grok Imagine Video 1.5. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `grok-imagine-video-1.5` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Grok Imagine | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/grok-imagine-video-1.5` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/grok-imagine-video-1.5`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the scene, motion, camera and sound. | | `duration` | integer | `6` | 1 to 15 | No | Video length. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `16:9` | `16:9`, `4:3`, `3:2`, `1:1`, `2:3`, `3:4`, `9:16` | No | Frame shape. | | `resolution` | string | `720p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "grok-imagine-video-1.5", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 6, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Kling 2.5 Turbo Pro. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `kling-2.5-turbo-pro` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Kling | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/kling-2.5-turbo-pro` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/kling-2.5-turbo-pro`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 2500 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer | `5` | 5 to 10, in steps of 5 | No | Length of the video. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1` | No | Frame shape. | | `negative_prompt` | string | `blur, distort, and low quality` | Up to 2500 characters | No | Anything the video should not show. | | `cfg_scale` | number | `0.5` | 0 to 1, in steps of 0.1 | No | How closely the video follows the prompt: higher sticks to it more strictly. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "kling-2.5-turbo-pro", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Kling 3.0. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `kling-3.0` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Kling | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/kling-3.0` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/kling-3.0`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 2500 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer | `5` | 3 to 15 | No | Length of the video. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1` | No | Frame shape. | | `resolution` | string | `1080p` | `720p`, `1080p`, `4k` | No | Standard renders 720p, Pro 1080p and 4K 2160p. Higher modes cost more. | | `audio` | boolean | `true` | | No | Sound made with the video. Audio costs more on this model. | | `negative_prompt` | string | `blur, distort, and low quality` | Up to 2500 characters | No | Anything the video should not show. | | `cfg_scale` | number | `0.5` | 0 to 1, in steps of 0.1 | No | How closely the video follows the prompt: higher sticks to it more strictly. | | `shots` | string | | Up to 15048 characters | No | Optional. One shot per line, up to 6, for example "3s: Close-up of the cup". The lengths add up to the video length; a line without a length shares what is left. On fal the prompt is then not sent. | | `shot_type` | string | `customize` | `customize`, `intelligent` | No | As written follows your shots; Let the model plan splits the prompt into shots itself. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "kling-3.0", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Luma Ray 3.2. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `luma-ray-3.2` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Luma | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/luma-ray-3.2` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/luma-ray-3.2`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer | `5` | 5 to 10, in steps of 5 | No | Length of the video. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9` | No | Frame shape. | | `resolution` | string | `720p` | `540p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `loop` | boolean | `false` | | No | The last frame flows back into the first. Not with an end frame, HDR or 10 seconds. | | `dynamic_range` | string | `sdr` | `sdr`, `hdr` | No | HDR makes a 10-bit HDR10 video (720p or 1080p, 5 s) and costs more. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "luma-ray-3.2", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < MiniMax H3. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `minimax-h3` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | MiniMax | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/minimax-h3` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/minimax-h3`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 50000 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer | `5` | 5 to 15 | No | Length of the video. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9` | No | Frame shape. | | `resolution` | string | `768p` | `480p`, `768p`, `1440p`, `4k` | No | 480p and 768p are generated directly; 2K and 4K are upscaled from 768p and cost more. | | `prompt_expansion` | string | `disabled` | `disabled`, `fast`, `balanced`, `quality` | No | Off runs your prompt as written; the others let the model rewrite it first. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `audio` | audio | 1 | No | Optional soundtrack: it replaces the generated audio, trimmed to the video length. It does not make anyone speak it. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "minimax-h3", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 1.0 Pro. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `seedance-1.0-pro` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-1.0-pro` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-1.0-pro`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer | `5` | 2 to 12 | No | Length of the video. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `9:21` | No | Frame shape of the video. | | `resolution` | string | `1080p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `camera_fixed` | boolean | `false` | | No | Keep the camera still for the whole shot. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-1.0-pro", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 1.0 Pro Fast. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `seedance-1.0-pro-fast` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-1.0-pro-fast` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-1.0-pro-fast`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer | `5` | 2 to 12 | No | Length of the video. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `9:21` | No | Frame shape of the video. | | `resolution` | string | `1080p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `camera_fixed` | boolean | `false` | | No | Keep the camera still for the whole shot. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-1.0-pro-fast", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.0. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `seedance-2.0` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.0` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.0`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer or "auto" | `5` | 4 to 15 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `9:21`, `auto` | No | Frame shape of the video. Auto lets the model choose from the prompt. | | `resolution` | string | `720p` | `480p`, `720p`, `1080p`, `4k` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `bitrate` | string | `standard` | `standard`, `high` | No | High asks the model for a higher-quality, larger file at the same price. Only some hosts offer it. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.0", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.0 Fast. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `seedance-2.0-fast` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.0-fast` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.0-fast`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer or "auto" | `5` | 4 to 15 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `9:21`, `auto` | No | Frame shape of the video. Auto lets the model choose from the prompt. | | `resolution` | string | `720p` | `480p`, `720p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `bitrate` | string | `standard` | `standard`, `high` | No | High asks the model for a higher-quality, larger file at the same price. Only some hosts offer it. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.0-fast", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.0 Mini. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `seedance-2.0-mini` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.0-mini` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.0-mini`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer or "auto" | `5` | 4 to 15 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `9:21`, `auto` | No | Frame shape of the video. Auto lets the model choose from the prompt. | | `resolution` | string | `720p` | `480p`, `720p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.0-mini", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.5. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `seedance-2.5` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.5` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.5`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer or "auto" | `5` | 4 to 30 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `auto` | No | Frame shape of the video. Auto lets the model choose from the prompt. | | `resolution` | string | `720p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `bitrate` | string | `standard` | `standard`, `high` | No | High asks the model for a higher-quality, larger file at the same price. Only some hosts offer it. | | `draft` | boolean | `false` | | No | Make a quick 480p draft at the 480p price. If you like it, finish it in 1080p within 6 days with Upscale, Seedance 2.5 Finish in 1080p. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.5", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Veo 3.1. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `veo-3.1` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Veo | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/veo-3.1` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/veo-3.1`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 20000 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer | `8` | 4 to 8, in steps of 2 | No | Length of the video. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16` | No | Frame shape. | | `resolution` | string | `720p` | `720p`, `1080p`, `4k` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound made with the video. Audio costs more on this model. | | `negative_prompt` | string | | Up to 1000 characters | No | Anything the video should not show. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `count` | integer | `1` | 1 to 4 | No | How many videos to make from this request. Each one is charged. | ## Restrictions - When Vertex AI (Google) runs this route, Google rewrites the prompt to enhance it before generating; this cannot be turned off. ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "veo-3.1", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 8, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Veo 3.1 Fast. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `veo-3.1-fast` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Veo | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/veo-3.1-fast` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/veo-3.1-fast`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 20000 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer | `8` | 4 to 8, in steps of 2 | No | Length of the video. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16` | No | Frame shape. | | `resolution` | string | `720p` | `720p`, `1080p`, `4k` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound made with the video. Audio costs more on this model. | | `negative_prompt` | string | | Up to 1000 characters | No | Anything the video should not show. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `count` | integer | `1` | 1 to 4 | No | How many videos to make from this request. Each one is charged. | ## Restrictions - When Vertex AI (Google) runs this route, Google rewrites the prompt to enhance it before generating; this cannot be turned off. ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "veo-3.1-fast", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 8, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Wan 3.0. Generates a video from a text prompt. Generates a video from a text prompt. | | | | --- | --- | | Model ID | `wan-3.0` | | Task | [`text-to-video`](https://docs.halationlab.ai/models.md#text-to-video) | | Output | video | | Family | Wan | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/wan-3.0` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/wan-3.0`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 20000 characters | Yes | Describe the shot: subject, action, setting, camera and light. | | `duration` | integer or "auto" | `5` | 2 to 30 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `16:9` | `auto`, `16:9`, `9:16`, `1:1`, `4:3`, `3:4` | No | Frame shape. | | `resolution` | string | `720p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `prompt_expansion` | boolean | `false` | | No | Let the model rewrite the prompt for detail. Off runs your prompt as written. | | `thinking` | boolean | `false` | | No | The model reasons about the prompt first. Slower; the price is the same. | | `negative_prompt` | string | | Up to 2000 characters | No | Anything the video should not show. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "wan-3.0", "input": { "prompt": "A red ball rolls across a sunlit wooden table, slow tracking shot", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Gemini Omni Flash 1.1 image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `gemini-omni-flash-1.1-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Gemini Omni | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/gemini-omni-flash-1.1-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/gemini-omni-flash-1.1-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 20000 characters | Yes | Describe how the start frame moves. A second image is the end frame. | | `duration` | integer or "auto" | `8` | 3 to 10 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16` | No | Frame shape. | | `resolution` | string | `720p` | `360p`, `720p`, `1080p`, `4k` | No | 360p is a fast draft; 1080p and 4K are upscaled and cost more. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | Yes | | | `last_frame` | image | 1 | No | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "gemini-omni-flash-1.1-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 8, "aspect_ratio": "16:9", "first_frame": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Grok Imagine Video 1.5 image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `grok-imagine-video-1.5-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Grok Imagine | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/grok-imagine-video-1.5-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/grok-imagine-video-1.5-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe how the starting image moves and sounds. | | `duration` | integer | `6` | 1 to 15 | No | Video length. Longer videos cost more. In seconds. | | `resolution` | string | `720p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "grok-imagine-video-1.5-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 6, "first_frame": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Kling 2.5 Turbo Pro image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `kling-2.5-turbo-pro-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Kling | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/kling-2.5-turbo-pro-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/kling-2.5-turbo-pro-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 2500 characters | Yes | Describe how the start frame moves. A second image is the end frame. | | `duration` | integer | `5` | 5 to 10, in steps of 5 | No | Length of the video. Longer videos cost more. In seconds. | | `negative_prompt` | string | `blur, distort, and low quality` | Up to 2500 characters | No | Anything the video should not show. | | `cfg_scale` | number | `0.5` | 0 to 1, in steps of 0.1 | No | How closely the video follows the prompt: higher sticks to it more strictly. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | Yes | | | `last_frame` | image | 1 | No | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "kling-2.5-turbo-pro-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 5, "first_frame": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Kling 3.0 image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `kling-3.0-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Kling | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/kling-3.0-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/kling-3.0-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 2500 characters | Yes | Describe how the start frame moves. A second image is the end frame. Refer to elements as @Element1, @Element2. | | `duration` | integer | `5` | 3 to 15 | No | Length of the video. Longer videos cost more. In seconds. | | `resolution` | string | `1080p` | `720p`, `1080p`, `4k` | No | Standard renders 720p, Pro 1080p and 4K 2160p. Higher modes cost more. | | `audio` | boolean | `true` | | No | Sound made with the video. Audio costs more on this model. | | `negative_prompt` | string | `blur, distort, and low quality` | Up to 2500 characters | No | Anything the video should not show. | | `cfg_scale` | number | `0.5` | 0 to 1, in steps of 0.1 | No | How closely the video follows the prompt: higher sticks to it more strictly. | | `shots` | string | | Up to 15048 characters | No | Optional. One shot per line, up to 6, for example "3s: Close-up of the cup". The lengths add up to the video length; a line without a length shares what is left. On fal the prompt is then not sent. | | `shot_type` | string | `customize` | `customize`, `intelligent` | No | As written follows your shots; Let the model plan splits the prompt into shots itself. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | Yes | | | `last_frame` | image | 1 | No | | | `elements` | image, video | 0 to 12 | No | Each item is `{ "name", "image", "angles" }` (up to 3 angles) or `{ "name", "video" }`. Elements keep a character or object consistent: a main image plus 1 to 3 other angles, or one clip of 3 to 10 seconds. Refer to them as @Element1, @Element2. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "kling-3.0-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 5, "first_frame": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Luma Ray 3.2. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `luma-ray-3.2-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Luma | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/luma-ray-3.2-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/luma-ray-3.2-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe how the start frame moves, or what happens between the keyframes. A second image is the end frame. | | `duration` | integer | `5` | 5 to 5 | No | Length of the video. Longer videos cost more. In seconds. | | `resolution` | string | `720p` | `540p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `loop` | boolean | `false` | | No | The last frame flows back into the first. Not with an end frame, HDR or 10 seconds. | | `dynamic_range` | string | `sdr` | `sdr`, `hdr` | No | HDR makes a 10-bit HDR10 video (720p or 1080p, 5 s) and costs more. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | No | | | `last_frame` | image | 1 | No | | | `keyframes` | image | 0 to 64 | No | Each item is `{ "media": …, "at": seconds }`: when the keyframe appears. Keyframes pin images to moments in the video, in place of a start and end frame. Up to 64, each at its own time. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "luma-ray-3.2-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 5 } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < MiniMax H3 image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `minimax-h3-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | MiniMax | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/minimax-h3-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/minimax-h3-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 50000 characters | Yes | Describe how the frames move. Give a start frame, an end frame or both. | | `duration` | integer | `5` | 5 to 15 | No | Length of the video. Longer videos cost more. In seconds. | | `resolution` | string | `768p` | `480p`, `768p`, `1440p`, `4k` | No | 480p and 768p are generated directly; 2K and 4K are upscaled from 768p and cost more. | | `prompt_expansion` | string | `disabled` | `disabled`, `fast`, `balanced`, `quality` | No | Off runs your prompt as written; the others let the model rewrite it first. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | No | | | `last_frame` | image | 1 | No | | | `audio` | audio | 1 | No | Optional soundtrack: it replaces the generated audio, trimmed to the video length. It does not make anyone speak it. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "minimax-h3-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 5 } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 1.0 Pro Fast image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `seedance-1.0-pro-fast-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-1.0-pro-fast-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-1.0-pro-fast-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe how the start frame moves. | | `duration` | integer | `5` | 2 to 12 | No | Length of the video. Longer videos cost more. In seconds. | | `resolution` | string | `1080p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `camera_fixed` | boolean | `false` | | No | Keep the camera still for the whole shot. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-1.0-pro-fast-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 5, "first_frame": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 1.0 Pro image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `seedance-1.0-pro-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-1.0-pro-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-1.0-pro-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe how the start frame moves. A second image is the end frame. | | `duration` | integer | `5` | 2 to 12 | No | Length of the video. Longer videos cost more. In seconds. | | `resolution` | string | `1080p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `camera_fixed` | boolean | `false` | | No | Keep the camera still for the whole shot. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | Yes | | | `last_frame` | image | 1 | No | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-1.0-pro-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 5, "first_frame": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.0 Fast image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `seedance-2.0-fast-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.0-fast-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.0-fast-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe how the start frame moves. A second image is the end frame. | | `duration` | integer or "auto" | `5` | 4 to 15 | No | Length of the video. Longer videos cost more. | | `resolution` | string | `720p` | `480p`, `720p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `bitrate` | string | `standard` | `standard`, `high` | No | High asks the model for a higher-quality, larger file at the same price. Only some hosts offer it. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | Yes | Seedance can't use reference images or videos that show real people's faces. | | `last_frame` | image | 1 | No | Seedance can't use reference images or videos that show real people's faces. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.0-fast-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 5, "first_frame": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.0 image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `seedance-2.0-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.0-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.0-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe how the start frame moves. A second image is the end frame. | | `duration` | integer or "auto" | `5` | 4 to 15 | No | Length of the video. Longer videos cost more. | | `resolution` | string | `720p` | `480p`, `720p`, `1080p`, `4k` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `bitrate` | string | `standard` | `standard`, `high` | No | High asks the model for a higher-quality, larger file at the same price. Only some hosts offer it. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | Yes | Seedance can't use reference images or videos that show real people's faces. | | `last_frame` | image | 1 | No | Seedance can't use reference images or videos that show real people's faces. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.0-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 5, "first_frame": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.0 Mini image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `seedance-2.0-mini-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.0-mini-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.0-mini-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe how the start frame moves. A second image is the end frame. | | `duration` | integer or "auto" | `5` | 4 to 15 | No | Length of the video. Longer videos cost more. | | `resolution` | string | `720p` | `480p`, `720p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | Yes | Seedance can't use reference images or videos that show real people's faces. | | `last_frame` | image | 1 | No | Seedance can't use reference images or videos that show real people's faces. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.0-mini-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 5, "first_frame": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.5 image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `seedance-2.5-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.5-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.5-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe how the start frame moves. A second image is the end frame. | | `duration` | integer or "auto" | `5` | 4 to 30 | No | Length of the video. Longer videos cost more. | | `resolution` | string | `720p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `bitrate` | string | `standard` | `standard`, `high` | No | High asks the model for a higher-quality, larger file at the same price. Only some hosts offer it. | | `draft` | boolean | `false` | | No | Make a quick 480p draft at the 480p price. If you like it, finish it in 1080p within 6 days with Upscale, Seedance 2.5 Finish in 1080p. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | Yes | Seedance can't use reference images or videos that show real people's faces. | | `last_frame` | image | 1 | No | Seedance can't use reference images or videos that show real people's faces. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.5-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 5, "first_frame": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Veo 3.1 Fast image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `veo-3.1-fast-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Veo | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/veo-3.1-fast-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/veo-3.1-fast-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 20000 characters | Yes | Describe how the start frame moves. A second image is the end frame. | | `duration` | integer | `8` | 4 to 8, in steps of 2 | No | Length of the video. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `auto` | `auto`, `16:9`, `9:16` | No | Frame shape. | | `resolution` | string | `720p` | `720p`, `1080p`, `4k` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound made with the video. Audio costs more on this model. | | `negative_prompt` | string | | Up to 1000 characters | No | Anything the video should not show. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `count` | integer | `1` | 1 to 4 | No | How many videos to make from this request. Each one is charged. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | Yes | | | `last_frame` | image | 1 | No | | ## Restrictions - When Vertex AI (Google) runs this route, Google rewrites the prompt to enhance it before generating; this cannot be turned off. ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "veo-3.1-fast-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 8, "aspect_ratio": "auto", "first_frame": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Veo 3.1 image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `veo-3.1-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Veo | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/veo-3.1-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/veo-3.1-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 20000 characters | Yes | Describe how the start frame moves. A second image is the end frame. | | `duration` | integer | `8` | 4 to 8, in steps of 2 | No | Length of the video. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `auto` | `auto`, `16:9`, `9:16` | No | Frame shape. | | `resolution` | string | `720p` | `720p`, `1080p`, `4k` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound made with the video. Audio costs more on this model. | | `negative_prompt` | string | | Up to 1000 characters | No | Anything the video should not show. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `count` | integer | `1` | 1 to 4 | No | How many videos to make from this request. Each one is charged. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | Yes | | | `last_frame` | image | 1 | No | | ## Restrictions - When Vertex AI (Google) runs this route, Google rewrites the prompt to enhance it before generating; this cannot be turned off. ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "veo-3.1-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 8, "aspect_ratio": "auto", "first_frame": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Wan 3.0 image-to-video. Animates an image into a video, from a first frame and optionally a last frame. Animates an image into a video, from a first frame and optionally a last frame. | | | | --- | --- | | Model ID | `wan-3.0-image-to-video` | | Task | [`image-to-video`](https://docs.halationlab.ai/models.md#image-to-video) | | Output | video | | Family | Wan | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/wan-3.0-image-to-video` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/wan-3.0-image-to-video`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 20000 characters | Yes | Describe how the start frame moves. A second image is the end frame. | | `duration` | integer or "auto" | `5` | 2 to 30 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `auto` | `auto`, `16:9`, `9:16`, `1:1`, `4:3`, `3:4` | No | Frame shape. | | `resolution` | string | `720p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `prompt_expansion` | boolean | `false` | | No | Let the model rewrite the prompt for detail. Off runs your prompt as written. | | `thinking` | boolean | `false` | | No | The model reasons about the prompt first. Slower; the price is the same. | | `negative_prompt` | string | | Up to 2000 characters | No | Anything the video should not show. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `first_frame` | image | 1 | Yes | | | `last_frame` | image | 1 | No | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "wan-3.0-image-to-video", "input": { "prompt": "The ball rolls slowly to the right, soft studio light", "duration": 5, "aspect_ratio": "auto", "first_frame": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Gemini Omni Flash 1.1 references. Generates a video that follows reference images or clips. Generates a video that follows reference images or clips. | | | | --- | --- | | Model ID | `gemini-omni-flash-1.1-references` | | Task | [`reference-to-video`](https://docs.halationlab.ai/models.md#reference-to-video) | | Output | video | | Family | Gemini Omni | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/gemini-omni-flash-1.1-references` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/gemini-omni-flash-1.1-references`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 20000 characters | Yes | Describe the video. Refer to the references as [Image1], [Video1] and so on. | | `duration` | integer or "auto" | `8` | 3 to 10 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16` | No | Frame shape. | | `resolution` | string | `720p` | `360p`, `720p`, `1080p`, `4k` | No | 360p is a fast draft; 1080p and 4K are upscaled and cost more. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 0 to 10 | No | | | `reference_videos` | video | 0 to 3 | No | Reference videos of up to 3 seconds each; their sound is ignored. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "gemini-omni-flash-1.1-references", "input": { "prompt": "The red ball from the reference bounces on a wooden table, slow motion", "duration": 8, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Grok Imagine Video 1.5 reference-to-video. Generates a video that follows reference images or clips. Generates a video that follows reference images or clips. | | | | --- | --- | | Model ID | `grok-imagine-video-1.5-references` | | Task | [`reference-to-video`](https://docs.halationlab.ai/models.md#reference-to-video) | | Output | video | | Family | Grok Imagine | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/grok-imagine-video-1.5-references` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/grok-imagine-video-1.5-references`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the video. Refer to images as , and so on. | | `duration` | integer | `8` | 1 to 15 | No | Video length. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `16:9` | `16:9`, `4:3`, `3:2`, `1:1`, `2:3`, `3:4`, `9:16` | No | Frame shape. | | `resolution` | string | `480p` | `480p`, `720p` | No | Output resolution. Higher resolutions cost more. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 1 to 7 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "grok-imagine-video-1.5-references", "input": { "prompt": "The red ball from the reference bounces on a wooden table, slow motion", "duration": 8, "aspect_ratio": "16:9", "references": [ "https://docs.halationlab.ai/media/sample-image.png" ] } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < MiniMax H3 references. Generates a video that follows reference images or clips. Generates a video that follows reference images or clips. | | | | --- | --- | | Model ID | `minimax-h3-references` | | Task | [`reference-to-video`](https://docs.halationlab.ai/models.md#reference-to-video) | | Output | video | | Family | MiniMax | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/minimax-h3-references` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/minimax-h3-references`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 50000 characters | Yes | Describe the video. Refer to the references as [Image1], [Video1] and so on. | | `duration` | integer | `5` | 5 to 15 | No | Length of the video. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `auto` | `auto`, `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9` | No | Frame shape. | | `resolution` | string | `768p` | `480p`, `768p`, `1440p`, `4k` | No | 480p and 768p are generated directly; 2K and 4K are upscaled from 768p and cost more. | | `prompt_expansion` | string | `disabled` | `disabled`, `fast`, `balanced`, `quality` | No | Off runs your prompt as written; the others let the model rewrite it first. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 0 to 9 | No | The first 5 reference images are included; each one after that costs more. | | `reference_videos` | video | 0 to 3 | No | Reference videos of 2 to 15 seconds, 15 seconds in total. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "minimax-h3-references", "input": { "prompt": "The red ball from the reference bounces on a wooden table, slow motion", "duration": 5, "aspect_ratio": "auto" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.0. Generates a video that follows reference images or clips. Generates a video that follows reference images or clips. | | | | --- | --- | | Model ID | `seedance-2.0-references` | | Task | [`reference-to-video`](https://docs.halationlab.ai/models.md#reference-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.0-references` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.0-references`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe the shot. Refer to the references as [Image1], [Video1] and so on. | | `duration` | integer or "auto" | `5` | 4 to 15 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `9:21`, `auto` | No | Frame shape of the video. Auto lets the model choose from the prompt. | | `resolution` | string | `720p` | `480p`, `720p`, `1080p`, `4k` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `bitrate` | string | `standard` | `standard`, `high` | No | High asks the model for a higher-quality, larger file at the same price. Only some hosts offer it. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 0 to 9 | No | Seedance can't use reference images or videos that show real people's faces. | | `reference_videos` | video | 0 to 3 | No | Seedance can't use reference images or videos that show real people's faces. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.0-references", "input": { "prompt": "The red ball from the reference bounces on a wooden table, slow motion", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.0 Fast. Generates a video that follows reference images or clips. Generates a video that follows reference images or clips. | | | | --- | --- | | Model ID | `seedance-2.0-fast-references` | | Task | [`reference-to-video`](https://docs.halationlab.ai/models.md#reference-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.0-fast-references` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.0-fast-references`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe the shot. Refer to the references as [Image1], [Video1] and so on. | | `duration` | integer or "auto" | `5` | 4 to 15 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `9:21`, `auto` | No | Frame shape of the video. Auto lets the model choose from the prompt. | | `resolution` | string | `720p` | `480p`, `720p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `bitrate` | string | `standard` | `standard`, `high` | No | High asks the model for a higher-quality, larger file at the same price. Only some hosts offer it. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 0 to 9 | No | Seedance can't use reference images or videos that show real people's faces. | | `reference_videos` | video | 0 to 3 | No | Seedance can't use reference images or videos that show real people's faces. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.0-fast-references", "input": { "prompt": "The red ball from the reference bounces on a wooden table, slow motion", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.0 Mini. Generates a video that follows reference images or clips. Generates a video that follows reference images or clips. | | | | --- | --- | | Model ID | `seedance-2.0-mini-references` | | Task | [`reference-to-video`](https://docs.halationlab.ai/models.md#reference-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.0-mini-references` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.0-mini-references`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe the shot. Refer to the references as [Image1], [Video1] and so on. | | `duration` | integer or "auto" | `5` | 4 to 15 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `9:21`, `auto` | No | Frame shape of the video. Auto lets the model choose from the prompt. | | `resolution` | string | `720p` | `480p`, `720p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 0 to 9 | No | Seedance can't use reference images or videos that show real people's faces. | | `reference_videos` | video | 0 to 3 | No | Seedance can't use reference images or videos that show real people's faces. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.0-mini-references", "input": { "prompt": "The red ball from the reference bounces on a wooden table, slow motion", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.5. Generates a video that follows reference images or clips. Generates a video that follows reference images or clips. | | | | --- | --- | | Model ID | `seedance-2.5-references` | | Task | [`reference-to-video`](https://docs.halationlab.ai/models.md#reference-to-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.5-references` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.5-references`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe the shot. Refer to the references as [Image1], [Video1] and so on. | | `duration` | integer or "auto" | `5` | 4 to 30 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `auto` | No | Frame shape of the video. Auto lets the model choose from the prompt. | | `resolution` | string | `720p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `bitrate` | string | `standard` | `standard`, `high` | No | High asks the model for a higher-quality, larger file at the same price. Only some hosts offer it. | | `draft` | boolean | `false` | | No | Make a quick 480p draft at the 480p price. If you like it, finish it in 1080p within 6 days with Upscale, Seedance 2.5 Finish in 1080p. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 0 to 30 | No | Seedance can't use reference images or videos that show real people's faces. | | `reference_videos` | video | 0 to 10 | No | Seedance can't use reference images or videos that show real people's faces. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.5-references", "input": { "prompt": "The red ball from the reference bounces on a wooden table, slow motion", "duration": 5, "aspect_ratio": "16:9" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Veo 3.1 references. Generates a video that follows reference images or clips. Generates a video that follows reference images or clips. | | | | --- | --- | | Model ID | `veo-3.1-references` | | Task | [`reference-to-video`](https://docs.halationlab.ai/models.md#reference-to-video) | | Output | video | | Family | Veo | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/veo-3.1-references` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/veo-3.1-references`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 20000 characters | Yes | Describe the video. The references keep the subject's appearance. | | `duration` | integer | `8` | 8 to 8 | No | Length of the video. Longer videos cost more. In seconds. | | `aspect_ratio` | string | `16:9` | `16:9`, `9:16` | No | Frame shape. | | `resolution` | string | `720p` | `720p`, `1080p`, `4k` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound made with the video. Audio costs more on this model. | | `negative_prompt` | string | | Up to 1000 characters | No | Anything the video should not show. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `count` | integer | `1` | 1 to 4 | No | How many videos to make from this request. Each one is charged. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 1 to 3 | Yes | | ## Restrictions - When Vertex AI (Google) runs this route, Google rewrites the prompt to enhance it before generating; this cannot be turned off. ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "veo-3.1-references", "input": { "prompt": "The red ball from the reference bounces on a wooden table, slow motion", "duration": 8, "aspect_ratio": "16:9", "references": [ "https://docs.halationlab.ai/media/sample-image.png" ] } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Wan 3.0 references. Generates a video that follows reference images or clips. Generates a video that follows reference images or clips. | | | | --- | --- | | Model ID | `wan-3.0-references` | | Task | [`reference-to-video`](https://docs.halationlab.ai/models.md#reference-to-video) | | Output | video | | Family | Wan | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/wan-3.0-references` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/wan-3.0-references`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 20000 characters | Yes | Describe the video. Refer to the references as [Image1], [Video1] and so on. | | `duration` | integer or "auto" | `5` | 2 to 30 | No | Length of the video. Longer videos cost more. | | `aspect_ratio` | string | `auto` | `auto`, `16:9`, `9:16`, `1:1`, `4:3`, `3:4` | No | Frame shape. | | `resolution` | string | `720p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `prompt_expansion` | boolean | `false` | | No | Let the model rewrite the prompt for detail. Off runs your prompt as written. | | `thinking` | boolean | `false` | | No | The model reasons about the prompt first. Slower; the price is the same. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 0 to 10 | No | | | `reference_videos` | video | 0 to 5 | No | Reference videos of 15 seconds in total, at least 16 fps. Their seconds are charged as well as the output. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "wan-3.0-references", "input": { "prompt": "The red ball from the reference bounces on a wooden table, slow motion", "duration": 5, "aspect_ratio": "auto" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < FLUX.3 Extend. Continues a video with new footage. Continues a video with new footage. | | | | --- | --- | | Model ID | `flux.3-extend` | | Task | [`extend-video`](https://docs.halationlab.ai/models.md#extend-video) | | Output | video | | Family | FLUX | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/flux.3-extend` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/flux.3-extend`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe how the scene continues, including its sound. | | `duration` | integer or "auto" | `5` | 5 to 20 | No | Seconds added after the source clip (the output is the new part). | | `resolution` | string | `720p` | `720p`, `1080p` | No | Output resolution. 1080p is finished by the model's upsampler and costs more. | | `quality` | string | `full` | `full`, `draft` | No | Draft is a quick 720p preview at under a third of the price. | | `audio` | boolean | `true` | | No | Sound for the new part, carried on from the source. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | video | 1 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "flux.3-extend", "input": { "prompt": "The ball keeps rolling and slows to a stop", "duration": 5, "source": "https://docs.halationlab.ai/media/sample-video.mp4" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Gemini Omni Flash 1.1 Extend. Continues a video with new footage. Continues a video with new footage. | | | | --- | --- | | Model ID | `gemini-omni-flash-1.1-extend` | | Task | [`extend-video`](https://docs.halationlab.ai/models.md#extend-video) | | Output | video | | Family | Gemini Omni | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/gemini-omni-flash-1.1-extend` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/gemini-omni-flash-1.1-extend`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 2500 characters | Yes | Describe how the scene continues. | | `duration` | integer | `5` | 3 to 10 | No | Seconds added after the source clip. In seconds. | | `resolution` | string | `720p` | `720p` | No | 720p. Other resolutions have no published price yet. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | video | 1 | Yes | | ## Restrictions - A video Gemini Omni made for you through Google in the last 54 days is extended from Google's stored copy, from sources up to 30 seconds and up to 40 seconds in all; other sources up to 10 seconds. In the United Kingdom only those videos can be extended: Google does not offer Gemini extensions of uploaded videos there. ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "gemini-omni-flash-1.1-extend", "input": { "prompt": "The ball keeps rolling and slows to a stop", "duration": 5, "source": "https://docs.halationlab.ai/media/sample-video.mp4" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.5 Extend. Continues a video with new footage. Continues a video with new footage. | | | | --- | --- | | Model ID | `seedance-2.5-extend` | | Task | [`extend-video`](https://docs.halationlab.ai/models.md#extend-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.5-extend` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.5-extend`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe how the scene continues. Refer to reference images as [Image1] and so on. | | `duration` | integer or "auto" | `5` | 4 to 30 | No | Seconds added after the source clip (the output is the new part). | | `context` | string | `2` | `2`, `5`, `10`, `30` | No | How much of the end of your clip the model sees. More context keeps the continuation consistent; some hosts also bill those seconds. | | `resolution` | string | `720p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `bitrate` | string | `standard` | `standard`, `high` | No | High asks the model for a higher-quality, larger file at the same price. Only some hosts offer it. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | video | 1 | Yes | Seedance can't use reference images or videos that show real people's faces. | | `references` | image | 0 to 30 | No | Seedance can't use reference images or videos that show real people's faces. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.5-extend", "input": { "prompt": "The ball keeps rolling and slows to a stop", "duration": 5, "source": "https://docs.halationlab.ai/media/sample-video.mp4" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < FLUX.3 Edit Video [fast]. Changes a video by instruction. Changes a video by instruction. | | | | --- | --- | | Model ID | `flux.3-edit-video-fast` | | Task | [`edit-video`](https://docs.halationlab.ai/models.md#edit-video) | | Output | video | | Family | FLUX | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/flux.3-edit-video-fast` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/flux.3-edit-video-fast`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 2500 characters | Yes | Describe what to change and what to keep. The edit keeps the source length. | | `keep_source_sound` | boolean | `true` | | No | Copy the source clip's sound onto the edit, exactly as it was. Off keeps the sound the model returns. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | video | 1 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "flux.3-edit-video-fast", "input": { "prompt": "Make the background a deep blue night sky", "source": "https://docs.halationlab.ai/media/sample-video.mp4" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Gemini Omni Flash 1.1 Edit. Changes a video by instruction. Changes a video by instruction. | | | | --- | --- | | Model ID | `gemini-omni-flash-1.1-edit` | | Task | [`edit-video`](https://docs.halationlab.ai/models.md#edit-video) | | Output | video | | Family | Gemini Omni | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/gemini-omni-flash-1.1-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/gemini-omni-flash-1.1-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 2500 characters | Yes | Describe what to change and what to keep. The edit keeps the source length. | | `resolution` | string | `720p` | `360p`, `720p`, `1080p`, `4k` | No | Output resolution. 360p is a quick draft; 1080p and 4K are upscaled by the model. Higher resolutions cost more. | | `keep_source_sound` | boolean | `true` | | No | Copy the source clip's sound onto the edit, exactly as it was. Off uses the sound Gemini Omni makes for the edit. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | video | 1 | Yes | | ## Restrictions - A video Gemini Omni made for you through Google in the last 54 days is edited from Google's stored copy. In the United Kingdom only those videos can be edited: Google does not offer Gemini edits of uploaded videos there. ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "gemini-omni-flash-1.1-edit", "input": { "prompt": "Make the background a deep blue night sky", "source": "https://docs.halationlab.ai/media/sample-video.mp4" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Kling O3 Edit. Changes a video by instruction. Changes a video by instruction. | | | | --- | --- | | Model ID | `kling-o3-edit` | | Task | [`edit-video`](https://docs.halationlab.ai/models.md#edit-video) | | Output | video | | Family | Kling | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/kling-o3-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/kling-o3-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 2500 characters | Yes | Describe what to change and what to keep. Refer to the source as [Video1] and to reference images as [Image1] to [Image4]. The edit keeps the source length. | | `mode` | string | `standard` | `standard`, `pro`, `4k` | No | Pro renders at 1080p and 4K at 2160p; each costs more. | | `keep_audio` | boolean | `true` | | No | Keep the source clip's sound in the edit. Off makes the edit silent. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | video | 1 | Yes | | | `references` | image | 0 to 4 | No | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "kling-o3-edit", "input": { "prompt": "Make the background a deep blue night sky", "source": "https://docs.halationlab.ai/media/sample-video.mp4" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.5 Edit. Changes a video by instruction. Changes a video by instruction. | | | | --- | --- | | Model ID | `seedance-2.5-edit` | | Task | [`edit-video`](https://docs.halationlab.ai/models.md#edit-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.5-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.5-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 6000 characters | Yes | Describe what to change and what to keep. The edit keeps the source length (up to 30 s). Refer to reference images as [Image1] and so on. | | `resolution` | string | `720p` | `480p`, `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | | `audio` | boolean | `true` | | No | Sound effects, ambience and speech made with the video. The price is the same with or without audio. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `bitrate` | string | `standard` | `standard`, `high` | No | High asks the model for a higher-quality, larger file at the same price. Only some hosts offer it. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | video | 1 | Yes | Seedance can't use reference images or videos that show real people's faces. | | `references` | image | 0 to 30 | No | Seedance can't use reference images or videos that show real people's faces. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.5-edit", "input": { "prompt": "Make the background a deep blue night sky", "source": "https://docs.halationlab.ai/media/sample-video.mp4" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < LTX 2.3 Reframe. Changes the frame shape of a video, filling the new area. Changes the frame shape of a video, filling the new area. | | | | --- | --- | | Model ID | `ltx-2.3-reframe` | | Task | [`reframe-video`](https://docs.halationlab.ai/models.md#reframe-video) | | Output | video | | Family | LTX | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/ltx-2.3-reframe` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/ltx-2.3-reframe`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `aspect_ratio` | string | `9:16` | `16:9`, `9:16`, `1:1`, `4:5`, `5:4` | No | The new frame shape. The edges are generated to fill it. | | `resolution` | string | `720p` | `720p`, `1080p` | No | Output resolution. Higher resolutions cost more. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | video | 1 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "ltx-2.3-reframe", "input": { "aspect_ratio": "9:16", "source": "https://docs.halationlab.ai/media/sample-video.mp4" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Wan VACE Long Reframe. Changes the frame shape of a video, filling the new area. Changes the frame shape of a video, filling the new area. | | | | --- | --- | | Model ID | `wan-vace-long-reframe` | | Task | [`reframe-video`](https://docs.halationlab.ai/models.md#reframe-video) | | Output | video | | Family | Wan | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/wan-vace-long-reframe` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/wan-vace-long-reframe`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `aspect_ratio` | string | `9:16` | `16:9`, `1:1`, `9:16` | No | The new frame shape. The edges are generated to fill it. | | `resolution` | string | `720p` | `480p`, `580p`, `720p` | No | Output resolution. Higher resolutions cost more. | | `prompt` | string | | Up to 1000 characters | No | Optional. What should appear in the areas the reframe adds. | | `zoom` | number | `0` | 0 to 0.9, in steps of 0.05 | No | Crop into the source before reframing, as a share of the canvas. 0 keeps the whole source. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | video | 1 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "wan-vace-long-reframe", "input": { "aspect_ratio": "9:16", "prompt": "Keep the ball in the centre of the frame", "source": "https://docs.halationlab.ai/media/sample-video.mp4" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < ByteDance Upscaler. Raises the resolution of a video. Raises the resolution of a video. | | | | --- | --- | | Model ID | `bytedance-upscaler` | | Task | [`upscale-video`](https://docs.halationlab.ai/models.md#upscale-video) | | Output | video | | Family | ByteDance Upscaler | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/bytedance-upscaler` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/bytedance-upscaler`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `target_size` | string | `1920x1080` | `1280x720`, `1920x1080`, `2560x1440`, `3840x2160` | No | The upscaled short side. Larger sizes cost more. | | `tier` | string | `standard` | `fast`, `standard`, `pro` | No | Fast is quickest; Pro restores faces, skin and fine detail with a larger model and costs ten times as much. | | `frame_rate` | string | `source` | `source`, `60`, `120` | No | Same as source keeps every frame. 60 and 120 fps add interpolated frames and cost twice as much. | | `preset` | string | `aigc` | `aigc`, `ugc`, `short_series`, `old_film`, `general` | No | Tunes the enhancement to the footage. | | `fidelity` | string | `high` | `high`, `medium` | No | Light stays closest to the source; Balanced enhances more. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | video | 1 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "bytedance-upscaler", "input": { "source": "https://docs.halationlab.ai/media/sample-video.mp4" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < FLUX Video Upscale. Raises the resolution of a video. Raises the resolution of a video. | | | | --- | --- | | Model ID | `flux-video-upscale` | | Task | [`upscale-video`](https://docs.halationlab.ai/models.md#upscale-video) | | Output | video | | Family | FLUX | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/flux-video-upscale` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/flux-video-upscale`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `target_size` | string | `1920x1080` | `1920x1080`, `2560x1440`, `3840x2160` | No | The upscaled short side. Larger sizes cost more. | | `mode` | string | `precise` | `precise`, `creative` | No | Precise keeps the source faithful; Creative adds fine detail and costs more. | | `prompt` | string | | Up to 1000 characters | No | Optional. Guides the detail the upscale adds, most in Creative mode. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | video | 1 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "flux-video-upscale", "input": { "prompt": "A red ball on a wooden table", "source": "https://docs.halationlab.ai/media/sample-video.mp4" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedance 2.5 Finish in 1080p. Raises the resolution of a video. Raises the resolution of a video. | | | | --- | --- | | Model ID | `seedance-2.5-finish-in-1080p` | | Task | [`upscale-video`](https://docs.halationlab.ai/models.md#upscale-video) | | Output | video | | Family | Seedance | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedance-2.5-finish-in-1080p` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedance-2.5-finish-in-1080p`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `resolution` | string | `1080p` | `1080p` | No | A finished draft is always 1080p. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | video | 1 | Yes | | ## Restrictions - Finishes a Seedance 2.5 draft made in the last 6 days, on the host that made it. ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedance-2.5-finish-in-1080p", "input": { "source": "https://docs.halationlab.ai/media/sample-video.mp4" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < FLUX.2 [pro]. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `flux.2-pro` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | FLUX | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/flux.2-pro` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/flux.2-pro`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `4:5`, `5:4` | No | Frame shape of the image. | | `size` | string | `1MP` | `1MP`, `2MP`, `4MP` | No | Output size. Larger sizes cost more. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "flux.2-pro", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < GPT Image 2.5 Flare. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `gpt-image-2.5-flare` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | GPT Image | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/gpt-image-2.5-flare` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/gpt-image-2.5-flare`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 32000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | `1:1`, `3:2`, `2:3`, `4:3`, `3:4`, `16:9`, `9:16`, `4:5`, `5:4` | No | Frame shape of the image. | | `size` | string | `1K` | `1K`, `2K`, `4K` | No | Output size. Larger sizes cost more; 4K is experimental at OpenAI and may vary. | | `quality` | string | `medium` | `low`, `medium`, `high`, `xhigh`, `max` | No | Higher quality takes longer and costs more. | | `count` | integer | `1` | 1 to 10 | No | How many images to make. Each one is charged. | | `transparent` | boolean | `false` | | No | Makes a PNG with a transparent background. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "gpt-image-2.5-flare", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < GPT Image 2.5 Sunburst. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `gpt-image-2.5-sunburst` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | GPT Image | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/gpt-image-2.5-sunburst` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/gpt-image-2.5-sunburst`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 32000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | `1:1`, `3:2`, `2:3`, `4:3`, `3:4`, `16:9`, `9:16`, `4:5`, `5:4` | No | Frame shape of the image. | | `size` | string | `1K` | `1K`, `2K`, `4K` | No | Output size. Larger sizes cost more; 4K is experimental at OpenAI and may vary. | | `quality` | string | `medium` | `low`, `medium`, `high`, `xhigh`, `max` | No | Higher quality takes longer and costs more. | | `count` | integer | `1` | 1 to 10 | No | How many images to make. Each one is charged. | | `transparent` | boolean | `false` | | No | Makes a PNG with a transparent background. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "gpt-image-2.5-sunburst", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Grok Imagine Image 2.0. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `grok-imagine-image-2.0` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | Grok Imagine | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/grok-imagine-image-2.0` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/grok-imagine-image-2.0`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | 13 values, [listed below](#aspect_ratio-values) | No | Frame shape. | | `size` | string | `1k` | `1k`, `2k` | No | 2K renders more detail and costs more on fal. | | `quality` | string | `medium` | `low`, `medium` | No | Medium renders more detail and costs more on fal. | | `format` | string | `jpeg` | `jpeg`, `png`, `webp` | No | File format of the generated image. | | `count` | integer | `1` | 1 to 10 | No | How many images to make. Each one is charged. | ### `aspect_ratio` values `2:1`, `20:9`, `19.5:9`, `16:9`, `4:3`, `3:2`, `1:1`, `2:3`, `3:4`, `9:16`, `9:19.5`, `9:20`, `1:2` ## Restrictions - xAI may revise the submitted image prompt. The requested prompt and host provenance remain on the result. ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "grok-imagine-image-2.0", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Ideogram 4.0. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `ideogram-4.0` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | Ideogram | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/ideogram-4.0` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/ideogram-4.0`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | 21 values, [listed below](#aspect_ratio-values) | No | Frame shape of the image. | | `speed` | string | `balanced` | `turbo`, `balanced`, `quality` | No | Quality renders more detail and costs more. | | `copyright_check` | boolean | `false` | | No | Ideogram checks each image after it is made; a match is withheld and reported as blocked. | ### `aspect_ratio` values `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `2:1`, `1:2`, `4:5`, `5:4`, `16:10`, `10:16`, `12:5`, `5:12`, `22:9`, `9:22`, `23:9`, `9:23`, `8:3`, `3:8` ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "ideogram-4.0", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Nano Banana 2.1. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `nano-banana-2.1` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | Nano Banana | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/nano-banana-2.1` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/nano-banana-2.1`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 50000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | 14 values, [listed below](#aspect_ratio-values) | No | Frame shape of the image. | | `size` | string | `1K` | `1K`, `2K`, `4K` | No | Output size. 4K costs more. | | `count` | integer | `1` | 1 to 4 | No | How many images to make. Each one is charged. | | `thinking` | string | `medium` | `minimal`, `medium`, `high` | No | More reasoning helps with dense layouts and text; it takes longer and High costs a little more. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ### `aspect_ratio` values `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `21:9`, `4:5`, `5:4`, `4:1`, `1:4`, `8:1`, `1:8` ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "nano-banana-2.1", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Nano Banana Pro. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `nano-banana-pro` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | Nano Banana | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/nano-banana-pro` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/nano-banana-pro`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 50000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `21:9`, `4:5`, `5:4` | No | Frame shape of the image. | | `size` | string | `1K` | `1K`, `2K`, `4K` | No | Output size. 4K costs more. | | `count` | integer | `1` | 1 to 4 | No | How many images to make. Each one is charged. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "nano-banana-pro", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Recraft V4. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `recraft-v4` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | Recraft | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/recraft-v4` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/recraft-v4`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 10000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | 14 values, [listed below](#aspect_ratio-values) | No | Frame shape of the image. | | `colors` | string | | Up to 64 characters | No | Up to five preferred colours as hex values, separated by commas (for example #DB2F00, #1E2A44). Leave empty for none. | | `background_color` | string | | Up to 9 characters | No | A preferred background colour as a hex value (for example #FFFFFF). Leave empty for none. | ### `aspect_ratio` values `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `2:1`, `1:2`, `5:4`, `4:5`, `14:10`, `10:14`, `6:10` ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "recraft-v4", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Recraft V4 Pro. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `recraft-v4-pro` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | Recraft | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/recraft-v4-pro` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/recraft-v4-pro`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 10000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | 14 values, [listed below](#aspect_ratio-values) | No | Frame shape of the image. | | `colors` | string | | Up to 64 characters | No | Up to five preferred colours as hex values, separated by commas (for example #DB2F00, #1E2A44). Leave empty for none. | | `background_color` | string | | Up to 9 characters | No | A preferred background colour as a hex value (for example #FFFFFF). Leave empty for none. | ### `aspect_ratio` values `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `2:1`, `1:2`, `5:4`, `4:5`, `14:10`, `10:14`, `6:10` ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "recraft-v4-pro", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Recraft V4 Pro Vector. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `recraft-v4-pro-vector` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | Recraft | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/recraft-v4-pro-vector` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/recraft-v4-pro-vector`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 10000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | 14 values, [listed below](#aspect_ratio-values) | No | Frame shape of the image. | | `colors` | string | | Up to 64 characters | No | Up to five preferred colours as hex values, separated by commas (for example #DB2F00, #1E2A44). Leave empty for none. | | `background_color` | string | | Up to 9 characters | No | A preferred background colour as a hex value (for example #FFFFFF). Leave empty for none. | ### `aspect_ratio` values `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `2:1`, `1:2`, `5:4`, `4:5`, `14:10`, `10:14`, `6:10` ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "recraft-v4-pro-vector", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Recraft V4 Vector. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `recraft-v4-vector` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | Recraft | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/recraft-v4-vector` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/recraft-v4-vector`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 10000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | 14 values, [listed below](#aspect_ratio-values) | No | Frame shape of the image. | | `colors` | string | | Up to 64 characters | No | Up to five preferred colours as hex values, separated by commas (for example #DB2F00, #1E2A44). Leave empty for none. | | `background_color` | string | | Up to 9 characters | No | A preferred background colour as a hex value (for example #FFFFFF). Leave empty for none. | ### `aspect_ratio` values `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `2:1`, `1:2`, `5:4`, `4:5`, `14:10`, `10:14`, `6:10` ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "recraft-v4-vector", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 4.0. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `seedream-4.0` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-4.0` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-4.0`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `9:21`, `4:5`, `5:4` | No | Frame shape of the image. | | `size` | string | `2K` | `1K`, `2K`, `4K` | No | Output size. Every size costs the same. | | `count` | integer | `1` | 1 to 15 | No | The most images to make. Above 1 the model makes a related set (a storyboard, variations) and decides how many the prompt needs, up to this. Only the images made are charged. References and images together are at most 15. | | `prompt_mode` | string | `standard` | `standard`, `fast` | No | Standard gives the best quality; Fast is quicker and may lose a little detail. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-4.0", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 4.5. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `seedream-4.5` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-4.5` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-4.5`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `9:21`, `4:5`, `5:4` | No | Frame shape of the image. | | `size` | string | `2K` | `2K`, `4K` | No | Output size. Both sizes cost the same. | | `count` | integer | `1` | 1 to 15 | No | The most images to make. Above 1 the model makes a related set (a storyboard, variations) and decides how many the prompt needs, up to this. Only the images made are charged. References and images together are at most 15. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-4.5", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 5.0 Flash. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `seedream-5.0-flash` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-5.0-flash` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-5.0-flash`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `9:21`, `4:5`, `5:4` | No | Frame shape of the image. | | `size` | string | `2K` | `1K`, `1.5K`, `2K` | No | 1K and 1.5K cost the same; 1.5K renders more detail. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-5.0-flash", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 5.0 Lite. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `seedream-5.0-lite` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-5.0-lite` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-5.0-lite`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `9:21`, `4:5`, `5:4` | No | Frame shape of the image. | | `size` | string | `2K` | `2K`, `3K`, `4K` | No | Output size. Every size costs the same. | | `count` | integer | `1` | 1 to 15 | No | The most images to make. Above 1 the model makes a related set (a storyboard, variations) and decides how many the prompt needs, up to this. Only the images made are charged. References and images together are at most 15. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-5.0-lite", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 5.0 Pro. Generates images from a text prompt. Generates images from a text prompt. | | | | --- | --- | | Model ID | `seedream-5.0-pro` | | Task | [`text-to-image`](https://docs.halationlab.ai/models.md#text-to-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-5.0-pro` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-5.0-pro`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | | `aspect_ratio` | string | `1:1` | `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `9:21`, `4:5`, `5:4` | No | Frame shape of the image. | | `size` | string | `2K` | `1K`, `1.5K`, `2K` | No | Output size. 1K and 1.5K cost the same; 2K costs twice as much. | | `prompt_mode` | string | `standard` | `standard`, `fast` | No | Standard gives the best quality; Fast is quicker and may lose a little detail. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-5.0-pro", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < FLUX.2 [pro] Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `flux.2-pro-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | FLUX | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/flux.2-pro-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/flux.2-pro-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image to make from the references. Refer to them as [Image1], [Image2] and so on. | | `aspect_ratio` | string | `match` | `match`, `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `4:5`, `5:4` | No | Frame shape of the image. "Match" follows the first reference at the chosen size. | | `size` | string | `1MP` | `1MP`, `2MP`, `4MP` | No | Output size. Larger sizes cost more. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 1 to 8 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "flux.2-pro-edit", "input": { "prompt": "Make the background a sunny beach", "aspect_ratio": "match", "references": [ "https://docs.halationlab.ai/media/sample-image.png" ] } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < GPT Image 2.5 Flare Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `gpt-image-2.5-flare-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | GPT Image | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/gpt-image-2.5-flare-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/gpt-image-2.5-flare-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 32000 characters | Yes | Describe the image to make from the references. Refer to them as [Image1], [Image2] and so on. | | `aspect_ratio` | string | `1:1` | `1:1`, `3:2`, `2:3`, `4:3`, `3:4`, `16:9`, `9:16`, `4:5`, `5:4` | No | Frame shape of the image. | | `size` | string | `1K` | `1K`, `2K`, `4K` | No | Output size. Larger sizes cost more; 4K is experimental at OpenAI and may vary. | | `quality` | string | `medium` | `low`, `medium`, `high`, `xhigh`, `max` | No | Higher quality takes longer and costs more. | | `count` | integer | `1` | 1 to 10 | No | How many images to make. Each one is charged. | | `transparent` | boolean | `false` | | No | Makes a PNG with a transparent background. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 1 to 16 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "gpt-image-2.5-flare-edit", "input": { "prompt": "Make the background a sunny beach", "aspect_ratio": "1:1", "references": [ "https://docs.halationlab.ai/media/sample-image.png" ] } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < GPT Image 2.5 Flare Region Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `gpt-image-2.5-flare-region-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | GPT Image | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/gpt-image-2.5-flare-region-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/gpt-image-2.5-flare-region-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 32000 characters | Yes | Describe the change for the marked area of the source. Other references are [Image2], [Image3] and so on. | | `size` | string | `1K` | `1K`, `2K`, `4K` | No | The source's frame shape at about 1, 4 or 8 megapixels. Larger sizes cost more; 4K is experimental at OpenAI and may vary. | | `quality` | string | `medium` | `low`, `medium`, `high`, `xhigh`, `max` | No | Higher quality takes longer and costs more. | | `count` | integer | `1` | 1 to 10 | No | How many images to make. Each one is charged. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | image | 1 | Yes | | | `references` | image | 0 to 15 | No | | ## Region `region` is required: the area of `source` to change, in source pixels from the top-left corner. Send a rectangle or a polygon of 3 to 500 points. ```json { "type": "rectangle", "x": 470, "y": 190, "width": 340, "height": 340 } ``` ```json {"type":"polygon","points":[[470,190],[810,190],[640,530]]} ``` ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "gpt-image-2.5-flare-region-edit", "input": { "prompt": "Make the background a sunny beach", "source": "https://docs.halationlab.ai/media/sample-image.png", "region": { "type": "rectangle", "x": 470, "y": 190, "width": 340, "height": 340 } } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < GPT Image 2.5 Sunburst. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `gpt-image-2.5-sunburst-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | GPT Image | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/gpt-image-2.5-sunburst-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/gpt-image-2.5-sunburst-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 32000 characters | Yes | Describe the image to make from the references. Refer to them as [Image1], [Image2] and so on. | | `aspect_ratio` | string | `1:1` | `1:1`, `3:2`, `2:3`, `4:3`, `3:4`, `16:9`, `9:16`, `4:5`, `5:4` | No | Frame shape of the image. | | `size` | string | `1K` | `1K`, `2K`, `4K` | No | Output size. Larger sizes cost more; 4K is experimental at OpenAI and may vary. | | `quality` | string | `medium` | `low`, `medium`, `high`, `xhigh`, `max` | No | Higher quality takes longer and costs more. | | `count` | integer | `1` | 1 to 10 | No | How many images to make. Each one is charged. | | `transparent` | boolean | `false` | | No | Makes a PNG with a transparent background. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 1 to 16 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "gpt-image-2.5-sunburst-edit", "input": { "prompt": "Make the background a sunny beach", "aspect_ratio": "1:1", "references": [ "https://docs.halationlab.ai/media/sample-image.png" ] } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < GPT Image 2.5 Sunburst Region Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `gpt-image-2.5-sunburst-region-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | GPT Image | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/gpt-image-2.5-sunburst-region-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/gpt-image-2.5-sunburst-region-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 32000 characters | Yes | Describe the change for the marked area of the source. Other references are [Image2], [Image3] and so on. | | `size` | string | `1K` | `1K`, `2K`, `4K` | No | The source's frame shape at about 1, 4 or 8 megapixels. Larger sizes cost more; 4K is experimental at OpenAI and may vary. | | `quality` | string | `medium` | `low`, `medium`, `high`, `xhigh`, `max` | No | Higher quality takes longer and costs more. | | `count` | integer | `1` | 1 to 10 | No | How many images to make. Each one is charged. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | image | 1 | Yes | | | `references` | image | 0 to 15 | No | | ## Region `region` is required: the area of `source` to change, in source pixels from the top-left corner. Send a rectangle or a polygon of 3 to 500 points. ```json { "type": "rectangle", "x": 470, "y": 190, "width": 340, "height": 340 } ``` ```json {"type":"polygon","points":[[470,190],[810,190],[640,530]]} ``` ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "gpt-image-2.5-sunburst-region-edit", "input": { "prompt": "Make the background a sunny beach", "source": "https://docs.halationlab.ai/media/sample-image.png", "region": { "type": "rectangle", "x": 470, "y": 190, "width": 340, "height": 340 } } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Grok Imagine Image 2.0 Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `grok-imagine-image-2.0-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | Grok Imagine | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/grok-imagine-image-2.0-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/grok-imagine-image-2.0-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the edit. Up to five images can guide the result. | | `aspect_ratio` | string | `auto` | 14 values, [listed below](#aspect_ratio-values) | No | Auto keeps the first image’s shape. | | `size` | string | `1k` | `1k`, `2k` | No | 2K renders more detail and costs more on fal. | | `quality` | string | `medium` | `low`, `medium` | No | Medium renders more detail and costs more on fal. | | `format` | string | `jpeg` | `jpeg`, `png`, `webp` | No | File format of the generated image. | | `count` | integer | `1` | 1 to 10 | No | How many images to make. Each one is charged. | ### `aspect_ratio` values `auto`, `2:1`, `20:9`, `19.5:9`, `16:9`, `4:3`, `3:2`, `1:1`, `2:3`, `3:4`, `9:16`, `9:19.5`, `9:20`, `1:2` ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 1 to 5 | Yes | | ## Restrictions - xAI may revise the submitted image prompt. The requested prompt and host provenance remain on the result. ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "grok-imagine-image-2.0-edit", "input": { "prompt": "Make the background a sunny beach", "aspect_ratio": "auto", "references": [ "https://docs.halationlab.ai/media/sample-image.png" ] } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Nano Banana 2.1 Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `nano-banana-2.1-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | Nano Banana | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/nano-banana-2.1-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/nano-banana-2.1-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 50000 characters | Yes | Describe the image to make from the references. Refer to them as [Image1], [Image2] and so on. | | `aspect_ratio` | string | `match` | 15 values, [listed below](#aspect_ratio-values) | No | Frame shape of the image. "Match" follows the first reference. | | `size` | string | `1K` | `1K`, `2K`, `4K` | No | Output size. 4K costs more. | | `count` | integer | `1` | 1 to 4 | No | How many images to make. Each one is charged. | | `thinking` | string | `medium` | `minimal`, `medium`, `high` | No | More reasoning helps with dense layouts and text; it takes longer and High costs a little more. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ### `aspect_ratio` values `match`, `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `21:9`, `4:5`, `5:4`, `4:1`, `1:4`, `8:1`, `1:8` ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 1 to 14 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "nano-banana-2.1-edit", "input": { "prompt": "Make the background a sunny beach", "aspect_ratio": "match", "references": [ "https://docs.halationlab.ai/media/sample-image.png" ] } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Nano Banana Pro Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `nano-banana-pro-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | Nano Banana | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/nano-banana-pro-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/nano-banana-pro-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 50000 characters | Yes | Describe the image to make from the references. Refer to them as [Image1], [Image2] and so on. | | `aspect_ratio` | string | `match` | `match`, `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `21:9`, `4:5`, `5:4` | No | Frame shape of the image. "Match" follows the first reference. | | `size` | string | `1K` | `1K`, `2K`, `4K` | No | Output size. 4K costs more. | | `count` | integer | `1` | 1 to 4 | No | How many images to make. Each one is charged. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 1 to 14 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "nano-banana-pro-edit", "input": { "prompt": "Make the background a sunny beach", "aspect_ratio": "match", "references": [ "https://docs.halationlab.ai/media/sample-image.png" ] } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 4.0 Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `seedream-4.0-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-4.0-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-4.0-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image to make from the references. Refer to them as Image 1, Image 2 and so on. | | `aspect_ratio` | string | `match` | `match`, `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `9:21`, `4:5`, `5:4` | No | Frame shape of the image. "Match" lets the model follow the first reference. | | `size` | string | `2K` | `1K`, `2K`, `4K` | No | Output size. Every size costs the same. | | `count` | integer | `1` | 1 to 14 | No | The most images to make. Above 1 the model makes a related set (a storyboard, variations) and decides how many the prompt needs, up to this. Only the images made are charged. References and images together are at most 15. | | `prompt_mode` | string | `standard` | `standard`, `fast` | No | Standard gives the best quality; Fast is quicker and may lose a little detail. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 1 to 14 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-4.0-edit", "input": { "prompt": "Make the background a sunny beach", "aspect_ratio": "match", "references": [ "https://docs.halationlab.ai/media/sample-image.png" ] } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 4.5 Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `seedream-4.5-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-4.5-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-4.5-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image to make from the references. Refer to them as Image 1, Image 2 and so on. | | `aspect_ratio` | string | `match` | `match`, `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `9:21`, `4:5`, `5:4` | No | Frame shape of the image. "Match" lets the model follow the first reference. | | `size` | string | `2K` | `2K`, `4K` | No | Output size. Both sizes cost the same. | | `count` | integer | `1` | 1 to 14 | No | The most images to make. Above 1 the model makes a related set (a storyboard, variations) and decides how many the prompt needs, up to this. Only the images made are charged. References and images together are at most 15. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 1 to 14 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-4.5-edit", "input": { "prompt": "Make the background a sunny beach", "aspect_ratio": "match", "references": [ "https://docs.halationlab.ai/media/sample-image.png" ] } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 5.0 Flash Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `seedream-5.0-flash-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-5.0-flash-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-5.0-flash-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image to make from the references. Refer to them as Image 1, Image 2 and so on. To point at a spot, add x y, or a box x1 y1 x2 y2, after the image it is on: 0 0 is the top left and 999 999 the bottom right. | | `aspect_ratio` | string | `match` | `match`, `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `9:21`, `4:5`, `5:4` | No | Frame shape of the image. "Match" lets the model follow the first reference. | | `size` | string | `2K` | `1K`, `1.5K`, `2K` | No | 1K and 1.5K cost the same; 1.5K renders more detail. | | `background` | string | `opaque` | `opaque`, `transparent` | No | Transparent keeps the alpha channel of one transparent PNG reference and returns a PNG. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 1 to 10 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-5.0-flash-edit", "input": { "prompt": "Make the background a sunny beach", "aspect_ratio": "match", "references": [ "https://docs.halationlab.ai/media/sample-image.png" ] } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 5.0 Flash Layers. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `seedream-5.0-flash-layers` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-5.0-flash-layers` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-5.0-flash-layers`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | Up to 4000 characters | No | Optional. Name the parts to put on their own layers, or mark one with x1 y1 x2 y2 (0 to 999 across and down). Leave it empty to separate every main element. | | `size` | string | `auto` | `auto`, `1K`, `1.5K`, `2K` | No | Size of the base image and layers. Match keeps the source's own size between 1K and 2K. | | `count` | integer | `17` | 17 to 17 | No | A base image and up to 16 layers. The price covers 17 images; you are charged only for the ones made. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `reference` | image | 1 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-5.0-flash-layers", "input": { "prompt": "Make the background a sunny beach", "reference": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 5.0 Flash Region Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `seedream-5.0-flash-region-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-5.0-flash-region-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-5.0-flash-region-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the change for the marked area of the source. Other references are Image 2, Image 3 and so on. To point at a spot, add x y, or a box x1 y1 x2 y2, after the image it is on: 0 0 is the top left and 999 999 the bottom right. | | `aspect_ratio` | string | `match` | `match`, `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `9:21`, `4:5`, `5:4` | No | Frame shape of the image. "Match" lets the model follow the first reference. | | `size` | string | `2K` | `1K`, `1.5K`, `2K` | No | 1K and 1.5K cost the same; 1.5K renders more detail. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | image | 1 | Yes | | | `references` | image | 0 to 9 | No | | ## Region `region` is required: the area of `source` to change, in source pixels from the top-left corner. Send a rectangle or a polygon of 3 to 500 points. ```json { "type": "rectangle", "x": 470, "y": 190, "width": 340, "height": 340 } ``` ```json {"type":"polygon","points":[[470,190],[810,190],[640,530]]} ``` ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-5.0-flash-region-edit", "input": { "prompt": "Make the background a sunny beach", "aspect_ratio": "match", "source": "https://docs.halationlab.ai/media/sample-image.png", "region": { "type": "rectangle", "x": 470, "y": 190, "width": 340, "height": 340 } } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 5.0 Lite Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `seedream-5.0-lite-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-5.0-lite-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-5.0-lite-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image to make from the references. Refer to them as Image 1, Image 2 and so on. | | `aspect_ratio` | string | `match` | `match`, `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `9:21`, `4:5`, `5:4` | No | Frame shape of the image. "Match" lets the model follow the first reference. | | `size` | string | `2K` | `2K`, `3K`, `4K` | No | Output size. Every size costs the same. | | `count` | integer | `1` | 1 to 14 | No | The most images to make. Above 1 the model makes a related set (a storyboard, variations) and decides how many the prompt needs, up to this. Only the images made are charged. References and images together are at most 15. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 1 to 14 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-5.0-lite-edit", "input": { "prompt": "Make the background a sunny beach", "aspect_ratio": "match", "references": [ "https://docs.halationlab.ai/media/sample-image.png" ] } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 5.0 Pro Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `seedream-5.0-pro-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-5.0-pro-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-5.0-pro-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the image to make from the references. Refer to them as Image 1, Image 2 and so on. To point at a spot, add x y, or a box x1 y1 x2 y2, after the image it is on: 0 0 is the top left and 999 999 the bottom right. | | `aspect_ratio` | string | `match` | `match`, `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `9:21`, `4:5`, `5:4` | No | Frame shape of the image. "Match" lets the model follow the first reference. | | `size` | string | `2K` | `1K`, `1.5K`, `2K` | No | Output size. 1K and 1.5K cost the same; 2K costs twice as much. | | `prompt_mode` | string | `standard` | `standard`, `fast` | No | Standard gives the best quality; Fast is quicker and may lose a little detail. | | `background` | string | `opaque` | `opaque`, `transparent` | No | Transparent keeps the alpha channel of one transparent PNG reference and returns a PNG. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `references` | image | 1 to 10 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-5.0-pro-edit", "input": { "prompt": "Make the background a sunny beach", "aspect_ratio": "match", "references": [ "https://docs.halationlab.ai/media/sample-image.png" ] } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 5.0 Pro Layers. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `seedream-5.0-pro-layers` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-5.0-pro-layers` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-5.0-pro-layers`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | Up to 4000 characters | No | Optional. Name the parts to put on their own layers, or mark one with x1 y1 x2 y2 (0 to 999 across and down). Leave it empty to separate every main element. | | `size` | string | `auto` | `auto`, `1K`, `1.5K`, `2K` | No | Size of the base image and layers. Match keeps the source's own size between 1K and 2K. | | `count` | integer | `17` | 17 to 17 | No | A base image and up to 16 layers. The price covers 17 images; you are charged only for the ones made. | | `prompt_mode` | string | `standard` | `standard`, `fast` | No | Standard gives the best quality; Fast is quicker and may lose a little detail. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `reference` | image | 1 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-5.0-pro-layers", "input": { "prompt": "Make the background a sunny beach", "reference": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Seedream 5.0 Pro Region Edit. Changes or combines images by instruction. Changes or combines images by instruction. | | | | --- | --- | | Model ID | `seedream-5.0-pro-region-edit` | | Task | [`edit-image`](https://docs.halationlab.ai/models.md#edit-image) | | Output | image | | Family | Seedream | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/seedream-5.0-pro-region-edit` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/seedream-5.0-pro-region-edit`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 4000 characters | Yes | Describe the change for the marked area of the source. Other references are Image 2, Image 3 and so on. To point at a spot, add x y, or a box x1 y1 x2 y2, after the image it is on: 0 0 is the top left and 999 999 the bottom right. | | `aspect_ratio` | string | `match` | `match`, `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `9:21`, `4:5`, `5:4` | No | Frame shape of the image. "Match" lets the model follow the first reference. | | `size` | string | `2K` | `1K`, `1.5K`, `2K` | No | Output size. 1K and 1.5K cost the same; 2K costs twice as much. | | `prompt_mode` | string | `standard` | `standard`, `fast` | No | Standard gives the best quality; Fast is quicker and may lose a little detail. | ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | image | 1 | Yes | | | `references` | image | 0 to 9 | No | | ## Region `region` is required: the area of `source` to change, in source pixels from the top-left corner. Send a rectangle or a polygon of 3 to 500 points. ```json { "type": "rectangle", "x": 470, "y": 190, "width": 340, "height": 340 } ``` ```json {"type":"polygon","points":[[470,190],[810,190],[640,530]]} ``` ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "seedream-5.0-pro-region-edit", "input": { "prompt": "Make the background a sunny beach", "aspect_ratio": "match", "source": "https://docs.halationlab.ai/media/sample-image.png", "region": { "type": "rectangle", "x": 470, "y": 190, "width": 340, "height": 340 } } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Ideogram 3.0 Reframe. Extends an image beyond its borders. Extends an image beyond its borders. | | | | --- | --- | | Model ID | `ideogram-3.0-reframe` | | Task | [`expand-image`](https://docs.halationlab.ai/models.md#expand-image) | | Output | image | | Family | Ideogram | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/ideogram-3.0-reframe` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/ideogram-3.0-reframe`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `aspect_ratio` | string | `16:9` | 15 values, [listed below](#aspect_ratio-values) | No | The new frame shape. The image is extended to fill it. | | `speed` | string | `balanced` | `turbo`, `balanced`, `quality` | No | Quality renders more detail and costs more. | | `count` | integer | `1` | 1 to 8 | No | How many images to make. Each one is charged. | | `style_preset` | string | `none` | 63 values, [listed below](#style_preset-values) | No | An Ideogram style for the new area. None keeps the source image's look. | | `palette` | string | `none` | `none`, `ember`, `fresh`, `jungle`, `magic`, `melon`, `mosaic`, `pastel`, `ultramarine` | No | An Ideogram colour palette for the new area. None keeps the source image's colours. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | ### `aspect_ratio` values `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `5:4`, `4:5`, `16:10`, `10:16`, `2:1`, `1:2`, `3:1`, `1:3` ### `style_preset` values `none`, `80s-illustration`, `90s-nostalgia`, `abstract-organic`, `analog-nostalgia`, `art-brut`, `art-deco`, `art-poster`, `aura`, `avant-garde`, `bauhaus`, `blueprint`, `blurry-motion`, `bright-art`, `c4d-cartoon`, `childrens-book`, `collage`, `coloring-book-i`, `coloring-book-ii`, `cubism`, `dark-aura`, `doodle`, `double-exposure`, `dramatic-cinema`, `editorial`, `emotional-minimal`, `ethereal-party`, `expired-film`, `flat-art`, `flat-vector`, `forest-reverie`, `geo-minimalist`, `glass-prism`, `golden-hour`, `graffiti-i`, `graffiti-ii`, `halftone-print`, `high-contrast`, `hippie-era`, `iconic`, `japandi-fusion`, `jazzy`, `long-exposure`, `magazine-editorial`, `minimal-illustration`, `mixed-media`, `monochrome`, `nightlife`, `oil-painting`, `old-cartoons`, `paint-gesture`, `pop-art`, `retro-etching`, `riviera-pop`, `spotlight-80s`, `stylized-red`, `surreal-collage`, `travel-poster`, `vintage-geo`, `vintage-poster`, `watercolor`, `weird`, `woodblock-print` ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | image | 1 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "ideogram-3.0-reframe", "input": { "aspect_ratio": "16:9", "source": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Recraft Crisp Upscale. Raises the resolution of an image. Raises the resolution of an image. | | | | --- | --- | | Model ID | `recraft-crisp-upscale` | | Task | [`upscale-image`](https://docs.halationlab.ai/models.md#upscale-image) | | Output | image | | Family | Recraft | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/recraft-crisp-upscale` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/recraft-crisp-upscale`. This model has no settings beyond its media inputs. ## Media inputs Each media input takes an asset ID (`asset_…`), a generation ID (`gen_…`, its first output), a public HTTPS URL or a small `data:` URI. URLs and data URIs are imported into the project first; see [Uploading media](https://docs.halationlab.ai/guides/uploading-media.md). | Name | Accepts | How many | Required | Notes | | --- | --- | --- | --- | --- | | `source` | image | 1 | Yes | | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "recraft-crisp-upscale", "input": { "source": "https://docs.halationlab.ai/media/sample-image.png" } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < ElevenLabs Eleven v4. Speaks a script in a chosen voice. Speaks a script in a chosen voice. | | | | --- | --- | | Model ID | `elevenlabs-eleven-v4` | | Task | [`text-to-speech`](https://docs.halationlab.ai/models.md#text-to-speech) | | Output | audio | | Family | ElevenLabs | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/elevenlabs-eleven-v4` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/elevenlabs-eleven-v4`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `text` | string | | 1 to 10000 characters | Yes | The words to read, exactly as written, in any language the voice speaks. | | `voice` | string | `voice-alice` | 18 values, [listed below](#voice-values) | No | One of our approved stock voices. | | `language` | string | `auto` | 95 values, [listed below](#language-values) | No | The language of the script. Detect works it out from the script; choose it when the script is short or mixes languages. | | `pace` | number | `1` | 0.7 to 1.2, in steps of 0.05 | No | Reading speed: below 1 is slower, above 1 faster. | | `stability` | number | `0.5` | 0 to 1, in steps of 0.05 | No | Lower is more expressive; higher is more consistent. | | `similarity` | number | `0.75` | 0 to 1, in steps of 0.05 | No | How closely the reading keeps to the stock voice. | | `style` | number | `0` | 0 to 1, in steps of 0.05 | No | Exaggerates the voice's style; may slow the reading down. | | `speaker_boost` | boolean | `true` | | No | Keeps the voice closer to the stock speaker. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `captions` | boolean | `true` | | No | Also make SRT and WebVTT caption files timed to the speech, in the script's language. No extra charge. | | `format` | string | `mp3_128` | `mp3_128`, `mp3_192` | No | MP3 at 192 kbps is larger and clearer. | ### `voice` values `voice-alice`, `voice-daniel`, `voice-george`, `voice-lily`, `voice-charlie`, `voice-bella`, `voice-sarah`, `voice-matilda`, `voice-jessica`, `voice-laura`, `voice-river`, `voice-brian`, `voice-eric`, `voice-chris`, `voice-roger`, `voice-will`, `voice-liam`, `voice-bill` ### `language` values `auto`, `af`, `am`, `ar`, `hy`, `as`, `ast`, `az`, `be`, `bn`, `bs`, `bg`, `my`, `yue`, `ca`, `ceb`, `ny`, `hr`, `cs`, `da`, `nl`, `en`, `et`, `fil`, `fi`, `fr`, `ff`, `gl`, `ka`, `de`, `el`, `gu`, `ha`, `he`, `hi`, `hu`, `is`, `id`, `ga`, `it`, `ja`, `jv`, `kam`, `kn`, `kk`, `ky`, `ko`, `lo`, `lv`, `ln`, `lt`, `lg`, `lb`, `mk`, `ms`, `ml`, `mt`, `zh`, `mi`, `mr`, `mn`, `ne`, `no`, `oc`, `or`, `ps`, `fa`, `pl`, `pt`, `pa`, `ro`, `ru`, `sr`, `sn`, `sd`, `sk`, `sl`, `so`, `ckb`, `es`, `sw`, `sv`, `tg`, `ta`, `te`, `th`, `tr`, `uk`, `ur`, `uz`, `vi`, `cy`, `wo`, `yo`, `zu` ### `voice` options | Value | Meaning | | --- | --- | | `voice-alice` | British, female. Clear and engaging, for explainers. | | `voice-daniel` | British, male. Steady broadcaster. | | `voice-george` | British, male. Warm storyteller. | | `voice-lily` | British, female. Velvety and calm. | | `voice-charlie` | Australian, male. Deep, confident and energetic. | | `voice-bella` | American, female. Professional, bright and warm. | | `voice-sarah` | American, female. Mature and reassuring. | | `voice-matilda` | American, female. Knowledgeable and professional. | | `voice-jessica` | American, female. Playful, bright and warm. | | `voice-laura` | American, female. Enthusiastic, for social video. | | `voice-river` | American, gender-neutral. Relaxed and informative. | | `voice-brian` | American, male. Deep, resonant and comforting. | | `voice-eric` | American, male. Smooth and trustworthy. | | `voice-chris` | American, male. Charming and down to earth. | | `voice-roger` | American, male. Laid-back and casual. | | `voice-will` | American, male. Relaxed optimist. | | `voice-liam` | American, male. Energetic, for social video. | | `voice-bill` | American, male. Older, wise and balanced. | ## Restrictions - Approved stock voices only: no voice cloning, design or translation. ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "elevenlabs-eleven-v4", "input": { "text": "Welcome. This voice was generated with the HalationLab.ai API." } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < ElevenLabs Eleven v4 Turbo. Speaks a script in a chosen voice. Speaks a script in a chosen voice. | | | | --- | --- | | Model ID | `elevenlabs-eleven-v4-turbo` | | Task | [`text-to-speech`](https://docs.halationlab.ai/models.md#text-to-speech) | | Output | audio | | Family | ElevenLabs | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/elevenlabs-eleven-v4-turbo` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/elevenlabs-eleven-v4-turbo`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `text` | string | | 1 to 10000 characters | Yes | The words to read, exactly as written, in any language the voice speaks. | | `voice` | string | `voice-alice` | 18 values, [listed below](#voice-values) | No | One of our approved stock voices. | | `language` | string | `auto` | 95 values, [listed below](#language-values) | No | The language of the script. Detect works it out from the script; choose it when the script is short or mixes languages. | | `pace` | number | `1` | 0.7 to 1.2, in steps of 0.05 | No | Reading speed: below 1 is slower, above 1 faster. | | `stability` | number | `0.5` | 0 to 1, in steps of 0.05 | No | Lower is more expressive; higher is more consistent. | | `similarity` | number | `0.75` | 0 to 1, in steps of 0.05 | No | How closely the reading keeps to the stock voice. | | `style` | number | `0` | 0 to 1, in steps of 0.05 | No | Exaggerates the voice's style; may slow the reading down. | | `speaker_boost` | boolean | `true` | | No | Keeps the voice closer to the stock speaker. | | `seed` | integer | `0` | 0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. | | `captions` | boolean | `true` | | No | Also make SRT and WebVTT caption files timed to the speech, in the script's language. No extra charge. | | `format` | string | `mp3_128` | `mp3_128`, `mp3_192` | No | MP3 at 192 kbps is larger and clearer. | ### `voice` values `voice-alice`, `voice-daniel`, `voice-george`, `voice-lily`, `voice-charlie`, `voice-bella`, `voice-sarah`, `voice-matilda`, `voice-jessica`, `voice-laura`, `voice-river`, `voice-brian`, `voice-eric`, `voice-chris`, `voice-roger`, `voice-will`, `voice-liam`, `voice-bill` ### `language` values `auto`, `af`, `am`, `ar`, `hy`, `as`, `ast`, `az`, `be`, `bn`, `bs`, `bg`, `my`, `yue`, `ca`, `ceb`, `ny`, `hr`, `cs`, `da`, `nl`, `en`, `et`, `fil`, `fi`, `fr`, `ff`, `gl`, `ka`, `de`, `el`, `gu`, `ha`, `he`, `hi`, `hu`, `is`, `id`, `ga`, `it`, `ja`, `jv`, `kam`, `kn`, `kk`, `ky`, `ko`, `lo`, `lv`, `ln`, `lt`, `lg`, `lb`, `mk`, `ms`, `ml`, `mt`, `zh`, `mi`, `mr`, `mn`, `ne`, `no`, `oc`, `or`, `ps`, `fa`, `pl`, `pt`, `pa`, `ro`, `ru`, `sr`, `sn`, `sd`, `sk`, `sl`, `so`, `ckb`, `es`, `sw`, `sv`, `tg`, `ta`, `te`, `th`, `tr`, `uk`, `ur`, `uz`, `vi`, `cy`, `wo`, `yo`, `zu` ### `voice` options | Value | Meaning | | --- | --- | | `voice-alice` | British, female. Clear and engaging, for explainers. | | `voice-daniel` | British, male. Steady broadcaster. | | `voice-george` | British, male. Warm storyteller. | | `voice-lily` | British, female. Velvety and calm. | | `voice-charlie` | Australian, male. Deep, confident and energetic. | | `voice-bella` | American, female. Professional, bright and warm. | | `voice-sarah` | American, female. Mature and reassuring. | | `voice-matilda` | American, female. Knowledgeable and professional. | | `voice-jessica` | American, female. Playful, bright and warm. | | `voice-laura` | American, female. Enthusiastic, for social video. | | `voice-river` | American, gender-neutral. Relaxed and informative. | | `voice-brian` | American, male. Deep, resonant and comforting. | | `voice-eric` | American, male. Smooth and trustworthy. | | `voice-chris` | American, male. Charming and down to earth. | | `voice-roger` | American, male. Laid-back and casual. | | `voice-will` | American, male. Relaxed optimist. | | `voice-liam` | American, male. Energetic, for social video. | | `voice-bill` | American, male. Older, wise and balanced. | ## Restrictions - Approved stock voices only: no voice cloning, design or translation. ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "elevenlabs-eleven-v4-turbo", "input": { "text": "Welcome. This voice was generated with the HalationLab.ai API." } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < ElevenLabs Sound Effects v2. Generates a sound effect from a description. Generates a sound effect from a description. | | | | --- | --- | | Model ID | `elevenlabs-sound-effects-v2` | | Task | [`text-to-sound`](https://docs.halationlab.ai/models.md#text-to-sound) | | Output | audio | | Family | ElevenLabs | | Status | Active | ## Price Prices are live, so this page does not show them. `GET /v1/models/elevenlabs-sound-effects-v2` returns the published price (`price`), and `POST /v1/quotes` returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md). ## Parameters Send these in `input`. Omitted parameters take their default; unknown parameters are refused with `422 parameter_unknown`. The same schema is `input_schema` in `GET /v1/models/elevenlabs-sound-effects-v2`. | Name | Type | Default | Allowed | Required | Description | | --- | --- | --- | --- | --- | --- | | `prompt` | string | | 1 to 1000 characters | Yes | Describe the sound: what makes it, where, and how it changes. | | `duration` | number or "auto" | `5` | 0.5 to 30, in steps of 0.1 | No | Length of the effect in seconds. | | `loop` | boolean | `false` | | No | Make the effect loop seamlessly. | | `prompt_influence` | number | `0.3` | 0 to 1, in steps of 0.05 | No | Higher follows the description more literally, with less variation. | | `format` | string | `mp3_128` | `mp3_128`, `mp3_192` | No | MP3 at 192 kbps is larger and clearer. | ## Example Price the request first. A quote is free and starts nothing: ```sh curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "model": "elevenlabs-sound-effects-v2", "input": { "prompt": "Footsteps on gravel, then a wooden door creaks open", "duration": 5 } } JSON ``` Then start it, paying at most `MAX_COST` tokens. If the price is higher, nothing starts and the `402 max_cost_exceeded` answer carries the quote: ```sh MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens} curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- < Register an OAuth app that acts for other HalationLab.ai users, and choose its kind, redirect URIs and resources. Build an app when other people will connect their HalationLab.ai accounts to it. For your own account, an [API key](https://docs.halationlab.ai/authentication.md#api-keys) is simpler. ## Register In the HalationLab.ai app, open **Account → Connected apps → Your apps** and choose **Register an app**. Registering gives the app no access: each person who connects it still chooses what it can do. | Setting | Choices | | --- | --- | | Name | Up to 80 characters, shown to people on the consent screen. Apps are shown as unverified. | | Kind | **Desktop or command-line app**, **Browser app** or **Server app**. Fixed once registered. | | Redirect URIs | Up to 10 exact URIs. | | Resources | **API** (`https://api.halationlab.ai/v1`), **AI assistant tools (MCP)**, or both. | | Scopes | The [scopes](https://docs.halationlab.ai/apps/scopes.md) the app may ask for. By default, every published scope. | You get a client ID. A server app also gets a client secret, shown once; rotate it in the same place if it is lost. ## Kinds of app | Kind | Client authentication | Redirect URIs | | --- | --- | --- | | Desktop or command-line app | None: a public client using PKCE | `http` loopback only: `http://127.0.0.1`, `http://[::1]` or `http://localhost`, with any port | | Browser app | None: a public client using PKCE | `https` | | Server app | Client secret in the `Authorization` header (`client_secret_basic`, the default) or the request body (`client_secret_post`), plus PKCE | `https` | Every app uses PKCE. A browser app can call the API directly from the page with its access token: cross-origin requests are allowed and are authorised only by the bearer credential. Never put an API key or a client secret in a browser app. ## Redirect URI rules - Register each exact URI. Wildcards, fragments (`#`) and user names or passwords in the URI are not allowed. - Up to 2,048 characters each. - An `https` redirect cannot point at this computer (`localhost`, `127.0.0.1`); use a desktop app for a loopback redirect. ## Limits An account can have 10 active apps and register up to 20 a day. ## Next [The OAuth flow](https://docs.halationlab.ai/apps/oauth.md), [scopes](https://docs.halationlab.ai/apps/scopes.md) and [budgets](https://docs.halationlab.ai/apps/budgets.md). Source: https://docs.halationlab.ai/apps/register/ --- # OAuth flow > Authorisation code with PKCE against app.halationlab.ai, with resource set to the API, then refresh and revoke. HalationLab.ai uses OAuth 2.0 authorisation code with PKCE (S256). The authorisation server is `https://app.halationlab.ai`; the API is the resource `https://api.halationlab.ai/v1`. | | URL | | --- | --- | | Discovery (RFC 8414) | `https://app.halationlab.ai/.well-known/oauth-authorization-server` | | Authorisation endpoint | `https://app.halationlab.ai/oauth/authorize` | | Token endpoint | `https://app.halationlab.ai/oauth/token` | | Revocation endpoint | `https://app.halationlab.ai/oauth/revoke` | | Resource | `https://api.halationlab.ai/v1` | Read the discovery document rather than hard-coding endpoints where your OAuth library supports it. ## 1. Send the user to the authorisation endpoint Create a random code verifier and its S256 challenge, and a random `state`. Send the user to the authorisation endpoint with `response_type=code`, your `client_id` and `redirect_uri`, the `scope` you need, `state`, `code_challenge`, `code_challenge_method=S256` and `resource=https://api.halationlab.ai/v1`. ```ts // Builds the authorisation URL for the OAuth authorisation code flow with PKCE (S256), and the verifier to keep // for the token exchange. Run: HL_OAUTH_CLIENT_ID=... HL_OAUTH_REDIRECT_URI=... node authorize-url.ts import { createHash, randomBytes } from 'node:crypto'; const clientId = process.env.HL_OAUTH_CLIENT_ID ?? 'your-client-id'; const redirectUri = process.env.HL_OAUTH_REDIRECT_URI ?? 'http://127.0.0.1:8765/callback'; const codeVerifier = randomBytes(32).toString('base64url'); const codeChallenge = createHash('sha256').update(codeVerifier).digest('base64url'); const state = randomBytes(16).toString('base64url'); const url = new URL('https://app.halationlab.ai/oauth/authorize'); url.search = new URLSearchParams({ response_type: 'code', client_id: clientId, redirect_uri: redirectUri, scope: 'read generate offline_access', state, code_challenge: codeChallenge, code_challenge_method: 'S256', resource: 'https://api.halationlab.ai/v1', }).toString(); // Send the user to `url`. Keep `state` and `codeVerifier` (server-side or in session storage) until the callback. console.log(url.href); console.log({ state, codeVerifier }); ``` ## 2. The user consents The user signs in and sees your app's name and the permissions it asks for. On the consent screen they choose the projects to share, set the app's [spending limit](https://docs.halationlab.ai/apps/budgets.md), and accept the upload rights and processing terms if your app uploads files. They can grant less than you asked for. ## 3. Exchange the code The user returns to your `redirect_uri` with `code` and `state`. Check `state`, then exchange the code at the token endpoint with the `code_verifier` and the same `resource`: ```sh # Exchanges the authorisation code from the callback for an access token, then refreshes it. # A server app also authenticates with its client secret (here in the Authorization header: client_secret_basic). set -euo pipefail curl -sS --fail-with-body https://app.halationlab.ai/oauth/token \ -u "$CLIENT_ID:$CLIENT_SECRET" \ -d grant_type=authorization_code \ -d code="$CODE" \ -d redirect_uri="$REDIRECT_URI" \ -d code_verifier="$CODE_VERIFIER" \ -d resource=https://api.halationlab.ai/v1 # Later, with the refresh token (needs the offline_access scope): curl -sS --fail-with-body https://app.halationlab.ai/oauth/token \ -u "$CLIENT_ID:$CLIENT_SECRET" \ -d grant_type=refresh_token \ -d refresh_token="$REFRESH_TOKEN" \ -d resource=https://api.halationlab.ai/v1 ``` That example is for a server app with `client_secret_basic`. A public client (desktop or browser app) sends `client_id` in the body instead of a secret. The response holds the access token, and a refresh token when `offline_access` was granted. Send the access token as `Authorization: Bearer …` to the API. ## 4. Refresh and revoke Refresh with `grant_type=refresh_token` (needs `offline_access`). Revoke a token at the revocation endpoint when the user disconnects. An access token that is invalid, expired or whose connection has ended gets [`401 access_token_invalid`](https://docs.halationlab.ai/errors/access-token-invalid.md): refresh it, or ask the user to connect your app again. Users can disconnect your app at any time in **Account → Connected apps**. ## What the app can see Call `GET /v1/account` with the access token: it returns the scopes granted, the projects shared (`all` or a list), the default project and the spending limit. A request outside them gets `403 insufficient_scope`, or `404 not_found` for an object in a project that was not shared. Source: https://docs.halationlab.ai/apps/oauth/ --- # Scopes > The OAuth scopes, the scope each endpoint needs, and how earlier scope names map onto them. Ask for the scopes your app needs, space-separated in the `scope` parameter. API keys hold every scope. | Scope | Allows | | --- | --- | | `read` | Read models, projects, assets, generations, the account and events. | | `projects:write` | Create and change projects. | | `assets:write` | Upload and import files, and make transformed copies. | | `generate` | Start and cancel paid generations within the spending limit the account owner set. | | `webhooks` | Register and remove webhook endpoints. | | `offline_access` | Receive a refresh token (OAuth only). | ## The scope each endpoint needs | Endpoint | Summary | Scope | | --- | --- | --- | | `GET /v1/models` | List models | None (no credential needed) | | `GET /v1/models/{model}` | Get a model | None (no credential needed) | | `GET /v1/voices` | List voices | `read` | | `POST /v1/quotes` | Get a quote | `generate`, `read` | | `POST /v1/generations` | Start a generation | `generate`, `read` | | `GET /v1/generations` | List generations | `read` | | `GET /v1/generations/{id}` | Get a generation | `read` | | `POST /v1/generations/{id}/cancel` | Cancel a generation | `generate`, `read` | | `GET /v1/projects` | List projects | `read` | | `POST /v1/projects` | Create a project | `projects:write` | | `GET /v1/projects/{id}` | Get a project | `read` | | `PATCH /v1/projects/{id}` | Update a project | `projects:write`, `read` | | `POST /v1/projects/{id}/archive` | Archive a project | `projects:write` | | `GET /v1/assets` | List assets | `read` | | `POST /v1/assets` | Import a file | `assets:write`, `read` | | `GET /v1/assets/{id}` | Get an asset | `read` | | `DELETE /v1/assets/{id}` | Delete an asset | `assets:write`, `read` | | `POST /v1/assets/{id}/transform` | Transform an asset | `assets:write`, `read` | | `POST /v1/uploads` | Start an upload | `assets:write`, `read` | | `GET /v1/uploads/{id}` | Get an upload | `read` | | `POST /v1/uploads/{id}/complete` | Complete an upload | `assets:write`, `read` | | `GET /v1/account` | Get the account | None (any credential) | | `GET /v1/webhook_endpoints` | List webhook endpoints | `webhooks`, `read` | | `POST /v1/webhook_endpoints` | Create a webhook endpoint | `webhooks`, `read` | | `DELETE /v1/webhook_endpoints/{id}` | Delete a webhook endpoint | `webhooks`, `read` | | `GET /v1/events` | List events | `read` | ## Earlier scope names The launch API's granular scopes are still accepted and map onto these: | Scope | Covers the earlier scopes | | --- | --- | | `read` | `models:read`, `projects:read`, `assets:read`, `jobs:read`, `usage:read`, `events:read` | | `projects:write` | `projects:write` | | `assets:write` | `assets:write` | | `generate` | `generation:write` | | `webhooks` | `webhooks:write` | Source: https://docs.halationlab.ai/apps/scopes/ --- # Budgets > The user sets your app's spending limit on the consent screen. Your app can read it but never raise it. An app that can start paid work (the `generate` scope) spends the connected user's tokens, within a spending limit the user sets. - The user sets the limit on the consent screen when they connect your app, and can change it later in **Account → Connected apps**. - Your app cannot create or raise a limit. No API call can. - Every paid start is checked against the limit and the account balance before anything runs, and the quoted maximum is reserved. ## Read the budget `GET /v1/account` returns `spending_limit`: `amount`, `per_generation`, `period` (`month` or `fixed`), `used`, `held`, `remaining`, `resets_at` and `manage_url`. It is null when the user has not given your app spending authority. See [Spending limits](https://docs.halationlab.ai/guides/spending-limits.md#read-the-limit). Show the user what is left before you start work, and send `max_cost` with every start so a single request cannot use more than you expect. ## When the budget is used up | Error | What your app should do | | --- | --- | | [`402 spending_limit_reached`](https://docs.halationlab.ai/errors/spending-limit-reached.md) | Tell the user, and link to `manage_url` where they can raise the limit if they choose. | | [`403 spending_not_authorized`](https://docs.halationlab.ai/errors/spending-not-authorized.md) | The user has not allowed spending for this model and project. Link to `manage_url`. | | [`403 spending_limit_changed`](https://docs.halationlab.ai/errors/spending-limit-changed.md) | The user paused, revoked or let the limit expire. Link to `manage_url`. | | [`402 insufficient_balance`](https://docs.halationlab.ai/errors/insufficient-balance.md) | The account needs more tokens. The user adds them in the app. | Do not retry these: they do not change until the user acts. Every refusal is free. Source: https://docs.halationlab.ai/apps/budgets/ --- # Connect an AI assistant > Use HalationLab.ai from Claude, ChatGPT, Claude Code, Cursor, Codex or any MCP client through the MCP server. The HalationLab.ai MCP server lets an AI assistant work in your account: browse models, read projects and assets, import media, and generate within a spending limit. Server URL (Streamable HTTP): ```text https://api.halationlab.ai/mcp ``` ## Sign in Two ways, sent in the `Authorization` header like the REST API: - **OAuth** (recommended). The client opens a browser window; you sign in to HalationLab.ai and choose what the assistant may do: the projects it can see, whether it can start paid work, and its spending limit. Nothing needs to be pasted. - **An API key**, for clients that only support a fixed header: `Authorization: Bearer hl_live_…`. The assistant then has the key's projects, scopes and spending limit. Keep such configuration private. Client-by-client steps are in [Client setup](https://docs.halationlab.ai/agents/clients.md). ## What the assistant can do The server offers tools for reading the account, models, projects, assets and generations, for creating projects and importing or uploading media, and for generating and editing. See the [tool reference](https://docs.halationlab.ai/agents/tools.md). Paid tools never start work without a price the assistant has seen: see [Price confirmation](https://docs.halationlab.ai/agents/price-confirmation.md). ## Safety - The assistant spends within the spending limit you set, and no tool can raise it. - Every paid start is quoted, and you are never charged more than the quoted maximum. - You can disconnect an assistant at any time in **Account → Connected apps**, or revoke the API key it uses in **Account → Developers**. Source: https://docs.halationlab.ai/agents/connect/ --- # Price confirmation > How paid MCP tools return the price first and start work only when called again with max_cost. Paid tools (`generate_video`, `generate_image` and `edit_media`) work in two calls: 1. **Without `max_cost`**, the tool returns the price and starts nothing. Nothing is charged. 2. **With `max_cost`** at or above that price, the tool starts the work. If the price has risen above `max_cost`, it starts nothing and returns the new price. So an assistant always sees the price before it spends. Within the spending limit you set, it can then decide by itself or ask you first. ## Instructions for your assistant If you want to approve every paid start yourself, tell the assistant so, for example: > Before starting any HalationLab.ai generation, show me the model, the settings and the quoted price in tokens, and wait for me to confirm. Then call the tool again with `max_cost` set to that price. ## Limits that still apply - The spending limit of the connection or API key. A start that would go over it is refused. - The account balance. - The quoted maximum: a started generation is never charged more than it, and failed work is free. See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md) for how prices are set and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what each outcome costs. Source: https://docs.halationlab.ai/agents/price-confirmation/ --- # Client setup > Add the HalationLab.ai MCP server to Claude, ChatGPT, Claude Code, Cursor and Codex. Every client uses the same server URL, `https://api.halationlab.ai/mcp`, and signs in with OAuth. Client menus change over time; if a step does not match, look for the client's option to add a custom MCP server or connector. ## Claude 1. Open **Settings → Connectors** and choose **Add custom connector**. 2. Name it **HalationLab.ai** and paste `https://api.halationlab.ai/mcp`. Leave the OAuth client ID and secret empty. 3. Choose **Connect** and sign in to HalationLab.ai in the window that opens. ## ChatGPT 1. Open **Settings → Apps & Connectors**. Under **Advanced settings**, turn on **Developer mode**. 2. Choose **Create**, name it **HalationLab.ai**, paste `https://api.halationlab.ai/mcp` and pick **OAuth** for authentication. 3. Sign in to HalationLab.ai when ChatGPT asks. ## Claude Code ```sh # Adds the HalationLab.ai MCP server to Claude Code. Then run /mcp in Claude Code, choose halationlab and Authenticate. set -euo pipefail claude mcp add --transport http halationlab https://api.halationlab.ai/mcp ``` Then, in Claude Code, run `/mcp`, choose **halationlab**, then **Authenticate**, and sign in in the browser window that opens. To use an API key instead of OAuth: ```sh # Adds the HalationLab.ai MCP server to Claude Code with an API key instead of OAuth. The key is sent as a header, # so keep it out of shared configuration. set -euo pipefail claude mcp add --transport http halationlab https://api.halationlab.ai/mcp \ --header "Authorization: Bearer $HALATIONLAB_API_KEY" ``` ## Cursor Add this to `~/.cursor/mcp.json`, or add a new server under **Cursor Settings → MCP**: ```json { "mcpServers": { "halationlab": { "url": "https://api.halationlab.ai/mcp" } } } ``` Choose **Connect** next to **halationlab** and sign in to HalationLab.ai. ## Codex ```sh # Adds the HalationLab.ai MCP server to Codex and signs in with OAuth in the browser window that opens. set -euo pipefail codex mcp add halationlab --url https://api.halationlab.ai/mcp codex mcp login halationlab ``` Sign in to HalationLab.ai in the browser window that opens. ## Other clients Any client that supports remote MCP servers over Streamable HTTP with OAuth works the same way: add the server URL and sign in when asked. A client that can only send a fixed header can use an API key as `Authorization: Bearer hl_live_…`. Source: https://docs.halationlab.ai/agents/clients/ --- # MCP tool reference > Every tool the HalationLab.ai MCP server offers, with its inputs. The MCP server offers 15 tools. Paid tools follow [price confirmation](https://docs.halationlab.ai/agents/price-confirmation.md): without `max_cost` they return the price and start nothing. | Tool | What it does | Hints | | --- | --- | --- | | [`get_account`](#get_account) | Account and spending limit | read-only, idempotent | | [`list_models`](#list_models) | List models | read-only, idempotent | | [`get_model`](#get_model) | Model parameters | read-only, idempotent | | [`list_projects`](#list_projects) | List projects | read-only, idempotent | | [`list_assets`](#list_assets) | List files | read-only, idempotent | | [`get_asset`](#get_asset) | Get a file | read-only, idempotent | | [`get_generation`](#get_generation) | Check a generation | read-only, idempotent | | [`list_generations`](#list_generations) | List generations | read-only, idempotent | | [`create_project`](#create_project) | Create a project | changes data, idempotent | | [`import_media`](#import_media) | Import a file | changes data, idempotent, reaches outside HalationLab.ai | | [`create_upload`](#create_upload) | Upload a local file | changes data, idempotent | | [`generate_video`](#generate_video) | Generate a video (paid) | changes data, destructive, idempotent, reaches outside HalationLab.ai | | [`generate_image`](#generate_image) | Generate an image (paid) | changes data, destructive, idempotent, reaches outside HalationLab.ai | | [`edit_media`](#edit_media) | Edit a video or image (paid) | changes data, destructive, idempotent, reaches outside HalationLab.ai | | [`cancel_generation`](#cancel_generation) | Cancel a generation | changes data, destructive, idempotent | ## get_account **Account and spending limit.** The token balance, what is left of the spending limit, the default project and permissions. Call it before paid work when unsure what the user can spend. Hints: read-only, idempotent. No inputs. ## list_models **List models.** Models by task with their typical price. Prices are in tokens. Hints: read-only, idempotent. | Input | Type | Required | Description | | --- | --- | --- | --- | | `task` | string | No | For example text-to-video, image-to-video, text-to-image, edit-image, extend-video. | | `output` | string | No | video, image or audio. | ## get_model **Model parameters.** One model's parameters (names, types, defaults, allowed values) and price. Use the names in generate tools' options. Hints: read-only, idempotent. | Input | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | Model ID, for example seedance-2.5. | ## list_projects **List projects.** Projects you can use, most recently changed first. Hints: read-only, idempotent. | Input | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | No | active (default) or archived. | ## list_assets **List files.** Uploaded files and generated outputs, newest first. Hints: read-only, idempotent. | Input | Type | Required | Description | | --- | --- | --- | --- | | `project` | string | No | Project ID (proj_…). Default: the credential's default project. | | `type` | string | No | video, image or audio. | | `origin` | string | No | upload, generation or derived. | | `cursor` | string | No | next_cursor of the previous page. | ## get_asset **Get a file.** One file with a download link that expires after an hour, and a preview image. Hints: read-only, idempotent. | Input | Type | Required | Description | | --- | --- | --- | --- | | `asset` | string | Yes | Asset ID (asset_…). | ## get_generation **Check a generation.** A generation's status, cost and outputs. Waits up to wait_seconds for it to finish, so call it again rather than polling quickly. Hints: read-only, idempotent. | Input | Type | Required | Description | | --- | --- | --- | --- | | `generation` | string | Yes | Generation ID (gen_…). | | `wait_seconds` | integer | No | Seconds to wait for a final status. Default 25. | ## list_generations **List generations.** Recent generations, newest first. Hints: read-only, idempotent. | Input | Type | Required | Description | | --- | --- | --- | --- | | `project` | string | No | Project ID (proj_…). Default: the credential's default project. | | `status` | string | No | Only this status. | | `cursor` | string | No | next_cursor of the previous page. | ## create_project **Create a project.** Creates a project, optionally with a brief (product, audience, mood) that generations can use. Hints: changes data, idempotent. | Input | Type | Required | Description | | --- | --- | --- | --- | | `name` | string | Yes | Project name. | | `product` | string | No | What the product is. | | `audience` | string | No | Who it is for. | | `mood` | string | No | Tone and feel. | ## import_media **Import a file.** Adds an image, video or audio file from a public HTTPS URL or a data: URI, and answers its asset ID once it is checked. Use the ID as a generation input. Hints: changes data, idempotent, reaches outside HalationLab.ai. | Input | Type | Required | Description | | --- | --- | --- | --- | | `url` | string | Yes | A public HTTPS URL or a data: URI (up to about 700 KB). | | `project` | string | No | Project ID (proj_…). Default: the credential's default project. | | `name` | string | No | A label for the file. | ## create_upload **Upload a local file.** For agents with a shell: answers a URL to PUT a local file to (with the headers given). After the PUT, call get_asset with the asset ID it names. Hints: changes data, idempotent. | Input | Type | Required | Description | | --- | --- | --- | --- | | `name` | string | Yes | File name. | | `content_type` | string | Yes | MIME type, for example image/png. | | `size` | integer | Yes | Size in bytes. | | `sha256` | string | Yes | SHA-256 of the file, 64 hex characters. | | `project` | string | No | Project ID (proj_…). Default: the credential's default project. | ## generate_video **Generate a video (paid).** Makes a video from a prompt, optionally from a first frame or reference images. First call without max_cost: it answers the price and starts nothing. Show the price to the user; after they agree, call again with the same arguments and max_cost. Hints: changes data, destructive, idempotent, reaches outside HalationLab.ai. | Input | Type | Required | Description | | --- | --- | --- | --- | | `prompt` | string | Yes | What happens in the video. | | `model` | string | No | Model ID. Default seedance-2.5. | | `duration` | number | No | Seconds. | | `aspect_ratio` | string | No | For example 16:9, 9:16 or 1:1. | | `resolution` | string | No | For example 720p or 1080p. | | `first_frame` | string | No | The opening frame. An asset ID, a generation ID, a public HTTPS URL or a data: URI. | | `last_frame` | string | No | The closing frame. An asset ID, a generation ID, a public HTTPS URL or a data: URI. | | `references` | array of strings | No | Reference images: asset IDs or URLs. | | `options` | object | No | Other model parameters by name, from get_model (for example {"seed": 7}). | | `project` | string | No | Project ID (proj_…). Default: the credential's default project. | | `max_cost` | integer | No | Omit to get the price only. To start, send the quoted max_cost after the user agrees. Tokens. | | `request_id` | string | No | Optional unique string. Reusing it retries the same request without starting it twice. | ## generate_image **Generate an image (paid).** Makes images from a prompt, optionally guided by reference images. First call without max_cost: it answers the price and starts nothing. After the user agrees, call again with max_cost. Hints: changes data, destructive, idempotent, reaches outside HalationLab.ai. | Input | Type | Required | Description | | --- | --- | --- | --- | | `prompt` | string | Yes | What the image shows. | | `model` | string | No | Model ID. Default nano-banana-2.1. | | `aspect_ratio` | string | No | For example 1:1 or 16:9. | | `count` | integer | No | How many images. | | `references` | array of strings | No | Images to edit or follow: asset IDs or URLs. | | `options` | object | No | Other model parameters by name, from get_model (for example {"seed": 7}). | | `project` | string | No | Project ID (proj_…). Default: the credential's default project. | | `max_cost` | integer | No | Omit to get the price only. To start, send the quoted max_cost after the user agrees. Tokens. | | `request_id` | string | No | Optional unique string. Reusing it retries the same request without starting it twice. | ## edit_media **Edit a video or image (paid).** Extends, edits, reframes, upscales or expands a file with an edit model (list_models with task extend-video, edit-video, reframe-video, upscale-video, edit-image, expand-image or upscale-image). Same price rule: no max_cost answers the price. Hints: changes data, destructive, idempotent, reaches outside HalationLab.ai. | Input | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | An edit model ID. | | `source` | string | No | The file to change. An asset ID, a generation ID, a public HTTPS URL or a data: URI. | | `prompt` | string | No | What to change, for models that take one. | | `options` | object | No | Other model parameters by name, from get_model (for example {"seed": 7}). | | `project` | string | No | Project ID (proj_…). Default: the credential's default project. | | `max_cost` | integer | No | Omit to get the price only. To start, send the quoted max_cost after the user agrees. Tokens. | | `request_id` | string | No | Optional unique string. Reusing it retries the same request without starting it twice. | ## cancel_generation **Cancel a generation.** Cancels a generation. Work not yet sent to a model host is released free; running work may still finish and be charged within its quote. Hints: changes data, destructive, idempotent. | Input | Type | Required | Description | | --- | --- | --- | --- | | `generation` | string | Yes | Generation ID (gen_…). | Source: https://docs.halationlab.ai/agents/tools/ --- # TypeScript SDK > Install @halationlab/sdk and use the HalationLab.ai API from Node.js and other server-side JavaScript runtimes. ```sh npm install @halationlab/sdk ``` The SDK is for server-side code. Never use an API key in a browser. ## Quickstart ```ts // Generates a 5-second video with the TypeScript SDK and prints its download URL. Spends at most 400 tokens. import { HalationLab } from '@halationlab/sdk'; const hl = new HalationLab({ apiKey: process.env.HALATIONLAB_API_KEY }); // run() starts the generation and waits until it is completed, failed or canceled. const generation = await hl.generations.run({ model: 'seedance-2.5', input: { prompt: 'A red fox running through snow', duration: 5, aspect_ratio: '16:9' }, max_cost: 400, }); console.log(generation.status, generation.cost.charged, generation.outputs[0]?.url); ``` `hl.generations.run()` starts a generation and waits until it is final. Every write sends an `Idempotency-Key` for you, so retries are safe. ## Resources | Resource | Methods | | --- | --- | | `hl.generations` | `create`, `get`, `list`, `cancel`, `run` (create, then wait until final) | | `hl.quotes` | `create` | | `hl.models` | `list`, `get` | | `hl.projects` | Create, read, list, update and archive projects | | `hl.assets` | `create` (import from a URL or data URI), `get`, `list`, `delete`, `transform`, `upload` (a local file, in one call) | | `hl.uploads` | The upload steps, for when you need them yourself | | `hl.account` | `get` | | `hl.webhookEndpoints` | Create, list and delete webhook endpoints | | `hl.events` | `list` | | `hl.webhooks` | `verify(body, headers, secret)` | Methods follow the [API reference](https://docs.halationlab.ai/api.md): request fields and response objects have the same names as in the API. ## Errors Failed requests throw `HalationLabError` with `type`, `code`, `status`, `param` and `requestId`, from the [error object](https://docs.halationlab.ai/guides/errors.md). ```ts // The TypeScript SDK: a client, a few reads and typed errors. import { HalationLab, HalationLabError } from '@halationlab/sdk'; const hl = new HalationLab({ apiKey: process.env.HALATIONLAB_API_KEY }); const account = await hl.account.get(); console.log(account.credential.name, account.balance?.available); const models = await hl.models.list({ task: 'text-to-video' }); for (const model of models.data) console.log(model.id, model.name); try { await hl.models.get('not-a-model'); } catch (e) { if (!(e instanceof HalationLabError)) throw e; console.log(e.status, e.type, e.code, e.param, e.requestId); } ``` ## Uploads and webhooks ```ts // Uploads a local file with the TypeScript SDK, which hashes it, sends the parts and waits for the asset. import { HalationLab } from '@halationlab/sdk'; const hl = new HalationLab({ apiKey: process.env.HALATIONLAB_API_KEY }); const asset = await hl.assets.upload(process.argv[2] ?? 'product.png'); console.log(asset.id, asset.status); ``` ```ts // Verifies a webhook with the TypeScript SDK. Pass the raw body exactly as received, not re-serialised JSON. import { HalationLab } from '@halationlab/sdk'; const hl = new HalationLab({ apiKey: process.env.HALATIONLAB_API_KEY }); export async function handle(rawBody: string, headers: Record) { // Rejects if the signature or timestamp is not valid. const event = await hl.webhooks.verify(rawBody, headers, process.env.HL_WEBHOOK_SECRET!); return event; } ``` Source: https://docs.halationlab.ai/sdks/typescript/ --- # Python SDK > Install halationlab and use the HalationLab.ai API from Python, with sync and async clients. ```sh pip install halationlab ``` ## Quickstart ```python # Generates a 5-second video with the Python SDK and prints its download URL. Spends at most 400 tokens. import os from halationlab import HalationLab client = HalationLab(api_key=os.environ["HALATIONLAB_API_KEY"]) # run() starts the generation and waits until it is completed, failed or canceled. generation = client.generations.run( model="seedance-2.5", input={"prompt": "A red fox running through snow", "duration": 5, "aspect_ratio": "16:9"}, max_cost=400, ) print(generation["status"], generation["cost"]["charged"], generation["outputs"][0]["url"] if generation["outputs"] else None) ``` `client.generations.run()` starts a generation and waits until it is final. Every write sends an `Idempotency-Key` for you, so retries are safe. ## Clients `HalationLab` is synchronous. `AsyncHalationLab` has the same methods, awaited: ```python # The async Python client. Spends at most 100 tokens. import asyncio import os from halationlab import AsyncHalationLab async def main() -> None: client = AsyncHalationLab(api_key=os.environ["HALATIONLAB_API_KEY"]) generation = await client.generations.run( model="flux.2-pro", input={"prompt": "A red ceramic mug on a linen tablecloth"}, max_cost=100, ) print(generation["id"], generation["status"]) asyncio.run(main()) ``` ## Resources The Python SDK mirrors the [TypeScript SDK](https://docs.halationlab.ai/sdks/typescript.md#resources) in snake_case: `client.generations`, `client.quotes`, `client.models`, `client.projects`, `client.assets` (including `client.assets.upload(path)`), `client.uploads`, `client.account`, `client.webhook_endpoints` and `client.events`. Webhook verification is `halationlab.webhooks.verify(body, headers, secret)`. ## Errors Failed requests raise `halationlab.HalationLabError` with `type`, `code`, `status`, `param` and `request_id`, from the [error object](https://docs.halationlab.ai/guides/errors.md). ```python # The Python SDK: a client, a few reads and typed errors. AsyncHalationLab has the same methods, awaited. import os import halationlab from halationlab import HalationLab client = HalationLab(api_key=os.environ["HALATIONLAB_API_KEY"]) account = client.account.get() print(account["credential"]["name"], account["balance"]["available"] if account["balance"] else None) models = client.models.list(task="text-to-video") for model in models["data"]: print(model["id"], model["name"]) try: client.models.get("not-a-model") except halationlab.HalationLabError as e: print(e.status, e.type, e.code, e.param, e.request_id) ``` ## Uploads and webhooks ```python # Uploads a local file with the Python SDK, which hashes it, sends the parts and waits for the asset. import os import sys from halationlab import HalationLab client = HalationLab(api_key=os.environ["HALATIONLAB_API_KEY"]) asset = client.assets.upload(sys.argv[1] if len(sys.argv) > 1 else "product.png") print(asset["id"], asset["status"]) ``` ```python # Verifies a webhook with the Python SDK. Pass the raw body exactly as received, not re-serialised JSON. import os import halationlab def handle(raw_body: bytes, headers: dict) -> dict: # Raises if the signature or timestamp is not valid. return halationlab.webhooks.verify(raw_body, headers, os.environ["HL_WEBHOOK_SECRET"]) ``` Source: https://docs.halationlab.ai/sdks/python/ --- # CLI > Run the HalationLab.ai command-line tool with npx from the TypeScript SDK package. The TypeScript SDK package includes a command-line tool, `hl`. Run it with `npx`, without installing anything: ```sh npx @halationlab/sdk hl --help ``` `--help` lists the commands and their options. The CLI calls the same API as the SDK, so it acts with the projects, scopes and [spending limit](https://docs.halationlab.ai/guides/spending-limits.md) of the API key it uses. Keep that key out of shell history and shared scripts: set it in your environment or a secret manager. ## Commands ```sh hl models [--task ] [--output video|image|audio] [--json] hl model hl generate --prompt [--input key=value ...] [--max-cost N] [--project ] [--no-wait] [--out ] hl generations get hl upload [--project ] hl account ``` - `--input` values are read as JSON when they can be (`duration=5`, `audio=true`), otherwise as text. - `generate` waits for the result and prints the generation as JSON. `--out` downloads the first output to a file instead; `--no-wait` prints the generation as soon as it is created. - Set `HALATIONLAB_API_KEY` (not needed for `models`). `HALATIONLAB_BASE_URL` points the CLI at another environment, for example `https://staging-api.halationlab.ai/v1`. For example, a five-second video with a ceiling of 400 tokens, saved to a file: ```sh npx @halationlab/sdk hl generate seedance-2.5 --prompt "A red fox running through snow" --input duration=5 --max-cost 400 --out fox.mp4 ``` Source: https://docs.halationlab.ai/sdks/cli/ --- # OpenAPI > Download the OpenAPI 3.1 document for the HalationLab.ai API and generate your own client. The whole API is described by one OpenAPI 3.1 document. The docs, the SDKs and the MCP server are generated from the same source. - From these docs: [`/openapi.json`](https://docs.halationlab.ai/openapi.json). - From the API: `GET https://api.halationlab.ai/v1/openapi.json` (no authentication needed). Use it to generate a client in another language, to import the API into an HTTP client, or to validate requests in tests. The [interactive reference](https://docs.halationlab.ai/api.md) renders the same document. What the document includes: - Every endpoint, with its summary, description, parameters, request body and the error codes it can return. - Every request and response object, with a description of each field. - The webhook events, under `webhooks`. - The two security schemes: `apiKey` (a bearer API key) and `oauth2` (authorisation code with the scopes). Request bodies are strict (`additionalProperties: false`); response objects are not, because they may gain fields. A model's own parameters are not in this document: read them from `GET /v1/models/{model}` (`input_schema`) or the [model pages](https://docs.halationlab.ai/models.md). Source: https://docs.halationlab.ai/sdks/openapi/ --- # 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 `. 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/ --- # Error codes > Every error code the HalationLab.ai API returns, by HTTP status. Every error has a stable `code`, and each code has a page. The `doc_url` in an error points at it. See [Errors](https://docs.halationlab.ai/guides/errors.md) for the shape. ## 400 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`invalid_json`](https://docs.halationlab.ai/errors/invalid-json.md) | Invalid JSON | `invalid_request_error` | No | | [`invalid_request`](https://docs.halationlab.ai/errors/invalid-request.md) | Invalid request | `invalid_request_error` | No | | [`idempotency_key_invalid`](https://docs.halationlab.ai/errors/idempotency-key-invalid.md) | Invalid idempotency key | `invalid_request_error` | No | ## 401 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) | Authentication required | `authentication_error` | No | | [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) | Invalid API key | `authentication_error` | No | | [`access_token_invalid`](https://docs.halationlab.ai/errors/access-token-invalid.md) | Invalid access token | `authentication_error` | No | ## 402 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`insufficient_balance`](https://docs.halationlab.ai/errors/insufficient-balance.md) | Not enough tokens | `payment_required_error` | No | | [`spending_limit_reached`](https://docs.halationlab.ai/errors/spending-limit-reached.md) | Spending limit reached | `payment_required_error` | No | | [`max_cost_exceeded`](https://docs.halationlab.ai/errors/max-cost-exceeded.md) | Price above max_cost | `payment_required_error` | No | ## 403 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`insufficient_scope`](https://docs.halationlab.ai/errors/insufficient-scope.md) | Missing permission | `permission_error` | No | | [`spending_not_authorized`](https://docs.halationlab.ai/errors/spending-not-authorized.md) | Spending not set up | `permission_error` | No | | [`spending_limit_changed`](https://docs.halationlab.ai/errors/spending-limit-changed.md) | Spending limit changed | `permission_error` | No | | [`consent_required`](https://docs.halationlab.ai/errors/consent-required.md) | Consent required | `permission_error` | No | | [`project_not_shared`](https://docs.halationlab.ai/errors/project-not-shared.md) | Project not available | `permission_error` | No | | [`account_restricted`](https://docs.halationlab.ai/errors/account-restricted.md) | Account restricted | `permission_error` | No | | [`account_suspended`](https://docs.halationlab.ai/errors/account-suspended.md) | Account on hold | `permission_error` | No | | [`account_read_only`](https://docs.halationlab.ai/errors/account-read-only.md) | Account is read-only | `permission_error` | No | | [`age_confirmation_required`](https://docs.halationlab.ai/errors/age-confirmation-required.md) | Age confirmation required | `permission_error` | No | | [`content_blocked`](https://docs.halationlab.ai/errors/content-blocked.md) | Content not allowed | `permission_error` | No | | [`limit_reached`](https://docs.halationlab.ai/errors/limit-reached.md) | Account limit reached | `permission_error` | No | | [`forbidden`](https://docs.halationlab.ai/errors/forbidden.md) | Not allowed | `permission_error` | No | ## 404 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`not_found`](https://docs.halationlab.ai/errors/not-found.md) | Not found | `not_found_error` | No | | [`model_not_found`](https://docs.halationlab.ai/errors/model-not-found.md) | Unknown model | `not_found_error` | No | | [`route_not_found`](https://docs.halationlab.ai/errors/route-not-found.md) | Unknown endpoint | `not_found_error` | No | ## 405 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`method_not_allowed`](https://docs.halationlab.ai/errors/method-not-allowed.md) | Method not allowed | `invalid_request_error` | No | ## 409 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`idempotency_key_reused`](https://docs.halationlab.ai/errors/idempotency-key-reused.md) | Idempotency key reused | `idempotency_error` | No | | [`request_in_progress`](https://docs.halationlab.ai/errors/request-in-progress.md) | Request in progress | `idempotency_error` | Yes | | [`outcome_unknown`](https://docs.halationlab.ai/errors/outcome-unknown.md) | Outcome not known yet | `idempotency_error` | Yes | | [`idempotency_key_expired`](https://docs.halationlab.ai/errors/idempotency-key-expired.md) | Idempotency key expired | `idempotency_error` | No | | [`quote_expired`](https://docs.halationlab.ai/errors/quote-expired.md) | Quote expired | `conflict_error` | No | | [`quote_used`](https://docs.halationlab.ai/errors/quote-used.md) | Quote already used | `conflict_error` | No | | [`price_changed`](https://docs.halationlab.ai/errors/price-changed.md) | Price or terms changed | `conflict_error` | No | | [`media_not_ready`](https://docs.halationlab.ai/errors/media-not-ready.md) | Media still processing | `conflict_error` | Yes | | [`conflict`](https://docs.halationlab.ai/errors/conflict.md) | Conflict | `conflict_error` | Yes | ## 410 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`access_revoked`](https://docs.halationlab.ai/errors/access-revoked.md) | Access revoked | `permission_error` | No | ## 413 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`request_too_large`](https://docs.halationlab.ai/errors/request-too-large.md) | Request too large | `invalid_request_error` | No | ## 415 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`unsupported_media_type`](https://docs.halationlab.ai/errors/unsupported-media-type.md) | Unsupported content type | `invalid_request_error` | No | ## 422 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`parameter_missing`](https://docs.halationlab.ai/errors/parameter-missing.md) | Missing parameter | `invalid_request_error` | No | | [`parameter_invalid`](https://docs.halationlab.ai/errors/parameter-invalid.md) | Invalid parameter | `invalid_request_error` | No | | [`parameter_unknown`](https://docs.halationlab.ai/errors/parameter-unknown.md) | Unknown parameter | `invalid_request_error` | No | | [`media_invalid`](https://docs.halationlab.ai/errors/media-invalid.md) | Unusable media | `invalid_request_error` | No | | [`media_fetch_failed`](https://docs.halationlab.ai/errors/media-fetch-failed.md) | Could not fetch media | `invalid_request_error` | No | ## 429 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) | Too many requests | `rate_limit_error` | Yes | ## 500 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) | Internal error | `api_error` | Yes | ## 503 | Code | Title | Type | Retry can help | | --- | --- | --- | --- | | [`model_unavailable`](https://docs.halationlab.ai/errors/model-unavailable.md) | Model unavailable | `api_error` | Yes | | [`model_unavailable_in_region`](https://docs.halationlab.ai/errors/model-unavailable-in-region.md) | Model unavailable in your region | `api_error` | No | | [`service_unavailable`](https://docs.halationlab.ai/errors/service-unavailable.md) | Service unavailable | `api_error` | Yes | Source: https://docs.halationlab.ai/errors/ --- # Billing outcomes > What every generation outcome and every error costs, in tokens. Money is counted in tokens, the unit the app shows. Every paid request is quoted first: the quoted maximum is reserved before work starts and is never exceeded. ## Generation outcomes | Outcome | Charged | Notes | | --- | --- | --- | | `completed` | At most `cost.quoted_max` | `cost.charged` is final once `cost.final` is true. | | `failed` | Nothing | Failed work is free. The generation ID stays the same when a failed attempt is retried automatically. | | `canceled` before dispatch | Nothing | The reserved tokens are released. | | `canceled` after dispatch | At most `cost.quoted_max` | Work already sent to a model host may still finish, and is then charged within its quote. | | Late result | Nothing | A result that arrives late is delivered free. | ## Errors Every refusal is free: an error response means nothing was started or charged by that request. | Code | Status | Charged | Retry can help | | --- | --- | --- | --- | | [`invalid_json`](https://docs.halationlab.ai/errors/invalid-json.md) | 400 | No | No | | [`invalid_request`](https://docs.halationlab.ai/errors/invalid-request.md) | 400 | No | No | | [`idempotency_key_invalid`](https://docs.halationlab.ai/errors/idempotency-key-invalid.md) | 400 | No | No | | [`authentication_required`](https://docs.halationlab.ai/errors/authentication-required.md) | 401 | No | No | | [`api_key_invalid`](https://docs.halationlab.ai/errors/api-key-invalid.md) | 401 | No | No | | [`access_token_invalid`](https://docs.halationlab.ai/errors/access-token-invalid.md) | 401 | No | No | | [`insufficient_balance`](https://docs.halationlab.ai/errors/insufficient-balance.md) | 402 | No | No | | [`spending_limit_reached`](https://docs.halationlab.ai/errors/spending-limit-reached.md) | 402 | No | No | | [`max_cost_exceeded`](https://docs.halationlab.ai/errors/max-cost-exceeded.md) | 402 | No | No | | [`insufficient_scope`](https://docs.halationlab.ai/errors/insufficient-scope.md) | 403 | No | No | | [`spending_not_authorized`](https://docs.halationlab.ai/errors/spending-not-authorized.md) | 403 | No | No | | [`spending_limit_changed`](https://docs.halationlab.ai/errors/spending-limit-changed.md) | 403 | No | No | | [`consent_required`](https://docs.halationlab.ai/errors/consent-required.md) | 403 | No | No | | [`project_not_shared`](https://docs.halationlab.ai/errors/project-not-shared.md) | 403 | No | No | | [`account_restricted`](https://docs.halationlab.ai/errors/account-restricted.md) | 403 | No | No | | [`account_suspended`](https://docs.halationlab.ai/errors/account-suspended.md) | 403 | No | No | | [`account_read_only`](https://docs.halationlab.ai/errors/account-read-only.md) | 403 | No | No | | [`age_confirmation_required`](https://docs.halationlab.ai/errors/age-confirmation-required.md) | 403 | No | No | | [`content_blocked`](https://docs.halationlab.ai/errors/content-blocked.md) | 403 | No | No | | [`limit_reached`](https://docs.halationlab.ai/errors/limit-reached.md) | 403 | No | No | | [`forbidden`](https://docs.halationlab.ai/errors/forbidden.md) | 403 | No | No | | [`not_found`](https://docs.halationlab.ai/errors/not-found.md) | 404 | No | No | | [`model_not_found`](https://docs.halationlab.ai/errors/model-not-found.md) | 404 | No | No | | [`route_not_found`](https://docs.halationlab.ai/errors/route-not-found.md) | 404 | No | No | | [`method_not_allowed`](https://docs.halationlab.ai/errors/method-not-allowed.md) | 405 | No | No | | [`idempotency_key_reused`](https://docs.halationlab.ai/errors/idempotency-key-reused.md) | 409 | No | No | | [`request_in_progress`](https://docs.halationlab.ai/errors/request-in-progress.md) | 409 | No | Yes | | [`outcome_unknown`](https://docs.halationlab.ai/errors/outcome-unknown.md) | 409 | No | Yes | | [`idempotency_key_expired`](https://docs.halationlab.ai/errors/idempotency-key-expired.md) | 409 | No | No | | [`quote_expired`](https://docs.halationlab.ai/errors/quote-expired.md) | 409 | No | No | | [`quote_used`](https://docs.halationlab.ai/errors/quote-used.md) | 409 | No | No | | [`price_changed`](https://docs.halationlab.ai/errors/price-changed.md) | 409 | No | No | | [`media_not_ready`](https://docs.halationlab.ai/errors/media-not-ready.md) | 409 | No | Yes | | [`conflict`](https://docs.halationlab.ai/errors/conflict.md) | 409 | No | Yes | | [`access_revoked`](https://docs.halationlab.ai/errors/access-revoked.md) | 410 | No | No | | [`request_too_large`](https://docs.halationlab.ai/errors/request-too-large.md) | 413 | No | No | | [`unsupported_media_type`](https://docs.halationlab.ai/errors/unsupported-media-type.md) | 415 | No | No | | [`parameter_missing`](https://docs.halationlab.ai/errors/parameter-missing.md) | 422 | No | No | | [`parameter_invalid`](https://docs.halationlab.ai/errors/parameter-invalid.md) | 422 | No | No | | [`parameter_unknown`](https://docs.halationlab.ai/errors/parameter-unknown.md) | 422 | No | No | | [`media_invalid`](https://docs.halationlab.ai/errors/media-invalid.md) | 422 | No | No | | [`media_fetch_failed`](https://docs.halationlab.ai/errors/media-fetch-failed.md) | 422 | No | No | | [`rate_limited`](https://docs.halationlab.ai/errors/rate-limited.md) | 429 | No | Yes | | [`internal_error`](https://docs.halationlab.ai/errors/internal-error.md) | 500 | No | Yes | | [`model_unavailable`](https://docs.halationlab.ai/errors/model-unavailable.md) | 503 | No | Yes | | [`model_unavailable_in_region`](https://docs.halationlab.ai/errors/model-unavailable-in-region.md) | 503 | No | No | | [`service_unavailable`](https://docs.halationlab.ai/errors/service-unavailable.md) | 503 | No | Yes | See [Pricing and quotes](https://docs.halationlab.ai/guides/pricing-and-quotes.md) and [Spending limits](https://docs.halationlab.ai/guides/spending-limits.md). Source: https://docs.halationlab.ai/billing-outcomes/ --- # invalid_json > Invalid JSON: The request body is not valid JSON. **Invalid JSON.** The request body is not valid JSON. | | | | --- | --- | | HTTP status | 400 | | Type | `invalid_request_error` | | Code | `invalid_json` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Send a JSON object with `Content-Type: application/json`. ## Example ```json { "error": { "type": "invalid_request_error", "code": "invalid_json", "message": "The request body is not valid JSON.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/invalid-json/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/invalid-json/ --- # invalid_request > Invalid request: The request is not valid. **Invalid request.** The request is not valid. | | | | --- | --- | | HTTP status | 400 | | Type | `invalid_request_error` | | Code | `invalid_request` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Read `message` and `param`, fix the request and send it again. ## Example ```json { "error": { "type": "invalid_request_error", "code": "invalid_request", "message": "The request is not valid.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/invalid-request/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/invalid-request/ --- # idempotency_key_invalid > Invalid idempotency key: The `Idempotency-Key` header must be 1 to 128 printable characters. **Invalid idempotency key.** The `Idempotency-Key` header must be 1 to 128 printable characters. | | | | --- | --- | | HTTP status | 400 | | Type | `invalid_request_error` | | Code | `idempotency_key_invalid` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Send a UUID or another unique string of up to 128 characters. ## Example ```json { "error": { "type": "invalid_request_error", "code": "idempotency_key_invalid", "message": "The `Idempotency-Key` header must be 1 to 128 printable characters.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/idempotency-key-invalid/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/idempotency-key-invalid/ --- # authentication_required > Authentication required: Send an API key or an OAuth access token in the `Authorization: Bearer …` header. **Authentication required.** Send an API key or an OAuth access token in the `Authorization: Bearer …` header. | | | | --- | --- | | HTTP status | 401 | | Type | `authentication_error` | | Code | `authentication_required` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Create an API key in Account → Developers and send it as `Authorization: Bearer hl_live_…`. ## Example ```json { "error": { "type": "authentication_error", "code": "authentication_required", "message": "Send an API key or an OAuth access token in the `Authorization: Bearer …` header.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/authentication-required/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `GET /v1/voices`: List voices - `POST /v1/quotes`: Get a quote - `POST /v1/generations`: Start a generation - `GET /v1/generations`: List generations - `GET /v1/generations/{id}`: Get a generation - `POST /v1/generations/{id}/cancel`: Cancel a generation - `GET /v1/projects`: List projects - `POST /v1/projects`: Create a project - `GET /v1/projects/{id}`: Get a project - `PATCH /v1/projects/{id}`: Update a project - `POST /v1/projects/{id}/archive`: Archive a project - `GET /v1/assets`: List assets - `POST /v1/assets`: Import a file - `GET /v1/assets/{id}`: Get an asset - `DELETE /v1/assets/{id}`: Delete an asset - `POST /v1/assets/{id}/transform`: Transform an asset - `POST /v1/uploads`: Start an upload - `GET /v1/uploads/{id}`: Get an upload - `POST /v1/uploads/{id}/complete`: Complete an upload - `GET /v1/account`: Get the account - `GET /v1/webhook_endpoints`: List webhook endpoints - `POST /v1/webhook_endpoints`: Create a webhook endpoint - `DELETE /v1/webhook_endpoints/{id}`: Delete a webhook endpoint - `GET /v1/events`: List events See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/authentication-required/ --- # api_key_invalid > Invalid API key: This API key is not valid. It may have been revoked or mistyped. **Invalid API key.** This API key is not valid. It may have been revoked or mistyped. | | | | --- | --- | | HTTP status | 401 | | Type | `authentication_error` | | Code | `api_key_invalid` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Check the key, or create a new one in Account → Developers. ## Example ```json { "error": { "type": "authentication_error", "code": "api_key_invalid", "message": "This API key is not valid. It may have been revoked or mistyped.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/api-key-invalid/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `GET /v1/voices`: List voices - `POST /v1/quotes`: Get a quote - `POST /v1/generations`: Start a generation - `GET /v1/generations`: List generations - `GET /v1/generations/{id}`: Get a generation - `POST /v1/generations/{id}/cancel`: Cancel a generation - `GET /v1/projects`: List projects - `POST /v1/projects`: Create a project - `GET /v1/projects/{id}`: Get a project - `PATCH /v1/projects/{id}`: Update a project - `POST /v1/projects/{id}/archive`: Archive a project - `GET /v1/assets`: List assets - `POST /v1/assets`: Import a file - `GET /v1/assets/{id}`: Get an asset - `DELETE /v1/assets/{id}`: Delete an asset - `POST /v1/assets/{id}/transform`: Transform an asset - `POST /v1/uploads`: Start an upload - `GET /v1/uploads/{id}`: Get an upload - `POST /v1/uploads/{id}/complete`: Complete an upload - `GET /v1/account`: Get the account - `GET /v1/webhook_endpoints`: List webhook endpoints - `POST /v1/webhook_endpoints`: Create a webhook endpoint - `DELETE /v1/webhook_endpoints/{id}`: Delete a webhook endpoint - `GET /v1/events`: List events See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/api-key-invalid/ --- # access_token_invalid > Invalid access token: The OAuth access token is invalid, expired or belongs to a connection that has ended. **Invalid access token.** The OAuth access token is invalid, expired or belongs to a connection that has ended. | | | | --- | --- | | HTTP status | 401 | | Type | `authentication_error` | | Code | `access_token_invalid` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Refresh the access token, or ask the account owner to connect your app again. ## Example ```json { "error": { "type": "authentication_error", "code": "access_token_invalid", "message": "The OAuth access token is invalid, expired or belongs to a connection that has ended.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/access-token-invalid/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/access-token-invalid/ --- # insufficient_balance > Not enough tokens: The account does not have enough tokens for this generation. **Not enough tokens.** The account does not have enough tokens for this generation. | | | | --- | --- | | HTTP status | 402 | | Type | `payment_required_error` | | Code | `insufficient_balance` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Add tokens to the account, or choose a cheaper model or settings. Nothing was charged. ## Example ```json { "error": { "type": "payment_required_error", "code": "insufficient_balance", "message": "The account does not have enough tokens for this generation.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/insufficient-balance/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/insufficient-balance/ --- # spending_limit_reached > Spending limit reached: This generation would go over the spending limit set for this API key or app. **Spending limit reached.** This generation would go over the spending limit set for this API key or app. | | | | --- | --- | | HTTP status | 402 | | Type | `payment_required_error` | | Code | `spending_limit_reached` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Wait for the limit to reset, or ask the account owner to raise it at `manage_url`. Nothing was charged. ## Example ```json { "error": { "type": "payment_required_error", "code": "spending_limit_reached", "message": "This generation would go over the spending limit set for this API key or app.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/spending-limit-reached/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "manage_url": "https://app.halationlab.ai/…" } } ``` ## Returned by - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/spending-limit-reached/ --- # max_cost_exceeded > Price above max_cost: The quoted price is higher than the `max_cost` you sent. Nothing was created or charged. **Price above max_cost.** The quoted price is higher than the `max_cost` you sent. Nothing was created or charged. | | | | --- | --- | | HTTP status | 402 | | Type | `payment_required_error` | | Code | `max_cost_exceeded` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Raise `max_cost` to at least `details.quote.max_cost`, or change the request. ## Example ```json { "error": { "type": "payment_required_error", "code": "max_cost_exceeded", "message": "The quoted price is higher than the `max_cost` you sent. Nothing was created or charged.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/max-cost-exceeded/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "details": { "quote": { "id": "quote_01JD3Y6A1B2C3D4E5F6G7H8J9K", "object": "quote", "model": "seedance-2.5", "max_cost": 380, "expires_at": "2026-11-28T11:10:00Z" } } } } ``` ## Returned by - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/max-cost-exceeded/ --- # insufficient_scope > Missing permission: This credential does not have the permission this request needs. **Missing permission.** This credential does not have the permission this request needs. | | | | --- | --- | | HTTP status | 403 | | Type | `permission_error` | | Code | `insufficient_scope` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Use an API key with this permission, or ask the user to grant the scope named in `details.required_scopes`. ## Example ```json { "error": { "type": "permission_error", "code": "insufficient_scope", "message": "This credential does not have the permission this request needs.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/insufficient-scope/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "details": { "required_scopes": [ "generate" ] } } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/insufficient-scope/ --- # spending_not_authorized > Spending not set up: This API key or app has no spending limit that covers this model and project. **Spending not set up.** This API key or app has no spending limit that covers this model and project. | | | | --- | --- | | HTTP status | 403 | | Type | `permission_error` | | Code | `spending_not_authorized` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Ask the account owner to allow spending for this credential at `manage_url`. Nothing was charged. ## Example ```json { "error": { "type": "permission_error", "code": "spending_not_authorized", "message": "This API key or app has no spending limit that covers this model and project.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/spending-not-authorized/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "manage_url": "https://app.halationlab.ai/…" } } ``` ## Returned by - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/spending-not-authorized/ --- # spending_limit_changed > Spending limit changed: The spending limit for this credential is paused, revoked or expired. **Spending limit changed.** The spending limit for this credential is paused, revoked or expired. | | | | --- | --- | | HTTP status | 403 | | Type | `permission_error` | | Code | `spending_limit_changed` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Ask the account owner to review the limit at `manage_url`. ## Example ```json { "error": { "type": "permission_error", "code": "spending_limit_changed", "message": "The spending limit for this credential is paused, revoked or expired.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/spending-limit-changed/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "manage_url": "https://app.halationlab.ai/…" } } ``` ## Returned by - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/spending-limit-changed/ --- # consent_required > Consent required: The account owner has not accepted the upload rights and processing terms for this credential, or they have changed since. **Consent required.** The account owner has not accepted the upload rights and processing terms for this credential, or they have changed since. | | | | --- | --- | | HTTP status | 403 | | Type | `permission_error` | | Code | `consent_required` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Ask the account owner to accept them for this API key or app at `manage_url`. ## Example ```json { "error": { "type": "permission_error", "code": "consent_required", "message": "The account owner has not accepted the upload rights and processing terms for this credential, or they have changed since.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/consent-required/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "manage_url": "https://app.halationlab.ai/…" } } ``` ## Returned by - `POST /v1/generations`: Start a generation - `POST /v1/assets`: Import a file - `POST /v1/uploads`: Start an upload See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/consent-required/ --- # project_not_shared > Project not available: This credential cannot create projects or use this project. **Project not available.** This credential cannot create projects or use this project. | | | | --- | --- | | HTTP status | 403 | | Type | `permission_error` | | Code | `project_not_shared` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Use a project shared with this credential, or a credential with access to all projects. ## Example ```json { "error": { "type": "permission_error", "code": "project_not_shared", "message": "This credential cannot create projects or use this project.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/project-not-shared/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/projects`: Create a project See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/project-not-shared/ --- # account_restricted > Account restricted: This account cannot start paid work at the moment. **Account restricted.** This account cannot start paid work at the moment. | | | | --- | --- | | HTTP status | 403 | | Type | `permission_error` | | Code | `account_restricted` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Contact support from the HalationLab.ai app. ## Example ```json { "error": { "type": "permission_error", "code": "account_restricted", "message": "This account cannot start paid work at the moment.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/account-restricted/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/account-restricted/ --- # account_suspended > Account on hold: This account is on hold. **Account on hold.** This account is on hold. | | | | --- | --- | | HTTP status | 403 | | Type | `permission_error` | | Code | `account_suspended` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Contact support from the HalationLab.ai app. ## Example ```json { "error": { "type": "permission_error", "code": "account_suspended", "message": "This account is on hold.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/account-suspended/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/account-suspended/ --- # account_read_only > Account is read-only: This account can download its work but cannot start new work. **Account is read-only.** This account can download its work but cannot start new work. | | | | --- | --- | | HTTP status | 403 | | Type | `permission_error` | | Code | `account_read_only` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Renew the plan in the HalationLab.ai app. ## Example ```json { "error": { "type": "permission_error", "code": "account_read_only", "message": "This account can download its work but cannot start new work.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/account-read-only/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/account-read-only/ --- # age_confirmation_required > Age confirmation required: The account owner must confirm they are an adult before paid generation. **Age confirmation required.** The account owner must confirm they are an adult before paid generation. | | | | --- | --- | | HTTP status | 403 | | Type | `permission_error` | | Code | `age_confirmation_required` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Sign in to the HalationLab.ai app once and confirm your age. ## Example ```json { "error": { "type": "permission_error", "code": "age_confirmation_required", "message": "The account owner must confirm they are an adult before paid generation.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/age-confirmation-required/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/age-confirmation-required/ --- # content_blocked > Content not allowed: This request conflicts with the HalationLab.ai acceptable use policy. **Content not allowed.** This request conflicts with the HalationLab.ai acceptable use policy. | | | | --- | --- | | HTTP status | 403 | | Type | `permission_error` | | Code | `content_blocked` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Change the prompt or inputs. Nothing was charged. ## Example ```json { "error": { "type": "permission_error", "code": "content_blocked", "message": "This request conflicts with the HalationLab.ai acceptable use policy.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/content-blocked/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/content-blocked/ --- # limit_reached > Account limit reached: An account limit (storage, projects or webhook endpoints) would be exceeded. **Account limit reached.** An account limit (storage, projects or webhook endpoints) would be exceeded. | | | | --- | --- | | HTTP status | 403 | | Type | `permission_error` | | Code | `limit_reached` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Free space or remove unused items, then try again. ## Example ```json { "error": { "type": "permission_error", "code": "limit_reached", "message": "An account limit (storage, projects or webhook endpoints) would be exceeded.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/limit-reached/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/projects`: Create a project - `POST /v1/assets`: Import a file - `POST /v1/uploads`: Start an upload - `POST /v1/webhook_endpoints`: Create a webhook endpoint See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/limit-reached/ --- # forbidden > Not allowed: This credential is not allowed to do this. **Not allowed.** This credential is not allowed to do this. | | | | --- | --- | | HTTP status | 403 | | Type | `permission_error` | | Code | `forbidden` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Read `message` for the reason. ## Example ```json { "error": { "type": "permission_error", "code": "forbidden", "message": "This credential is not allowed to do this.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/forbidden/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/forbidden/ --- # not_found > Not found: No such object, or this credential cannot see it. **Not found.** No such object, or this credential cannot see it. | | | | --- | --- | | HTTP status | 404 | | Type | `not_found_error` | | Code | `not_found` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Check the ID and that the project is shared with this credential. ## Example ```json { "error": { "type": "not_found_error", "code": "not_found", "message": "No such object, or this credential cannot see it.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/not-found/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/quotes`: Get a quote - `POST /v1/generations`: Start a generation - `GET /v1/generations`: List generations - `GET /v1/generations/{id}`: Get a generation - `POST /v1/generations/{id}/cancel`: Cancel a generation - `GET /v1/projects/{id}`: Get a project - `PATCH /v1/projects/{id}`: Update a project - `POST /v1/projects/{id}/archive`: Archive a project - `GET /v1/assets`: List assets - `POST /v1/assets`: Import a file - `GET /v1/assets/{id}`: Get an asset - `DELETE /v1/assets/{id}`: Delete an asset - `POST /v1/assets/{id}/transform`: Transform an asset - `POST /v1/uploads`: Start an upload - `GET /v1/uploads/{id}`: Get an upload - `POST /v1/uploads/{id}/complete`: Complete an upload - `DELETE /v1/webhook_endpoints/{id}`: Delete a webhook endpoint See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/not-found/ --- # model_not_found > Unknown model: There is no model with this ID. **Unknown model.** There is no model with this ID. | | | | --- | --- | | HTTP status | 404 | | Type | `not_found_error` | | Code | `model_not_found` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do List models with `GET /v1/models`. ## Example ```json { "error": { "type": "not_found_error", "code": "model_not_found", "message": "There is no model with this ID.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/model-not-found/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `GET /v1/models/{model}`: Get a model - `POST /v1/quotes`: Get a quote - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/model-not-found/ --- # route_not_found > Unknown endpoint: There is no endpoint at this path. **Unknown endpoint.** There is no endpoint at this path. | | | | --- | --- | | HTTP status | 404 | | Type | `not_found_error` | | Code | `route_not_found` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Check the path against the API reference. ## Example ```json { "error": { "type": "not_found_error", "code": "route_not_found", "message": "There is no endpoint at this path.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/route-not-found/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/route-not-found/ --- # method_not_allowed > Method not allowed: This endpoint does not accept this HTTP method. **Method not allowed.** This endpoint does not accept this HTTP method. | | | | --- | --- | | HTTP status | 405 | | Type | `invalid_request_error` | | Code | `method_not_allowed` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Check the method against the API reference; the `Allow` header lists the accepted ones. ## Example ```json { "error": { "type": "invalid_request_error", "code": "method_not_allowed", "message": "This endpoint does not accept this HTTP method.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/method-not-allowed/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/method-not-allowed/ --- # idempotency_key_reused > Idempotency key reused: This `Idempotency-Key` was already used for a different request. **Idempotency key reused.** This `Idempotency-Key` was already used for a different request. | | | | --- | --- | | HTTP status | 409 | | Type | `idempotency_error` | | Code | `idempotency_key_reused` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Use a new key for a new request. Reuse a key only to retry the identical request. ## Example ```json { "error": { "type": "idempotency_error", "code": "idempotency_key_reused", "message": "This `Idempotency-Key` was already used for a different request.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/idempotency-key-reused/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/idempotency-key-reused/ --- # request_in_progress > Request in progress: A request with this `Idempotency-Key` is still being processed. **Request in progress.** A request with this `Idempotency-Key` is still being processed. | | | | --- | --- | | HTTP status | 409 | | Type | `idempotency_error` | | Code | `request_in_progress` | | Can retrying help? | Yes. Wait `Retry-After` seconds, then send the identical request with the same `Idempotency-Key`. | | Charged? | No. This refusal is free. | ## What to do Wait `Retry-After` seconds and send the identical request again. Do not change the key. ## Example ```json { "error": { "type": "idempotency_error", "code": "request_in_progress", "message": "A request with this `Idempotency-Key` is still being processed.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/request-in-progress/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "retry_after": 2 } } ``` ## Returned by - `POST /v1/generations`: Start a generation - `POST /v1/generations/{id}/cancel`: Cancel a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/request-in-progress/ --- # outcome_unknown > Outcome not known yet: We could not confirm whether this request completed. **Outcome not known yet.** We could not confirm whether this request completed. | | | | --- | --- | | HTTP status | 409 | | Type | `idempotency_error` | | Code | `outcome_unknown` | | Can retrying help? | Yes. Wait `Retry-After` seconds, then send the identical request with the same `Idempotency-Key`. | | Charged? | No. This refusal is free. | ## What to do Send the identical request again with the same `Idempotency-Key`; it never runs twice. ## Example ```json { "error": { "type": "idempotency_error", "code": "outcome_unknown", "message": "We could not confirm whether this request completed.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/outcome-unknown/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "retry_after": 2 } } ``` ## Returned by - `POST /v1/generations`: Start a generation - `POST /v1/generations/{id}/cancel`: Cancel a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/outcome-unknown/ --- # idempotency_key_expired > Idempotency key expired: This `Idempotency-Key` is too old to replay. **Idempotency key expired.** This `Idempotency-Key` is too old to replay. | | | | --- | --- | | HTTP status | 409 | | Type | `idempotency_error` | | Code | `idempotency_key_expired` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Look the result up (for example `GET /v1/generations`) instead of retrying. ## Example ```json { "error": { "type": "idempotency_error", "code": "idempotency_key_expired", "message": "This `Idempotency-Key` is too old to replay.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/idempotency-key-expired/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/idempotency-key-expired/ --- # quote_expired > Quote expired: This quote has expired. Quotes are valid for 30 minutes. **Quote expired.** This quote has expired. Quotes are valid for 30 minutes. | | | | --- | --- | | HTTP status | 409 | | Type | `conflict_error` | | Code | `quote_expired` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Request a new quote, or send the generation request without `quote`. ## Example ```json { "error": { "type": "conflict_error", "code": "quote_expired", "message": "This quote has expired. Quotes are valid for 30 minutes.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/quote-expired/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/quote-expired/ --- # quote_used > Quote already used: This quote has already started a generation. **Quote already used.** This quote has already started a generation. | | | | --- | --- | | HTTP status | 409 | | Type | `conflict_error` | | Code | `quote_used` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Request a new quote for another generation. ## Example ```json { "error": { "type": "conflict_error", "code": "quote_used", "message": "This quote has already started a generation.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/quote-used/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/quote-used/ --- # price_changed > Price or terms changed: The model's price, host or terms changed since the quote. **Price or terms changed.** The model's price, host or terms changed since the quote. | | | | --- | --- | | HTTP status | 409 | | Type | `conflict_error` | | Code | `price_changed` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Request a new quote. Nothing was charged. ## Example ```json { "error": { "type": "conflict_error", "code": "price_changed", "message": "The model's price, host or terms changed since the quote.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/price-changed/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/price-changed/ --- # media_not_ready > Media still processing: An input file is still being checked and cannot be used yet. **Media still processing.** An input file is still being checked and cannot be used yet. | | | | --- | --- | | HTTP status | 409 | | Type | `conflict_error` | | Code | `media_not_ready` | | Can retrying help? | Yes. Wait `Retry-After` seconds, then send the identical request with the same `Idempotency-Key`. | | Charged? | No. This refusal is free. | ## What to do Retry the identical request with the same `Idempotency-Key` after `Retry-After` seconds. ## Example ```json { "error": { "type": "conflict_error", "code": "media_not_ready", "message": "An input file is still being checked and cannot be used yet.", "param": "input.first_frame", "doc_url": "https://docs.halationlab.ai/errors/media-not-ready/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "retry_after": 2 } } ``` ## Returned by - `POST /v1/quotes`: Get a quote - `POST /v1/generations`: Start a generation - `POST /v1/assets/{id}/transform`: Transform an asset See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/media-not-ready/ --- # conflict > Conflict: The object changed while this request ran. **Conflict.** The object changed while this request ran. | | | | --- | --- | | HTTP status | 409 | | Type | `conflict_error` | | Code | `conflict` | | Can retrying help? | Yes. Wait `Retry-After` seconds, then send the identical request with the same `Idempotency-Key`. | | Charged? | No. This refusal is free. | ## What to do Read the object again and retry. ## Example ```json { "error": { "type": "conflict_error", "code": "conflict", "message": "The object changed while this request ran.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/conflict/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "retry_after": 2 } } ``` ## Returned by - `PATCH /v1/projects/{id}`: Update a project See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/conflict/ --- # access_revoked > Access revoked: Access to this object has been withdrawn. **Access revoked.** Access to this object has been withdrawn. | | | | --- | --- | | HTTP status | 410 | | Type | `permission_error` | | Code | `access_revoked` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Use another object. ## Example ```json { "error": { "type": "permission_error", "code": "access_revoked", "message": "Access to this object has been withdrawn.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/access-revoked/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/access-revoked/ --- # request_too_large > Request too large: The request body is larger than 1 MiB. **Request too large.** The request body is larger than 1 MiB. | | | | --- | --- | | HTTP status | 413 | | Type | `invalid_request_error` | | Code | `request_too_large` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Upload large files with `POST /v1/uploads`, or import them from a URL with `POST /v1/assets`. ## Example ```json { "error": { "type": "invalid_request_error", "code": "request_too_large", "message": "The request body is larger than 1 MiB.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/request-too-large/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/request-too-large/ --- # unsupported_media_type > Unsupported content type: This file type is not supported. **Unsupported content type.** This file type is not supported. | | | | --- | --- | | HTTP status | 415 | | Type | `invalid_request_error` | | Code | `unsupported_media_type` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Use a JPEG, PNG or WebP image, an MP4, MOV or WebM video, or an MP3, WAV or M4A audio file. ## Example ```json { "error": { "type": "invalid_request_error", "code": "unsupported_media_type", "message": "This file type is not supported.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/unsupported-media-type/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/assets`: Import a file - `POST /v1/uploads`: Start an upload See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/unsupported-media-type/ --- # parameter_missing > Missing parameter: A required parameter is missing. **Missing parameter.** A required parameter is missing. | | | | --- | --- | | HTTP status | 422 | | Type | `invalid_request_error` | | Code | `parameter_missing` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Add the parameter named in `param`. ## Example ```json { "error": { "type": "invalid_request_error", "code": "parameter_missing", "message": "A required parameter is missing.", "param": "input.duration", "doc_url": "https://docs.halationlab.ai/errors/parameter-missing/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/quotes`: Get a quote - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/parameter-missing/ --- # parameter_invalid > Invalid parameter: A parameter has a value this endpoint or model does not accept. **Invalid parameter.** A parameter has a value this endpoint or model does not accept. | | | | --- | --- | | HTTP status | 422 | | Type | `invalid_request_error` | | Code | `parameter_invalid` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Fix the parameter named in `param`; `message` gives the accepted values. ## Example ```json { "error": { "type": "invalid_request_error", "code": "parameter_invalid", "message": "A parameter has a value this endpoint or model does not accept.", "param": "input.duration", "doc_url": "https://docs.halationlab.ai/errors/parameter-invalid/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `GET /v1/models`: List models - `POST /v1/quotes`: Get a quote - `POST /v1/generations`: Start a generation - `POST /v1/projects`: Create a project - `PATCH /v1/projects/{id}`: Update a project - `POST /v1/assets`: Import a file - `POST /v1/assets/{id}/transform`: Transform an asset - `POST /v1/uploads`: Start an upload - `POST /v1/uploads/{id}/complete`: Complete an upload - `POST /v1/webhook_endpoints`: Create a webhook endpoint - `GET /v1/events`: List events See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/parameter-invalid/ --- # parameter_unknown > Unknown parameter: The request contains a parameter this endpoint or model does not have. **Unknown parameter.** The request contains a parameter this endpoint or model does not have. | | | | --- | --- | | HTTP status | 422 | | Type | `invalid_request_error` | | Code | `parameter_unknown` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Remove the parameter named in `param`, or check its spelling. ## Example ```json { "error": { "type": "invalid_request_error", "code": "parameter_unknown", "message": "The request contains a parameter this endpoint or model does not have.", "param": "input.duration", "doc_url": "https://docs.halationlab.ai/errors/parameter-unknown/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/quotes`: Get a quote - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/parameter-unknown/ --- # media_invalid > Unusable media: An input file could not be used: it is corrupt, the wrong kind, or outside this model's limits. **Unusable media.** An input file could not be used: it is corrupt, the wrong kind, or outside this model's limits. | | | | --- | --- | | HTTP status | 422 | | Type | `invalid_request_error` | | Code | `media_invalid` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Read `message`, then send a different file. ## Example ```json { "error": { "type": "invalid_request_error", "code": "media_invalid", "message": "An input file could not be used: it is corrupt, the wrong kind, or outside this model's limits.", "param": "input.first_frame", "doc_url": "https://docs.halationlab.ai/errors/media-invalid/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/quotes`: Get a quote - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/media-invalid/ --- # media_fetch_failed > Could not fetch media: The media URL could not be fetched. It must be a public HTTPS URL that answers within 20 seconds. **Could not fetch media.** The media URL could not be fetched. It must be a public HTTPS URL that answers within 20 seconds. | | | | --- | --- | | HTTP status | 422 | | Type | `invalid_request_error` | | Code | `media_fetch_failed` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Check the URL is public and reachable, or upload the file instead. ## Example ```json { "error": { "type": "invalid_request_error", "code": "media_fetch_failed", "message": "The media URL could not be fetched. It must be a public HTTPS URL that answers within 20 seconds.", "param": "input.first_frame", "doc_url": "https://docs.halationlab.ai/errors/media-fetch-failed/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` ## Returned by - `POST /v1/generations`: Start a generation - `POST /v1/assets`: Import a file See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/media-fetch-failed/ --- # rate_limited > Too many requests: Too many requests in a short time. **Too many requests.** Too many requests in a short time. | | | | --- | --- | | HTTP status | 429 | | Type | `rate_limit_error` | | Code | `rate_limited` | | Can retrying help? | Yes. Wait `Retry-After` seconds, then send the identical request with the same `Idempotency-Key`. | | Charged? | No. This refusal is free. | ## What to do Wait `Retry-After` seconds, then retry. Spread requests out. ## Example ```json { "error": { "type": "rate_limit_error", "code": "rate_limited", "message": "Too many requests in a short time.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/rate-limited/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "retry_after": 2 } } ``` ## Returned by - `GET /v1/models`: List models - `GET /v1/models/{model}`: Get a model - `GET /v1/voices`: List voices - `POST /v1/quotes`: Get a quote - `POST /v1/generations`: Start a generation - `GET /v1/generations`: List generations - `GET /v1/generations/{id}`: Get a generation - `POST /v1/generations/{id}/cancel`: Cancel a generation - `GET /v1/projects`: List projects - `POST /v1/projects`: Create a project - `GET /v1/projects/{id}`: Get a project - `PATCH /v1/projects/{id}`: Update a project - `POST /v1/projects/{id}/archive`: Archive a project - `GET /v1/assets`: List assets - `POST /v1/assets`: Import a file - `GET /v1/assets/{id}`: Get an asset - `DELETE /v1/assets/{id}`: Delete an asset - `POST /v1/assets/{id}/transform`: Transform an asset - `POST /v1/uploads`: Start an upload - `GET /v1/uploads/{id}`: Get an upload - `POST /v1/uploads/{id}/complete`: Complete an upload - `GET /v1/account`: Get the account - `GET /v1/webhook_endpoints`: List webhook endpoints - `POST /v1/webhook_endpoints`: Create a webhook endpoint - `DELETE /v1/webhook_endpoints/{id}`: Delete a webhook endpoint - `GET /v1/events`: List events See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/rate-limited/ --- # internal_error > Internal error: Something went wrong on our side. **Internal error.** Something went wrong on our side. | | | | --- | --- | | HTTP status | 500 | | Type | `api_error` | | Code | `internal_error` | | Can retrying help? | Yes. Wait `Retry-After` seconds, then send the identical request with the same `Idempotency-Key`. | | Charged? | No. This refusal is free. | ## What to do Retry with the same `Idempotency-Key`. If it keeps happening, contact support with the `request_id`. ## Example ```json { "error": { "type": "api_error", "code": "internal_error", "message": "Something went wrong on our side.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/internal-error/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "retry_after": 2 } } ``` ## Returned by - `GET /v1/voices`: List voices - `POST /v1/quotes`: Get a quote - `POST /v1/generations`: Start a generation - `GET /v1/generations`: List generations - `GET /v1/generations/{id}`: Get a generation - `POST /v1/generations/{id}/cancel`: Cancel a generation - `GET /v1/projects`: List projects - `POST /v1/projects`: Create a project - `GET /v1/projects/{id}`: Get a project - `PATCH /v1/projects/{id}`: Update a project - `POST /v1/projects/{id}/archive`: Archive a project - `GET /v1/assets`: List assets - `POST /v1/assets`: Import a file - `GET /v1/assets/{id}`: Get an asset - `DELETE /v1/assets/{id}`: Delete an asset - `POST /v1/assets/{id}/transform`: Transform an asset - `POST /v1/uploads`: Start an upload - `GET /v1/uploads/{id}`: Get an upload - `POST /v1/uploads/{id}/complete`: Complete an upload - `GET /v1/account`: Get the account - `GET /v1/webhook_endpoints`: List webhook endpoints - `POST /v1/webhook_endpoints`: Create a webhook endpoint - `DELETE /v1/webhook_endpoints/{id}`: Delete a webhook endpoint - `GET /v1/events`: List events See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/internal-error/ --- # model_unavailable > Model unavailable: This model is not available right now. **Model unavailable.** This model is not available right now. | | | | --- | --- | | HTTP status | 503 | | Type | `api_error` | | Code | `model_unavailable` | | Can retrying help? | Yes. Wait `Retry-After` seconds, then send the identical request with the same `Idempotency-Key`. | | Charged? | No. This refusal is free. | ## What to do Try again later or choose another model. Nothing was charged. ## Example ```json { "error": { "type": "api_error", "code": "model_unavailable", "message": "This model is not available right now.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/model-unavailable/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "retry_after": 2 } } ``` ## Returned by - `POST /v1/quotes`: Get a quote - `POST /v1/generations`: Start a generation See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/model-unavailable/ --- # model_unavailable_in_region > Model unavailable in your region: This model cannot be used from your location. **Model unavailable in your region.** This model cannot be used from your location. | | | | --- | --- | | HTTP status | 503 | | Type | `api_error` | | Code | `model_unavailable_in_region` | | Can retrying help? | No. The same request gets the same answer until you change it or fix the cause. | | Charged? | No. This refusal is free. | ## What to do Choose another model. ## Example ```json { "error": { "type": "api_error", "code": "model_unavailable_in_region", "message": "This model cannot be used from your location.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/model-unavailable-in-region/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T" } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/model-unavailable-in-region/ --- # service_unavailable > Service unavailable: This service is temporarily unavailable. **Service unavailable.** This service is temporarily unavailable. | | | | --- | --- | | HTTP status | 503 | | Type | `api_error` | | Code | `service_unavailable` | | Can retrying help? | Yes. Wait `Retry-After` seconds, then send the identical request with the same `Idempotency-Key`. | | Charged? | No. This refusal is free. | ## What to do Retry after `Retry-After` seconds. ## Example ```json { "error": { "type": "api_error", "code": "service_unavailable", "message": "This service is temporarily unavailable.", "param": null, "doc_url": "https://docs.halationlab.ai/errors/service-unavailable/", "request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T", "retry_after": 2 } } ``` See [Errors](https://docs.halationlab.ai/guides/errors.md) for the error shape and how to handle errors in general, and [Billing outcomes](https://docs.halationlab.ai/billing-outcomes.md) for what every outcome costs. Source: https://docs.halationlab.ai/errors/service-unavailable/ --- # Changelog > Changes to the HalationLab.ai API, newest first. ## 2026-11-28: v1 rebuilt The public API is rebuilt as `v1` and documented here for the first time. The earlier launch API was never documented publicly, so there is no migration guide. - API keys from **Account → Developers** for your own account; OAuth for apps that act for other people. - One call to generate: `POST /v1/generations` quotes, checks `max_cost` and the spending limit, reserves the maximum and starts the work. `Prefer: wait=60` waits for the result. - Media inputs take an asset ID, a generation ID, a public HTTPS URL or a small data URI. - Binding quotes with `POST /v1/quotes`; all amounts in tokens. - Webhooks signed with Standard Webhooks, and the `GET /v1/events` recovery feed. - Stable error codes, each with its own page. - The MCP server at `https://api.halationlab.ai/mcp`. - `HalationLab-Version: 2026-11-28`. Source: https://docs.halationlab.ai/changelog/ --- # Support > How to get help with the HalationLab.ai API, and what to include. ## Before you contact us - Look up the error's `code` on its page: the `doc_url` in every error links to it. The [error codes](https://docs.halationlab.ai/errors.md) page lists them all. - For a spending or consent refusal, open the `manage_url` from the error. Only the account owner can change limits and consent. - Check what your credential can do with `GET /v1/account`. ## Contact Contact support from the HalationLab.ai app, or email [support@halationlab.ai](mailto:support@halationlab.ai). Include: - the `request_id` of the failing request (the `Request-Id` header, also in every error body); - the generation, asset or upload ID, if there is one; - the time of the request (UTC) and what you expected. Never send an API key, an access token, a client secret or a webhook secret. If one has been exposed, revoke it in the app straight away: API keys in **Account → Developers**, apps in **Account → Connected apps**. Source: https://docs.halationlab.ai/support/