Hedra Developer Platform
V3 API Quickstart
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 theHEDRA_KEY environment variable, which the examples below
use:
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 withGET /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.
Step 4: Submit, poll, download
Every generation follows the same lifecycle: submit a job, poll it, then read the output URL.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.