Driftflight API

Generate production-quality images from text prompts. Base URL:

https://api.driftflight.com

All endpoints return JSON. Generated images are returned as hosted URLs that remain available for 90 days; download them into your own storage for anything long-lived.

Authentication

Requests are authenticated with an API key sent as a Bearer token. Create an account, subscribe to a plan on the pricing page, and issue keys from the dashboard. Keys look like df_live_... (production) or df_test_... (sandbox: watermarked output, no quota use).

curl https://api.driftflight.com/v1/models \
 -H "Authorization: Bearer df_live_4kq2..."

Keep keys server-side. Rotate any key from the dashboard; old keys are revoked immediately.

Generate an imagerequires key

POST /v1/images/generate

Renders a single image from a prompt. Counts one generation against your plan's monthly allowance; the tiers available depend on your plan.

Request body

FieldTypeDescription
promptstring, requiredWhat to render. Plain language; up to 2,000 characters.
presetstringA style preset slug (see presets below). Locks palette, lighting, and rendering style.
modelstringsketch (default), studio, or gallery. Higher tiers require the matching plan.

Example

curl -X POST https://api.driftflight.com/v1/images/generate \
 -H "Authorization: Bearer df_live_4kq2..." \
 -H "Content-Type: application/json" \
 -d '{"prompt": "a lighthouse at dusk, long exposure", "preset": "editorial", "model": "studio"}'

Response

{
  "imageUrl": "https://api.driftflight.com/r/8f31...",
  "model": "studio",
  "preset": "editorial",
  "licence": "commercial",
  "credits": "C2PA content credentials embedded"
}

List models

GET /v1/models

The quality tiers and their characteristics. No authentication required.

{
  "models": [
    { "slug": "sketch",  "maxResolution": "1024px", "typicalLatency": "~2s" },
    { "slug": "studio",  "maxResolution": "2048px", "typicalLatency": "~5s" },
    { "slug": "gallery", "maxResolution": "4096px", "typicalLatency": "~9s" }
  ]
}

List presets

GET /v1/presets

All shared style presets. Private presets (Agency plans) appear only when the request is authenticated with a key on that plan.

Errors

StatusCodeMeaning
400invalid_requestMissing or malformed field; the response names it.
401unauthorizedNo API key, or the key is unknown or revoked.
403tier_not_in_planThe requested model tier is above your plan.
429allowance_exhaustedMonthly generation allowance used up; upgrade or wait for the cycle reset.
502generation_failedThe render did not complete; you are not charged a generation.

Rate limits

Hobby: 2 concurrent renders. Studio: 6. Agency: 20 with the priority lane. Bursts beyond the limit queue rather than fail; the x-df-queue-depth response header reports the current queue.