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/generateRenders a single image from a prompt. Counts one generation against your plan's monthly allowance; the tiers available depend on your plan.
Request body
| Field | Type | Description |
|---|---|---|
| prompt | string, required | What to render. Plain language; up to 2,000 characters. |
| preset | string | A style preset slug (see presets below). Locks palette, lighting, and rendering style. |
| model | string | sketch (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/modelsThe 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/presetsAll shared style presets. Private presets (Agency plans) appear only when the request is authenticated with a key on that plan.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | Missing or malformed field; the response names it. |
| 401 | unauthorized | No API key, or the key is unknown or revoked. |
| 403 | tier_not_in_plan | The requested model tier is above your plan. |
| 429 | allowance_exhausted | Monthly generation allowance used up; upgrade or wait for the cycle reset. |
| 502 | generation_failed | The 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.