Skip to content

Overview

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

  1. POST one of the generation endpoints (e.g. /v1/generate/image) with a prompt, model, and optional parameters.
  2. The response includes a signed URL (valid for 1 hour) pointing to the generated image, the cost charged, and your remaining balance.
  3. 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:

  1. POST /v1/generate/story — returns HTTP 202 with a job_id and poll URL.
  2. GET /v1/jobs/{id} — poll until status is “completed” or “failed”. The response includes scenes_completed/scenes_total for progress.
  3. 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

CodeHTTPDescription
auth_missing_api_key401No API key provided
auth_invalid_api_key401API key is invalid or revoked
auth_revoked_api_key401API key has been revoked
auth_account_suspended403Account suspended
auth_email_not_verified403Email verification required
rate_limit_exceeded429Too many concurrent requests
credit_insufficient_balance402Not enough credits
credit_expired402Credits have expired
model_not_available400Requested model is not available
model_restricted402Model requires higher credit balance
model_not_capable422Model does not support this operation
content_rejected451Content violates usage policy
model_content_rejected451Model’s content policy prevented generation
classifier_unavailable503Content moderation service temporarily down
validation_error422Invalid or missing fields (see details)
not_found404Resource not found
internal_error500Unexpected server error
upstream_error502Upstream model rejected request (not retryable)
service_unavailable503Service 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.

API key with dpct_ prefix. Pass as: Authorization: Bearer dpct_…

Security scheme type: http