Overview
Depicta Public API (1.0.0)
Section titled “Depicta Public API (1.0.0)”Depicta Public API
Depicta is an API-first generative image service. Generate images, edit them, create multi-scene stories, and run free image processing — all through a simple REST API.
Authentication
Every request (except /health, /v1/openapi.yaml, /v1/openapi.json, and /v1/pricing) requires a
Bearer token in the Authorization header. API keys start with the dpct_
prefix:
Authorization: Bearer dpct_a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5P6q7R8s9T0u1V
Obtain keys from the dashboard or via POST /v1/files/{slug}.
Image Generation Workflow
- POST one of the generation endpoints (e.g. /v1/generate/image) with a prompt, model, and optional parameters.
- The response includes a signed URL (valid for 1 hour) pointing to the generated image, the cost charged, and your remaining balance.
- Download or display the image before the URL expires.
Every generation response includes an X-Depicta-Job-Id header. If the response is lost (network error, timeout), use GET /v1/jobs to find your recent generations — the result will be there once the generation completes.
Story Workflow (Async)
Multi-scene story generation runs asynchronously:
- POST /v1/generate/story — returns HTTP 202 with a job_id and poll URL.
- GET /v1/jobs/{id} — poll until status is “completed” or “failed”. The response includes scenes_completed/scenes_total for progress.
- On completion, the result field contains signed URLs for each scene image.
Credits
- Image generation costs EUR credits. The exact cost depends on the model and is returned in every generation response.
- Image processing (crop, resize, convert, optimize, remove-background) is free — no credits deducted.
- Credits expire 12 months after your last paid top-up. Free trial and admin-granted credits do not reset the expiry clock.
- Check your balance via the dashboard or the account profile endpoint.
Error Handling
All errors return a JSON object with this shape:
{
"error": "validation_error",
"message": "The request contains invalid or missing fields.",
"details": {"prompt": "required"},
"request_id": "req_a1b2c3d4e5f60708"
}
Error Code Catalog
| Code | HTTP | Description |
|---|---|---|
| auth_missing_api_key | 401 | No API key provided |
| auth_invalid_api_key | 401 | API key is invalid or revoked |
| auth_revoked_api_key | 401 | API key has been revoked |
| auth_account_suspended | 403 | Account suspended |
| auth_email_not_verified | 403 | Email verification required |
| rate_limit_exceeded | 429 | Too many concurrent requests |
| credit_insufficient_balance | 402 | Not enough credits |
| credit_expired | 402 | Credits have expired |
| model_not_available | 400 | Requested model is not available |
| model_restricted | 402 | Model requires higher credit balance |
| model_not_capable | 422 | Model does not support this operation |
| content_rejected | 451 | Content violates usage policy |
| model_content_rejected | 451 | Model’s content policy prevented generation |
| classifier_unavailable | 503 | Content moderation service temporarily down |
| validation_error | 422 | Invalid or missing fields (see details) |
| not_found | 404 | Resource not found |
| internal_error | 500 | Unexpected server error |
| upstream_error | 502 | Upstream model rejected request (not retryable) |
| service_unavailable | 503 | Service temporarily unavailable |
Rate Limits
- Maximum 10 concurrent generation requests per user.
- Exceeding the limit returns HTTP 429 with a Retry-After header.
- Processing endpoints share the same concurrency pool.
- Depicta Support: https://depicta.ai - support@depicta.ai
- OpenAPI version: 3.1.0
Authentication
Section titled “ Authentication ”ApiKeyAuth
Section titled “ApiKeyAuth ”API key with dpct_ prefix. Pass as: Authorization: Bearer dpct_…
Security scheme type: http