Eden Gen

API reference

Base URL https://edengen.ai/v1. JSON in, JSON out. OpenAPI: /v1/openapi.json.

Authentication

Send Authorization: Bearer tk_…. A key acts as its creator inside one workspace. GET /v1/models and GET /v1/tools work without a key.

Endpoints

MethodPathWhat it does
GET/v1/modelsList models with pricing
GET/v1/models/{id}One model
POST/v1/estimatePrice a run without spending
GET/v1/aliasesList workspace model aliases
POST/v1/aliasesCreate or change a model alias (owners)
DELETE/v1/aliases/{name}Delete a model alias (owners)
POST/v1/takes/{id}/finishRender the final of an approved draft
GET/v1/budgetsMonthly budgets per tag, with this month's spend
POST/v1/budgetsSet a monthly budget for a tag (owners)
DELETE/v1/budgetsRemove a tag budget (owners)
GET/v1/exportsDelivery targets: buckets and OTLP endpoints
POST/v1/exportsAdd a bucket or OTLP target (owners)
PATCH/v1/exports/{id}Pause or resume a target
DELETE/v1/exports/{id}Remove a target
POST/v1/exports/{id}/testSend your latest take to a target now
POST/v1/images/generationsOpenAI-compatible: generate images and wait for them
POST/v1/videosOpenAI-compatible: start a video
GET/v1/videosOpenAI-compatible: list videos
GET/v1/videos/{id}OpenAI-compatible: video status
DELETE/v1/videos/{id}OpenAI-compatible: delete a video
GET/v1/videos/{id}/contentOpenAI-compatible: download the MP4
POST/v1/videos/{id}/remixOpenAI-compatible: remix with a new prompt
POST/v1/takesCreate takes
GET/v1/takesList takes, newest first
GET/v1/takes/{id}Get a take
GET/v1/takes/{id}/contentDownload the file
POST/v1/assetsUpload a reference: multipart field file, raw body with X-Filename, or JSON {url} / {take_id}
GET/v1/assetsRecent assets
GET/v1/assets/{id}One asset with a fresh signed url
POST/v1/uploadsOne-time signed PUT URL for a large file (30 min, no API key needed to PUT)
GET/v1/elementsSaved characters, products, locations, styles
POST/v1/elementsSave reference images as an element
GET/v1/elements/{id}One element
GET/v1/projectsProjects with cap, spent and remaining
POST/v1/projectsCreate a project
GET/v1/accountBalance, key limits, live providers
GET/v1/usageSpend for re-billing

Creating takes

FieldTypeNotes
modelstringRequired. From GET /v1/models.
promptstringRequired, 5 to 4000 characters.
resolutionstringDefaults to the model's default.
durationintegerSeconds, video only, one of the model's durations.
aspect_ratiostringVideo 16:9, 9:16, 21:9, 1:1. Image 16:9, 21:9, 2:3, 1:1, 4:5.
count1, 2 or 4Returns a list when above 1.
project_iduuidDefaults to the key's project, then the newest project.
webhook_urlhttps URLGets take.completed or take.failed. See Webhooks.
metadataobjectUp to 4 KB, echoed back on the take.

Headers

HeaderEffect
Idempotency-KeyRepeat the request with the same key and you get the same takes, charged once. Use it for every retry.
Prefer: wait=60Holds the response until the takes finish, up to 60 s. Without it you get the take queued and poll.

The take object

json
{
  "id": "lgmog4x1",
  "object": "take",
  "status": "succeeded",          // queued | processing | succeeded | failed
  "model": "nano-banana-2.1",
  "version": "2.1 (pinned)",
  "cost_usd": 0.053,
  "refunded": false,
  "error": null,
  "output": {
    "url": "https://edengen.ai/v1/takes/lgmog4x1/content",
    "mime_type": "image/png",
    "filename": "lgmog4x1_nano-banana-2.1_1K.png"
  },
  "simulated": false,
  "source": "api",                 // app | api | mcp
  "metadata": { "shot": "12A" },
  "created_at": "2026-10-18T09:54:11.882Z",
  "completed_at": "2026-10-18T09:54:20.804Z",
  "timings": { "total_s": 8.9 }
}

Model aliases

Give a model and its settings a name your pipelines hardcode, then send that name as model. Change the alias and every key, agent and pipeline follows without a deploy. Settings sent with a request win over the alias. Owners manage aliases in Settings or here.

bash
curl -X POST https://edengen.ai/v1/aliases -H "Authorization: Bearer $TAKES_API_KEY" -H "Content-Type: application/json" \
  -d '{"name": "hero-video", "model": "seedance-2.5", "resolution": "1080p", "duration": 10, "aspect_ratio": "21:9"}'

curl -X POST https://edengen.ai/v1/takes -H "Authorization: Bearer $TAKES_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "hero-video", "prompt": "Slow push in on a lighthouse in a storm, no music"}'

Budgets by tag

Cap spend per client, campaign or environment. Tag takes with tags or the X-Takes-Tags header, then set a monthly budget for a tag. A take whose tags match is refused with 429 tag_budget before anything is charged when it would pass the budget. Budgets reset on the first of the month (UTC) and count net of refunds.

bash
curl -X POST https://edengen.ai/v1/budgets -H "Authorization: Bearer $TAKES_API_KEY" -H "Content-Type: application/json" \
  -d '{"key": "client", "value": "acme", "cap_usd": 500}'

Delivery and observability

Add an S3-compatible bucket (AWS S3, Cloudflare R2, Backblaze, Google Cloud Storage interoperability) and every finished take is copied there as prefix/project/take-id_model_resolution.ext with a JSON sidecar of the prompt, model, cost and tags. Add an OTLP/HTTP endpoint and each take arrives as one span with its model, provider, cost, project and tags, refunds included. Deliveries retry with backoff; Settings shows the count and the last error. Secrets are encrypted and never returned.

bash
curl -X POST https://edengen.ai/v1/exports -H "Authorization: Bearer $TAKES_API_KEY" -H "Content-Type: application/json" \
  -d '{"kind": "s3", "name": "R2 renders", "endpoint": "https://<account>.r2.cloudflarestorage.com", "bucket": "renders",
       "access_key_id": "...", "secret_access_key": "..."}'

Draft, then finish

Render low-cost drafts, approve one, then POST /v1/takes/{id}/finish. The final keeps the prompt and framing, moves to the stronger sibling (Seedance 2.0 Mini to Seedance 2.0, Veo 3.1 Fast to Veo 3.1, Nano Banana 2.1 to Pro) at 1080p or 2K, and passes the draft as a reference so the composition holds. Name model or resolution in the body to choose yourself. A repeated call returns the same final and charges once. Agents use the takes_finish tool, which asks above your threshold.

Errors

json
{ "error": { "type": "budget_error", "code": "over_cap", "message": "Spot would go over its $3 cap ($1.19 spent)..." } }
StatuscodeMeaning
400invalid_request_error codesBad model, resolution, duration, format or body.
401missing_api_key, invalid_api_keyNo key, wrong key, or revoked.
402insufficient_balanceThe run costs more than the balance. Nothing charged.
403forbiddenProducers cannot change caps, top up or create keys.
404take_not_found, project_not_found, model_not_foundNot in this workspace.
409over_cap, not_readyWould pass the project cap, or the file is not ready.
422idempotency_mismatchThe Idempotency-Key was already used with a different body.
429rate_limited, key_cap, tag_budgetOver the key's requests per minute (see Retry-After), its monthly cap, or a tag budget.
503overloadedThe service is shedding load. Nothing was charged. Retry after the Retry-After seconds.

Rate limits

Each key allows 120 requests per minute by default. Every response carries X-RateLimit-Limit and X-RateLimit-Remaining. There is no starting concurrency limit on renders.

Usage for re-billing

bash
curl "https://edengen.ai/v1/usage?from=2026-10-01&to=2026-11-01&group_by=project" -H "Authorization: Bearer $TAKES_API_KEY"
API reference · Docs · Eden Gen