Skip to main content
Run an image model and save its output. The same job lifecycle applies to video and audio models; each model defines its own inputs.

Create a key and fund your wallet

  1. Create a key in the developer console.
  2. Add funds to your API wallet.
  3. Set the credential in a terminal dedicated to v3. If your current shell runs a legacy integration using HEDRA_API_KEY, open a separate terminal first:
The v3 API uses a prepaid USD wallet, separate from Studio credits. An unfunded wallet cannot pay for a generation. See Authentication and Pricing and billing.

Check the cost

This example uses gpt-image-2. You can estimate the charge before submitting; an estimate does not create a job.

Submit, wait, and download

Choose a language. Each example prints a job ID, waits for a terminal state, and downloads the first completed output to output.png in your current directory. Running it submits a billable job and replaces that local file if it exists. A local timeout stops waiting; it does not cancel the job.
Install the Python SDK and HTTP client:
Save as quickstart.py and run python quickstart.py:
Expected result: a printed job_... ID, followed by Saved output.png. If a job fails or times out, use that ID to inspect it before submitting again. See Errors and retries.

Next steps

Choose a model

Compare modalities and inspect model-specific schemas.

Send media inputs

Upload files and reuse generated assets.

Receive webhooks

Handle completion without polling.

Call language models

Use the OpenAI or Anthropic SDK with supported v3 routes.

Use Hedra from an AI client

To use Hedra from Claude, Cursor, Codex or ChatGPT, add the Hedra MCP server, https://mcp.hedra.com, to the client instead of calling the API. The client signs you in with your Hedra account, and you need no API key:

Add to Claude

Opens Claude’s connector dialog with Hedra filled in.

Add to Cursor

Installs the Hedra MCP server in Cursor.

Codex, ChatGPT, Claude Code

Setup steps for every client.