Skip to content

API

Depicta’s REST API lets you generate, edit, and process images programmatically. All endpoints are at https://api.depicta.ai.

The API is designed to be consumed primarily by LLMs and AI agents — through skill files, the Depicta CLI, or direct HTTP calls from your code. The endpoints, response formats, and error messages are optimized for programmatic use by AI assistants.

  1. Sign up at depicta.ai/dashboard.
  2. Go to API Keys in the dashboard sidebar.
  3. Click Create key, give it a name, and copy the key. It starts with dpct_.
Terminal window
curl -X POST https://api.depicta.ai/v1/generate/image \
-H "Authorization: Bearer dpct_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A cozy coffee shop interior, warm lighting, watercolor style",
"aspect_ratio": "16:9"
}'
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
"ai_generated": true,
"formats": {
"png": {
"url": "https://images.depicta.ai/...",
"format": "png",
"size_bytes": 307200,
"hash": "e3b0c442...",
"expires_at": "2026-04-06T16:00:00Z"
},
"jpeg": { "url": "https://images.depicta.ai/...", "format": "jpeg" },
"webp": { "url": "https://images.depicta.ai/...", "format": "webp" }
},
"cost_eur": "0.045000",
"balance_eur": "9.955000",
"image_hash": "e3b0c44298fc1c149afbf4c8996fb924..."
}

Key fields:

  • formats — signed URLs for PNG, JPEG, and WebP. Each expires in 1 hour.
  • cost_eur — actual cost charged.
  • balance_eur — remaining balance after this generation.
  • image_hash — SHA-256 of the generated image for provenance verification.

Every request needs an Authorization: Bearer dpct_... header. Without it, you get HTTP 401.