Skip to content

Generate

Generate creates new visuals from a text prompt. There are three content types, each with its own endpoint and optimized prompt handling.

Photos, illustrations, artistic renders, concept art, and backgrounds.

Terminal window
depicta image "A sunset over Greek mountains, warm golden light, oil painting style"
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 sunset over Greek mountains, warm golden light"}'

Icons, logos, clipart, and UI elements. Optimized for non-photorealistic, clean-edged output.

Terminal window
depicta graphic "A minimal rocket icon, white on transparent background, 256x256"

API endpoint: POST /v1/generate/graphic

Flowcharts, architecture diagrams, ER diagrams, sequence diagrams, and more. Use --type to specify the diagram style.

Terminal window
depicta diagram "User authentication flow with OAuth and email" --type flowchart

API endpoint: POST /v1/generate/diagram

Available diagram types: flowchart, sequence, architecture, mindmap, er, class, timeline, org-chart

If no model is specified, the API selects one based on the operation. To choose explicitly:

Terminal window
depicta image "A mountain landscape" --model flux
{"prompt": "A mountain landscape", "model": "flux"}

See Models for the full list with capabilities and pricing.

Terminal window
depicta image "A hero banner" --size 16:9

Available ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

Terminal window
depicta image "A product photo" --image-size 2K

Available sizes: 1K (default), 2K. Some models support 4K.

Anchor style or composition with up to 5 reference images:

Terminal window
depicta image "A product photo in this style" --reference brand-guide.png:"Brand color palette and style"
{
"prompt": "A product photo in this style",
"reference_images": [
{"url": "https://example.com/brand-guide.png", "description": "Brand color palette and style"}
]
}

Once a generation request is accepted, it cannot be cancelled. Even if your connection drops, the image will be generated and available for download for one hour. The CLIs handle this automatically — if the connection is lost, they retry using the job ID.

If you’re using the API directly, the job ID is returned in the x-depicta-job-id response header. Use GET /v1/jobs/{id} to retrieve the result after a disconnection.

Failed generations are not charged.

All generate endpoints return the same structure. See API getting started for the full response schema.