Generate
Generate creates new visuals from a text prompt. There are three content types, each with its own endpoint and optimized prompt handling.
Content types
Section titled “Content types”Photos, illustrations, artistic renders, concept art, and backgrounds.
depicta image "A sunset over Greek mountains, warm golden light, oil painting style"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"}'response = httpx.post( "https://api.depicta.ai/v1/generate/image", headers={"Authorization": "Bearer dpct_YOUR_API_KEY"}, json={"prompt": "A sunset over Greek mountains, warm golden light"},)Graphic
Section titled “Graphic”Icons, logos, clipart, and UI elements. Optimized for non-photorealistic, clean-edged output.
depicta graphic "A minimal rocket icon, white on transparent background, 256x256"API endpoint: POST /v1/generate/graphic
Diagram
Section titled “Diagram”Flowcharts, architecture diagrams, ER diagrams, sequence diagrams, and more. Use --type to specify the diagram style.
depicta diagram "User authentication flow with OAuth and email" --type flowchartAPI endpoint: POST /v1/generate/diagram
Available diagram types: flowchart, sequence, architecture, mindmap, er, class, timeline, org-chart
Options
Section titled “Options”Model selection
Section titled “Model selection”If no model is specified, the API selects one based on the operation. To choose explicitly:
depicta image "A mountain landscape" --model flux{"prompt": "A mountain landscape", "model": "flux"}See Models for the full list with capabilities and pricing.
Aspect ratio
Section titled “Aspect ratio”depicta image "A hero banner" --size 16:9Available ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
Image size
Section titled “Image size”depicta image "A product photo" --image-size 2KAvailable sizes: 1K (default), 2K. Some models support 4K.
Reference images
Section titled “Reference images”Anchor style or composition with up to 5 reference images:
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"} ]}Connection drops and retries
Section titled “Connection drops and retries”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.
Response format
Section titled “Response format”All generate endpoints return the same structure. See API getting started for the full response schema.