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 as flux, dall-e-3, gpt-image-1.5
  • prompt (string, required) — Text description of the desired image
  • size (string, optional) — "1024x1024" or aspect ratio like "16:9"
  • image_url (string, optional) — Input/reference image URL or base64 for editing
  • negative_prompt (string, optional) — What to avoid in the generated image
  • seed (integer, optional) — Random seed for reproducible generation
  • quality (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) — If false, returns a job ID for async polling
  • response_format (string, optional) — "url" or "b64_json"
  • aspect_ratio (string, optional) — Alternative to size for 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
Docs Assistant
I’m here to help with NavyAI docs. Ask about endpoints, auth, models, request bodies, or integration details.