Skip to main content
Generate images, video, and audio with over 100 models through one API. Fund your wallet, then every image, video, and audio model runs through the same three requests: submit a job, poll it, download the output. Browse the model catalog to pick one. The API also serves open-weight LLMs through POST /v3/chat/completions, in OpenAI’s chat completions format, and bills each request to the same wallet. Chat completions shows how to call them with the stock OpenAI SDK.

Step 1: Create an API key

Generate a key in the developer console, and put it in the HEDRA_KEY environment variable, which the examples below use:
Send the key in this header with every request:

Step 2: Fund the API wallet

The API bills a prepaid wallet held in US dollars. (This USD balance is separate from your Hedra Studio credit balance.) Add funds in the developer console, and read the wallet any time with GET /balance. Until you add funds, POST /models/{id} will return 402 INSUFFICIENT_BALANCE.

Step 3: Pick a model

GET /models lists every model with its id and display name, so a model you know by name (“GPT Image 2”) gives you the id for its submit path (POST /models/gpt-image-2). Each model publishes its typed input schema at GET /models/{id}/openapi.json.
Optionally, to see a job’s price before you submit it, ask for an estimate:

Step 4: Submit, poll, download

Every generation follows the same lifecycle: submit a job, poll it, then read the output URL.
While the job runs, the status response carries progress and estimated_completion_at, so you can tell your users how long it will take. See Job progress.

Next steps

Model catalog

Every model, with its id, name, and purpose.

Chain generations

Pass a completed job’s output as input to the next job.

Quality levels

How each quality level changes price and latency across models.

Chat completions

Call open-weight LLMs with the OpenAI or Anthropic SDK.

Enterprise

For volume pricing and custom limits, talk to us.

Legacy API

Integrations built on the legacy /web-app/public API keep working. Their guide is the legacy API quickstart.