Images are a creation primitive in Naive API v2. Two tools cover what an agent typically needs: AI image generation for original visuals (FLUX, Stable Diffusion, Recraft), and stock photo search for free, license-clean photography. Both are identity-aware and billing-integrated.
CLI First
| Tool | Type | Description | Cost |
|---|
generate_images | Core | Generate images from a text prompt (async) | Dynamic (model-dependent) |
stock_search | Core | Search free stock photos | Free |
image_models | Core | List all available image generation models with parameters | Free |
image_status | Core | Check status of an image generation job | Free |
Generating Images
The generate_images tool submits an async image generation job. The input object supports any model-specific parameters.
Response (202):
Parameters (Common)
| Param | Type | Required | Default | Description |
|---|
prompt | string | Yes | — | Text description of the image |
image_size | string | No | square_hd | square_hd, landscape_4_3, landscape_16_9, portrait_4_3, portrait_16_9 |
num_images | number | No | 1 | Number of images (1-4) |
seed | number | No | Random | Reproducibility seed |
guidance_scale | number | No | 3.5 | CFG guidance (FLUX Schnell/Dev only) |
num_inference_steps | number | No | 4 | Quality steps (FLUX Schnell: 1-12) |
output_format | string | No | jpeg | "jpeg" or "png" |
FLUX Pro v1.1 does NOT support guidance_scale or num_inference_steps. Use FLUX Schnell or Dev if you need these.
Checking Status
Poll until the job completes:
Response (completed):
Cost
Image generation pricing is dynamic — based on the model’s per-unit cost, converted to credits at $0.05/credit. Preview costs before submitting:
Available Models
Use GET /v1/images/models to see the full dynamically-fetched list. Common models:
| Model | Mode | Best For |
|---|
fal-ai/flux/schnell | text-to-image | Fast generation (~5s), good default |
fal-ai/flux-pro/v1.1 | text-to-image | Highest quality (~15s) |
fal-ai/flux/dev | text-to-image | Experimental, supports guidance |
fal-ai/flux-realism | text-to-image | Photorealistic results |
fal-ai/recraft-v3 | text-to-image | Design-focused (logos, illustrations) |
fal-ai/stable-diffusion-v35-large | text-to-image | Classic SD with negative prompts |
Stock Photo Search
Search free stock photos — no credits charged, no generation wait.
Response:
Parameters
| Param | Type | Required | Default | Description |
|---|
query | string | Yes | — | Search keywords |
count | number | No | 10 | Results count (1-80) |
orientation | string | No | — | landscape, portrait, or square |
color | string | No | — | Filter by dominant color |
size | string | No | — | Minimum size: large, medium, small |
Prompt Tips
Marketing Assets
Social Media
Logos & Icons
For logos, always specify “no text” and “white background”. Text in AI-generated images is often garbled. Add text separately.
Error Handling
| Error | Cause | Recovery |
|---|
insufficient_credits | Not enough credits for generation | Preview cost with /v1/images/pricing, then top up |
provider_error | AI model provider rejected the request | Check model parameters against /v1/images/models |
invalid_model | Model ID not recognized | Use GET /v1/images/models for valid IDs |
When to Use Each
| Need | Tool | Why |
|---|
| Custom branded visuals | generate_images | Unique content matching your brand |
| Logo or icon concepts | generate_images | No stock option for custom marks |
| Generic backgrounds | stock_search | Fast, free, high quality |
| Social media photos | stock_search | Professional, free, immediate |
Typical Workflow