Documentation
Image Generation
POST /v1/images/generations handles image generation and, for some models, video generation.
Code examples
1curl -X POST https://api.navy/v1/images/generations \
2 -H "Authorization: Bearer sk-navy-YOUR_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "flux",
6 "prompt": "A naval command room at dusk, cinematic lighting",
7 "size": "1024x1024"
8 }'Parameters
model(string, required) — Image model ID such asflux,dall-e-3,gpt-image-1.5prompt(string, required) — Text description of the desired imagesize(string, optional) —"1024x1024"or aspect ratio like"16:9"image_url(string, optional) — Input/reference image URL or base64 for editingnegative_prompt(string, optional) — What to avoid in the generated imageseed(integer, optional) — Random seed for reproducible generationquality(string, optional) —"low"or"medium"style(string, optional) — DALL·E 3:"vivid"or"natural"seconds(number, optional) — Video duration (0–10 seconds)sync(boolean, optional) — Iffalse, returns a job ID for async pollingresponse_format(string, optional) —"url"or"b64_json"aspect_ratio(string, optional) — Alternative tosizefor some models
Notes
- Video-capable models often default to async job creation
- Compatible editing models can accept
image_url - The response usually returns a hosted URL or base64 payload
- For async jobs, see the Job Polling section