GenFire Public API

Full API Reference

Use GenFire as a production content engine for images, videos, speech, music, sound effects, lip-sync, product extraction, workflow automation, and webhook-driven orchestration.

Base URL

/v1

https://api.genfire.ai/v1

Auth

Bearer

API key or OAuth access token

Async Pattern

Runs

Poll GET /runs/{'{runId}'} for progress

Machine Contract

OpenAPI 3.1

Download the JSON contract

Common Conventions

  • Send Authorization: Bearer ... on every protected endpoint.
  • Send Idempotency-Key on mutating generation, workflow, batch, and product extraction endpoints that require it.
  • Most long-running operations return a run resource immediately and finish asynchronously.
  • Errors follow one JSON shape. Example:
{
  "type": "https://api.genfire.ai/errors/invalid_prompt",
  "title": "Invalid Prompt",
  "status": 400,
  "detail": "prompt is required.",
  "code": "invalid_prompt",
  "request_id": "req_123"
}

Discovery

Public Model Aliases

Always use these aliases in API requests. Do not send internal provider model ids.

image_generation

GenFire v1

image.genfire_v1

GenFire's signature image model — tuned for ad/product creative.

{
  "aspect_ratios": [
    "1:1",
    "16:9",
    "9:16",
    "4:3",
    "3:4"
  ],
  "max_count": 4
}

image_generation

Nano Banana 2

image.nano_banana_2 default

Google's general-purpose image model. Fast, broad subject coverage. Default.

{
  "aspect_ratios": [
    "1:1",
    "16:9",
    "9:16",
    "4:3",
    "3:4",
    "21:9",
    "9:21"
  ],
  "max_count": 4
}

image_generation

Nano Banana Pro

image.nano_banana_pro

Premium photoreal image generation, higher fidelity than Nano Banana 2.

{
  "aspect_ratios": [
    "1:1",
    "16:9",
    "9:16",
    "4:3",
    "3:4"
  ],
  "max_count": 4
}

image_generation

Nano Banana

image.nano_banana

Standard speed and quality. Cheaper than Pro for high-volume use.

{
  "aspect_ratios": [
    "1:1",
    "16:9",
    "9:16",
    "4:3",
    "3:4"
  ],
  "max_count": 4
}

image_generation

GPT Image 2

image.gpt_image_2

OpenAI GPT Image 2 — premium photorealistic generation.

{
  "aspect_ratios": [
    "1:1",
    "16:9",
    "9:16",
    "4:3",
    "3:4"
  ],
  "max_count": 4
}

image_generation

Seedream 4.5

image.seedream_v45

ByteDance Seedream 4.5 — strong product and ad visuals, photoreal.

{
  "aspect_ratios": [
    "1:1",
    "16:9",
    "9:16"
  ],
  "max_count": 4
}

image_generation

Seedream 5.0 Lite

image.seedream_v5_lite

ByteDance Seedream 5.0 Lite — multilingual text rendering, web-search-aware.

{
  "aspect_ratios": [
    "1:1",
    "16:9",
    "9:16"
  ],
  "max_count": 4
}

image_generation

Qwen Image 2

image.qwen_image_2

Alibaba Qwen Image 2 — strong typography, posters, 2K generation.

{
  "aspect_ratios": [
    "1:1",
    "16:9",
    "9:16",
    "4:3",
    "3:4"
  ],
  "max_count": 4
}

image_generation

Qwen Image 2 Pro

image.qwen_image_2_pro

Premium Qwen Image 2 with enhanced detail.

{
  "aspect_ratios": [
    "1:1",
    "16:9",
    "9:16",
    "4:3",
    "3:4"
  ],
  "max_count": 4
}

image_generation

Recraft V4

image.recraft_v4

Design-grade image generation with reliable text rendering.

{
  "aspect_ratios": [
    "1:1",
    "16:9",
    "9:16",
    "4:3",
    "3:4"
  ],
  "max_count": 4
}

image_generation

Recraft V4 Pro

image.recraft_v4_pro

Premium Recraft V4 — top quality for marketing/branding visuals.

{
  "aspect_ratios": [
    "1:1",
    "16:9",
    "9:16",
    "4:3",
    "3:4"
  ],
  "max_count": 4
}

image_generation

Grok Imagine

image.grok_imagine

xAI Grok Imagine — stylized, strong prompt following.

{
  "aspect_ratios": [
    "1:1",
    "16:9",
    "9:16"
  ],
  "max_count": 4
}

video_generation

Veo 3.1

video.veo_3_1 default

Google Veo 3.1 — premium text/image-to-video with native audio. Supports first-last-frame interpolation. Default.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    4,
    5,
    8
  ],
  "supports_audio": true
}

video_generation

Veo 3.1 Fast

video.veo_3_1_fast

Cheaper, faster Veo 3.1 variant. Supports first-last-frame interpolation.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    4,
    5,
    8
  ],
  "supports_audio": true
}

video_generation

Veo 3.1 Lite

video.veo_3_1_lite

Lower-cost Lite variant of Veo 3.1. Supports first-last-frame interpolation.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    4,
    5,
    8
  ],
  "supports_audio": true
}

video_generation

Veo 3.1 Extend

video.veo_3_1_extend

Extend an existing Veo-created video by up to 7 seconds. Requires source_video_url.

{
  "aspect_ratios": [
    "16:9",
    "9:16"
  ],
  "duration_seconds": [
    7
  ],
  "supports_audio": true
}

video_generation

Veo 3

video.veo_3

Veo 3 — high-quality cinematic generation with audio (predecessor to Veo 3.1).

{
  "aspect_ratios": [
    "16:9",
    "9:16"
  ],
  "duration_seconds": [
    8
  ],
  "supports_audio": true
}

video_generation

Veo 3 Fast

video.veo_3_fast

Cheaper Veo 3 variant — same quality tier, faster turnaround.

{
  "aspect_ratios": [
    "16:9",
    "9:16"
  ],
  "duration_seconds": [
    8
  ],
  "supports_audio": true
}

video_generation

Kling O3 Standard

video.kling_o3

Kling O3 standard — smooth motion, strong subject consistency.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5,
    10
  ]
}

video_generation

Kling O3 Pro

video.kling_o3_pro

Pro tier of Kling O3 — better quality at higher cost. Supports video-to-video reference (use source_video_url + reference_image_urls).

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5,
    10
  ]
}

video_generation

Kling O3 4K

video.kling_o3_4k

Kling O3 at 4K resolution. Higher cost, top-tier quality.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5,
    10
  ],
  "resolution": "4k"
}

video_generation

Kling V3 Standard

video.kling_v3

Kling V3 standard.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5,
    10
  ]
}

video_generation

Kling V3 Pro

video.kling_v3_pro

Kling V3 pro — top quality.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5,
    10
  ]
}

video_generation

Kling V3 Motion Control

video.kling_v3_motion_control

Transfer motion from a reference video onto a character image. Requires both image_url (character) and source_video_url (motion reference).

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5
  ]
}

video_generation

Kling V3 Pro Motion Control

video.kling_v3_pro_motion_control

Pro-tier Kling V3 motion-control — higher quality character animation. Requires both image_url and source_video_url.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5
  ]
}

video_generation

Kling V3 4K

video.kling_v3_4k

Kling V3 at 4K resolution.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5,
    10
  ],
  "resolution": "4k"
}

video_generation

Kling 2.6

video.kling_v26

Kling 2.6 standard — text/image to video.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5,
    10
  ]
}

video_generation

Kling 2.6 Pro

video.kling_v26_pro

Kling 2.6 pro tier — higher quality.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5,
    10
  ]
}

video_generation

Kling 2.6 Motion Control

video.kling_v26_motion_control

Motion-control variant of Kling 2.6 (legacy). Requires image_url + source_video_url.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5
  ]
}

video_generation

Kling 2.5 Turbo Pro

video.kling_v25_turbo

Faster Kling variant (legacy but reliable).

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5,
    10
  ]
}

video_generation

Kling 2.1 Master

video.kling_v21_master

Kling 2.1 Master (legacy) — enhanced quality.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5,
    10
  ]
}

video_generation

Sora 2

video.sora_2

OpenAI Sora 2 — text and image to video, 4–20s.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    4,
    8,
    12,
    16,
    20
  ]
}

video_generation

Hailuo 2.3

video.hailuo_23

MiniMax Hailuo 2.3 — dynamic video generation.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    6,
    10
  ]
}

video_generation

Hailuo 2.3 Pro

video.hailuo_23_pro

MiniMax Hailuo 2.3 Pro tier.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    6,
    10
  ]
}

video_generation

Hailuo 02

video.hailuo_02

MiniMax Hailuo 02 (legacy) — image-to-video standard tier.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    6,
    10
  ]
}

video_generation

Hailuo 02 Fast

video.hailuo_02_fast

Faster Hailuo 02 image-to-video variant.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    6,
    10
  ]
}

video_generation

Hailuo 2.3 Fast

video.hailuo_23_fast

Faster Hailuo 2.3 image-to-video standard tier.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    6,
    10
  ]
}

video_generation

Hailuo 2.3 Fast Pro

video.hailuo_23_fast_pro

Faster Hailuo 2.3 pro-tier image-to-video.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    6,
    10
  ]
}

video_generation

Luma Dream Machine

video.luma_dream_machine

Luma Dream Machine — fluid motion, distinctive style.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5,
    9
  ]
}

video_generation

WAN 2.2

video.wan_v22

WAN 2.2 — strong character animation.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5,
    8
  ]
}

video_generation

WAN 2.5 Preview

video.wan_25_preview

WAN 2.5 preview — newer than 2.2, may change without notice.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5,
    8
  ]
}

video_generation

WAN Animate (Replace)

video.wan_animate_replace

WAN animate-replace — swap subject in source video using a reference image. Requires image_url + source_video_url.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5
  ]
}

video_generation

WAN Animate (Move)

video.wan_animate_move

WAN animate-move — animate static images with natural motion from a reference video. Requires image_url + source_video_url.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    5
  ]
}

video_generation

Seedance 2.0

video.seedance_2_0

ByteDance Seedance 2.0 — text/image/reference to video. Routes via BytePlus when configured.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    4,
    5,
    8,
    10,
    12,
    15
  ],
  "resolutions": [
    "480p",
    "720p",
    "1080p"
  ]
}

video_generation

Seedance 2.0 Fast

video.seedance_2_0_fast

Faster, cheaper Seedance 2.0 variant.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    4,
    5,
    8,
    10,
    12,
    15
  ],
  "resolutions": [
    "480p",
    "720p",
    "1080p"
  ]
}

video_generation

Grok Imagine Video

video.grok_video

xAI Grok Imagine — high-fidelity text/image to video.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    4,
    5,
    8,
    10,
    15
  ]
}

video_generation

Grok Imagine Edit

video.grok_video_edit

Edit existing videos with text prompts. Requires source_video_url.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    4,
    5,
    8,
    10
  ]
}

video_generation

Grok Imagine Extend

video.grok_video_extend

Extend an existing video by 2–10s. Requires source_video_url.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    2,
    5,
    10
  ]
}

video_generation

Happy Horse

video.happy_horse

Alibaba Happy Horse — text/image/reference-to-video and video-edit.

{
  "aspect_ratios": [
    "16:9",
    "9:16",
    "1:1"
  ],
  "duration_seconds": [
    3,
    5,
    8,
    10,
    15
  ]
}

speech_generation

ElevenLabs Turbo v2.5

speech.elevenlabs_turbo_v2_5 default

Low-latency TTS, balance of quality and speed. Default.

{
  "max_characters": 40000
}

speech_generation

ElevenLabs Flash v2.5

speech.elevenlabs_flash_v2_5

Fastest ElevenLabs TTS, lowest cost.

{
  "max_characters": 40000
}

speech_generation

ElevenLabs v3

speech.elevenlabs_v3

Highest-quality expressive voice generation.

{
  "max_characters": 40000
}

speech_generation

ElevenLabs Multilingual v2

speech.elevenlabs_multilingual_v2

29 languages, high fidelity.

{
  "max_characters": 40000
}

music_generation

ElevenLabs Music v1

music.elevenlabs_music_v1 default

Prompt-based music generation up to 5 minutes.

{
  "max_duration_seconds": 300
}

music_generation

Lyria 3 Pro

music.lyria3_pro

Google Lyria 3 Pro — full structured songs up to 3 minutes with vocals, lyrics, and multi-language support. Accepts an optional image_url for inspiration and a negative_prompt. Flat per-generation fee (duration is not configurable).

{
  "max_duration_seconds": 180,
  "prompt_max_length": 5000
}

sound_effect_generation

ElevenLabs SFX

sfx.elevenlabs_v1 default

Sound effect generation up to 30s.

{
  "max_duration_seconds": 30
}

transcription

OpenAI Whisper v1

transcription.whisper_v1 default

Speech-to-text with word and segment timestamps. Accepts a direct audio/video URL or a YouTube URL. Async — returns a queued run; poll genfire_get_run for the transcript.

{
  "max_file_mb": 500,
  "max_duration_seconds": 7200
}

image_editing

BRIA Background Remove

image_edit.bria_background_remove default

Remove the background from an image. Returns a transparent PNG.

{
  "input": "image_url"
}

video_upscaling

FAL Video Upscaler

video_upscale.fal_video_upscaler default

Upscale a video by 2x or 4x. Async — returns a queued run; poll genfire_get_run for completion.

{
  "scale_factors": [
    2,
    4
  ]
}

lipsync_generation

Lipsync 2 Pro

lipsync.lipsync_2_pro default

High-quality lip-sync at 480p or 720p. Default.

{
  "resolutions": [
    "480p",
    "720p"
  ]
}

lipsync_generation

Sync Lipsync v2 Pro

lipsync.sync_lipsync_v2_pro

Alternative lip-sync engine.

{
  "resolutions": [
    "480p",
    "720p"
  ]
}

lipsync_generation

Sync Lipsync v3

lipsync.sync_lipsync_v3

Premium lip-sync engine — higher fidelity than v2 Pro.

{
  "resolutions": [
    "480p",
    "720p"
  ]
}

Outcome Layer

Workflow Catalog

Use workflows when you want a business outcome such as hook generation, a creative pack, or storyboard planning instead of a raw media primitive.

Workflow

storyboard

available

Create a creative project and generate the brief, brand kit, script, shot list, and storyboard planning outputs.

Input Schema
{
  "type": "object",
  "required": [
    "prompt"
  ],
  "properties": {
    "prompt": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "aspect_ratio": {
      "type": "string",
      "enum": [
        "16:9",
        "9:16",
        "1:1"
      ]
    }
  }
}
Output Schema
{
  "type": "object",
  "properties": {
    "project_id": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "current_stage": {
      "type": "string"
    },
    "next_action": {
      "type": "string"
    }
  }
}
Example Request Body
{
  "prompt": "30-second paid social ad for a premium running shoe",
  "title": "Spring Launch Ad",
  "aspect_ratio": "9:16"
}
Example Output
{
  "workflow": "storyboard",
  "project_id": "proj_123",
  "project_status": "needs_approval",
  "current_stage": "storyboard",
  "next_action": "approve_storyboard"
}

Workflow

hook_pack

available

Generate three monetizable UGC-style hooks plus a supporting body and CTA.

Input Schema
{
  "type": "object",
  "required": [
    "prompt"
  ],
  "properties": {
    "prompt": {
      "type": "string"
    },
    "audience": {
      "type": "string"
    },
    "tone": {
      "type": "string",
      "enum": [
        "casual",
        "professional",
        "humorous",
        "educational",
        "persuasive",
        "emotional"
      ]
    },
    "length": {
      "type": "string",
      "enum": [
        "short",
        "medium",
        "long"
      ]
    },
    "target_duration": {
      "type": "number"
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "additional_requirements": {
      "type": "string"
    }
  }
}
Output Schema
{
  "type": "object",
  "properties": {
    "hooks": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "body": {
      "type": "string"
    },
    "call_to_action": {
      "type": "string"
    },
    "full_script": {
      "type": "string"
    }
  }
}
Example Request Body
{
  "prompt": "Portable blender for busy professionals",
  "audience": "Remote workers who skip breakfast",
  "tone": "persuasive",
  "length": "short",
  "target_duration": 20,
  "keywords": [
    "protein shake",
    "commute",
    "healthy"
  ],
  "additional_requirements": "Lead with convenience and save time."
}
Example Output
{
  "workflow": "hook_pack",
  "topic": "Portable blender for busy professionals",
  "hooks": [
    "If breakfast keeps losing to your calendar, this fixes it.",
    "I stopped skipping protein the day I threw this in my bag.",
    "This is how I make a full shake before my first meeting."
  ],
  "body": "Portable, fast, and easy to clean for daily use.",
  "call_to_action": "Try it before your next busy week.",
  "full_script": "If breakfast keeps losing to your calendar...",
  "word_count": 96,
  "estimated_duration": 22
}

Workflow

ugc_ad

available

Generate an outcome-oriented UGC ad script with hooks, body, CTA, and a full spoken script.

Input Schema
{
  "type": "object",
  "required": [
    "prompt"
  ],
  "properties": {
    "prompt": {
      "type": "string"
    },
    "audience": {
      "type": "string"
    },
    "tone": {
      "type": "string",
      "enum": [
        "casual",
        "professional",
        "humorous",
        "educational",
        "persuasive",
        "emotional"
      ]
    },
    "length": {
      "type": "string",
      "enum": [
        "short",
        "medium",
        "long"
      ]
    },
    "target_duration": {
      "type": "number"
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "additional_requirements": {
      "type": "string"
    }
  }
}
Output Schema
{
  "type": "object",
  "properties": {
    "hooks": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "body": {
      "type": "string"
    },
    "call_to_action": {
      "type": "string"
    },
    "full_script": {
      "type": "string"
    }
  }
}
Example Request Body
{
  "prompt": "Blue light glasses for creators",
  "audience": "Designers and editors working late",
  "tone": "casual",
  "length": "medium"
}
Example Output
{
  "workflow": "ugc_ad",
  "topic": "Blue light glasses for creators",
  "hooks": [
    "I did not realize how cooked my eyes were by 6pm."
  ],
  "body": "Comfort-focused UGC body copy.",
  "call_to_action": "Use them on your next edit sprint.",
  "full_script": "I did not realize how cooked my eyes were..."
}

Workflow

creative_pack

available

Build a product-aware creative pack with analysis, angles, hooks, and a monetizable script.

Input Schema
{
  "type": "object",
  "properties": {
    "prompt": {
      "type": "string"
    },
    "product_url": {
      "type": "string",
      "format": "uri"
    },
    "product_name": {
      "type": "string"
    },
    "product_description": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "audience": {
      "type": "string"
    },
    "tone": {
      "type": "string",
      "enum": [
        "casual",
        "professional",
        "humorous",
        "educational",
        "persuasive",
        "emotional"
      ]
    },
    "length": {
      "type": "string",
      "enum": [
        "short",
        "medium",
        "long"
      ]
    },
    "image_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "additional_requirements": {
      "type": "string"
    }
  }
}
Output Schema
{
  "type": "object",
  "properties": {
    "product": {
      "type": "object"
    },
    "analysis": {
      "type": "object"
    },
    "hooks": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "body": {
      "type": "string"
    },
    "call_to_action": {
      "type": "string"
    },
    "full_script": {
      "type": "string"
    }
  }
}
Example Request Body
{
  "product_url": "https://example.com/products/matte-black-water-bottle"
}
Example Output
{
  "workflow": "creative_pack",
  "product": {
    "name": "Matte Black Water Bottle",
    "description": "Insulated stainless steel water bottle",
    "category": "hydration",
    "price": "$39",
    "images": [
      "https://example.com/image-1.jpg"
    ]
  },
  "analysis": {
    "marketingAngles": [
      "Premium feel",
      "Keeps drinks cold",
      "Daily carry convenience"
    ]
  },
  "hooks": [
    "This bottle still had ice after my entire workout and commute."
  ],
  "body": "Creative body copy built from product analysis.",
  "call_to_action": "Upgrade your daily carry.",
  "full_script": "This bottle still had ice..."
}

Workflow

product_ad_variants

available

Generate multiple UGC-style ad script variants for the same product or offer.

Input Schema
{
  "type": "object",
  "properties": {
    "prompt": {
      "type": "string"
    },
    "product_name": {
      "type": "string"
    },
    "product_description": {
      "type": "string"
    },
    "audience": {
      "type": "string"
    },
    "tone": {
      "type": "string",
      "enum": [
        "casual",
        "professional",
        "humorous",
        "educational",
        "persuasive",
        "emotional"
      ]
    },
    "length": {
      "type": "string",
      "enum": [
        "short",
        "medium",
        "long"
      ]
    },
    "variant_count": {
      "type": "number",
      "minimum": 1,
      "maximum": 5
    },
    "additional_requirements": {
      "type": "string"
    }
  }
}
Output Schema
{
  "type": "object",
  "properties": {
    "variant_count": {
      "type": "number"
    },
    "variants": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}
Example Request Body
{
  "product_name": "Portable espresso maker",
  "product_description": "Travel-friendly espresso maker for commuters",
  "audience": "Commuters and travelers",
  "tone": "persuasive",
  "length": "short",
  "variant_count": 3
}
Example Output
{
  "workflow": "product_ad_variants",
  "prompt": "Portable espresso maker: Travel-friendly espresso maker for commuters",
  "variant_count": 3,
  "variants": [
    {
      "index": 0,
      "strategy": "Question-led hook with direct pain point.",
      "hooks": [
        "Why are you still settling for station coffee?"
      ],
      "body": "Variant body",
      "call_to_action": "Carry café-level espresso anywhere.",
      "full_script": "Why are you still settling for station coffee?"
    }
  ]
}

Reference

Authentication

POST /oauth/token

Issue an OAuth access token

Use OAuth client credentials for machine-to-machine access. API keys are supported on the same `/v1` endpoints and are usually the simplest option.

Auth: No auth
Idempotency-Key: Not required

Body Fields

grant_type string required

Must be `client_credentials`.

client_id string required

The OAuth client id created in the developer portal.

client_secret string required

The OAuth client secret shown only when the client is created.

scope string optional

Optional space-separated scopes. Omit to receive the client’s default scopes.

curl Example

curl https://api.genfire.ai/v1/oauth/token \
  -H "Content-Type: application/json" \
  -d '{
  "grant_type": "client_credentials",
  "client_id": "gfo_oauth_123",
  "client_secret": "gfs_live_secret",
  "scope": "models:read runs:read images:write"
}'

Response Example

{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "models:read runs:read images:write"
}

Request Example Body

{
  "grant_type": "client_credentials",
  "client_id": "gfo_oauth_123",
  "client_secret": "gfs_live_secret",
  "scope": "models:read runs:read images:write"
}

Notes

  • You can also send `client_id:client_secret` with HTTP Basic auth instead of putting them in JSON.
  • The returned access token is used in the same `Authorization: Bearer ...` header as an API key.

Reference

CLI Auth

POST /cli/auth/sessions

Start a CLI auth session

Begins the browser-based PKCE handshake used by the GenFire CLI. The CLI generates a 43-128 character base64url `code_verifier`, derives `code_challenge = BASE64URL(SHA256(verifier))`, calls this endpoint, and opens `verification_url` in the user’s browser.

Auth: No auth
Idempotency-Key: Not required

Body Fields

client_id string required

Public CLI client id. Currently only `genfire-cli`.

code_challenge string required

BASE64URL(SHA256(code_verifier)). 43-128 characters.

code_challenge_method string required

Must be `S256`.

scopes array optional

Optional list of scopes the CLI is requesting. Omit for the default key scopes.

label string optional

Optional human label shown to the user on the consent page (e.g. `genfire-cli (laptop)`).

curl Example

curl https://api.genfire.ai/v1/cli/auth/sessions \
  -H "Content-Type: application/json" \
  -d '{
  "client_id": "genfire-cli",
  "code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",
  "code_challenge_method": "S256",
  "scopes": [
    "account:read",
    "credits:read",
    "models:read",
    "runs:read",
    "images:write",
    "videos:write",
    "uploads:write"
  ],
  "label": "genfire-cli (laptop)"
}'

Response Example

{
  "session_id": "clisess_8f3c4a2b1d6e7f9a0b1c2d3e",
  "verification_url": "https://genfire.ai/cli-auth?session=clisess_8f3c4a2b1d6e7f9a0b1c2d3e",
  "expires_at": "2026-05-04T17:21:25.985Z",
  "requested_scopes": [
    "account:read",
    "images:write",
    "uploads:write"
  ],
  "label": "genfire-cli (laptop)"
}

Request Example Body

{
  "client_id": "genfire-cli",
  "code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",
  "code_challenge_method": "S256",
  "scopes": [
    "account:read",
    "credits:read",
    "models:read",
    "runs:read",
    "images:write",
    "videos:write",
    "uploads:write"
  ],
  "label": "genfire-cli (laptop)"
}

Notes

  • Sessions expire after 10 minutes if not approved.
  • Poll `GET /cli/auth/sessions/{sessionId}` to discover when the user has approved (or denied) the session.
GET /cli/auth/sessions/{sessionId}

Poll the status of a CLI auth session

Returns the current status of a CLI auth session. The CLI polls this endpoint while the user completes the browser flow.

Auth: No auth
Idempotency-Key: Not required

Parameters

sessionId path required

Session id returned from `POST /cli/auth/sessions`.

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/cli/auth/sessions/{sessionId}

Response Example

{
  "session_id": "clisess_8f3c4a2b1d6e7f9a0b1c2d3e",
  "status": "approved",
  "label": "genfire-cli (laptop)",
  "requested_scopes": [
    "account:read",
    "images:write",
    "uploads:write"
  ],
  "expires_at": "2026-05-04T17:21:25.985Z"
}

Notes

  • Status transitions: `pending` → `approved` (or `denied`) → `consumed` (after exchange).
  • A `consumed` or `expired` status means the CLI must restart the login flow.
POST /cli/auth/sessions/{sessionId}/exchange

Exchange an approved CLI auth session for an API key

Once `GET /cli/auth/sessions/{sessionId}` reports `approved`, the CLI submits its original `code_verifier` here. The server verifies `SHA256(code_verifier) === code_challenge`, then returns the freshly minted API key exactly once.

Auth: No auth
Idempotency-Key: Not required

Parameters

sessionId path required

Session id returned from `POST /cli/auth/sessions`.

Body Fields

code_verifier string required

The original PKCE code_verifier the CLI generated when starting the session.

curl Example

curl https://api.genfire.ai/v1/cli/auth/sessions/{sessionId}/exchange \
  -H "Content-Type: application/json" \
  -d '{
  "code_verifier": "M25iVXpKU3puUjFaYWg3T1NDTDQtcW1ROUY5YXlwalNoc0hhakxifmZHag"
}'

Response Example

{
  "api_key": "gfa_live_abc123.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "scopes": [
    "account:read",
    "images:write",
    "uploads:write"
  ],
  "label": "genfire-cli (laptop)",
  "session_expires_at": "2026-05-04T17:21:25.985Z"
}

Request Example Body

{
  "code_verifier": "M25iVXpKU3puUjFaYWg3T1NDTDQtcW1ROUY5YXlwalNoc0hhakxifmZHag"
}

Notes

  • The `api_key` is returned exactly once. Store it securely (the CLI uses the OS keychain).
  • Sessions are single-use. Once exchanged, the same session cannot be exchanged again.
  • A 428 response means the user has not yet approved the session — keep polling.
  • A 410 response means the session expired or was already exchanged. Restart the CLI login.

Reference

Account

GET /account
account:read

Get the authenticated account

Returns the public API account linked to the calling API key or OAuth client.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/account \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "id": "acct_user_123",
  "object": "account",
  "display_name": "GenFire Developer",
  "email": "owner@example.com",
  "plan": "pro",
  "status": "active",
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:00.000Z"
}
GET /account/credits
credits:read

Get the current credit balance

Shows the credit balance for the authenticated account.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/account/credits \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "account_id": "acct_user_123",
  "balance": 250,
  "currency": "credits"
}

Reference

Discovery

GET /models
models:read

List public model aliases

Use model aliases from this endpoint instead of internal provider ids. The aliases are stable and safe to pass back into generation endpoints.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "object": "list",
  "data": [
    {
      "id": "image.genfire_v1",
      "object": "model",
      "capability": "image_generation",
      "name": "GenFire v1",
      "description": "GenFire's signature image model — tuned for ad/product creative.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "1:1",
          "16:9",
          "9:16",
          "4:3",
          "3:4"
        ],
        "max_count": 4
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "image.nano_banana_2",
      "object": "model",
      "capability": "image_generation",
      "name": "Nano Banana 2",
      "description": "Google's general-purpose image model. Fast, broad subject coverage. Default.",
      "status": "available",
      "is_default": true,
      "limits": {
        "aspect_ratios": [
          "1:1",
          "16:9",
          "9:16",
          "4:3",
          "3:4",
          "21:9",
          "9:21"
        ],
        "max_count": 4
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "image.nano_banana_pro",
      "object": "model",
      "capability": "image_generation",
      "name": "Nano Banana Pro",
      "description": "Premium photoreal image generation, higher fidelity than Nano Banana 2.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "1:1",
          "16:9",
          "9:16",
          "4:3",
          "3:4"
        ],
        "max_count": 4
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "image.nano_banana",
      "object": "model",
      "capability": "image_generation",
      "name": "Nano Banana",
      "description": "Standard speed and quality. Cheaper than Pro for high-volume use.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "1:1",
          "16:9",
          "9:16",
          "4:3",
          "3:4"
        ],
        "max_count": 4
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "image.gpt_image_2",
      "object": "model",
      "capability": "image_generation",
      "name": "GPT Image 2",
      "description": "OpenAI GPT Image 2 — premium photorealistic generation.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "1:1",
          "16:9",
          "9:16",
          "4:3",
          "3:4"
        ],
        "max_count": 4
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "image.seedream_v45",
      "object": "model",
      "capability": "image_generation",
      "name": "Seedream 4.5",
      "description": "ByteDance Seedream 4.5 — strong product and ad visuals, photoreal.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "1:1",
          "16:9",
          "9:16"
        ],
        "max_count": 4
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "image.seedream_v5_lite",
      "object": "model",
      "capability": "image_generation",
      "name": "Seedream 5.0 Lite",
      "description": "ByteDance Seedream 5.0 Lite — multilingual text rendering, web-search-aware.",
      "status": "preview",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "1:1",
          "16:9",
          "9:16"
        ],
        "max_count": 4
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "image.qwen_image_2",
      "object": "model",
      "capability": "image_generation",
      "name": "Qwen Image 2",
      "description": "Alibaba Qwen Image 2 — strong typography, posters, 2K generation.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "1:1",
          "16:9",
          "9:16",
          "4:3",
          "3:4"
        ],
        "max_count": 4
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "image.qwen_image_2_pro",
      "object": "model",
      "capability": "image_generation",
      "name": "Qwen Image 2 Pro",
      "description": "Premium Qwen Image 2 with enhanced detail.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "1:1",
          "16:9",
          "9:16",
          "4:3",
          "3:4"
        ],
        "max_count": 4
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "image.recraft_v4",
      "object": "model",
      "capability": "image_generation",
      "name": "Recraft V4",
      "description": "Design-grade image generation with reliable text rendering.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "1:1",
          "16:9",
          "9:16",
          "4:3",
          "3:4"
        ],
        "max_count": 4
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": false,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "image.recraft_v4_pro",
      "object": "model",
      "capability": "image_generation",
      "name": "Recraft V4 Pro",
      "description": "Premium Recraft V4 — top quality for marketing/branding visuals.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "1:1",
          "16:9",
          "9:16",
          "4:3",
          "3:4"
        ],
        "max_count": 4
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": false,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "image.grok_imagine",
      "object": "model",
      "capability": "image_generation",
      "name": "Grok Imagine",
      "description": "xAI Grok Imagine — stylized, strong prompt following.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "1:1",
          "16:9",
          "9:16"
        ],
        "max_count": 4
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.veo_3_1",
      "object": "model",
      "capability": "video_generation",
      "name": "Veo 3.1",
      "description": "Google Veo 3.1 — premium text/image-to-video with native audio. Supports first-last-frame interpolation. Default.",
      "status": "available",
      "is_default": true,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          4,
          5,
          8
        ],
        "supports_audio": true
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": true,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": true
      }
    },
    {
      "id": "video.veo_3_1_fast",
      "object": "model",
      "capability": "video_generation",
      "name": "Veo 3.1 Fast",
      "description": "Cheaper, faster Veo 3.1 variant. Supports first-last-frame interpolation.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          4,
          5,
          8
        ],
        "supports_audio": true
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": true
      }
    },
    {
      "id": "video.veo_3_1_lite",
      "object": "model",
      "capability": "video_generation",
      "name": "Veo 3.1 Lite",
      "description": "Lower-cost Lite variant of Veo 3.1. Supports first-last-frame interpolation.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          4,
          5,
          8
        ],
        "supports_audio": true
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": true
      }
    },
    {
      "id": "video.veo_3_1_extend",
      "object": "model",
      "capability": "video_generation",
      "name": "Veo 3.1 Extend",
      "description": "Extend an existing Veo-created video by up to 7 seconds. Requires source_video_url.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16"
        ],
        "duration_seconds": [
          7
        ],
        "supports_audio": true
      },
      "capabilities": {
        "text_to_output": false,
        "image_to_output": false,
        "reference_images": false,
        "source_video": true,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.veo_3",
      "object": "model",
      "capability": "video_generation",
      "name": "Veo 3",
      "description": "Veo 3 — high-quality cinematic generation with audio (predecessor to Veo 3.1).",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16"
        ],
        "duration_seconds": [
          8
        ],
        "supports_audio": true
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.veo_3_fast",
      "object": "model",
      "capability": "video_generation",
      "name": "Veo 3 Fast",
      "description": "Cheaper Veo 3 variant — same quality tier, faster turnaround.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16"
        ],
        "duration_seconds": [
          8
        ],
        "supports_audio": true
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.kling_o3",
      "object": "model",
      "capability": "video_generation",
      "name": "Kling O3 Standard",
      "description": "Kling O3 standard — smooth motion, strong subject consistency.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5,
          10
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": true,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.kling_o3_pro",
      "object": "model",
      "capability": "video_generation",
      "name": "Kling O3 Pro",
      "description": "Pro tier of Kling O3 — better quality at higher cost. Supports video-to-video reference (use source_video_url + reference_image_urls).",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5,
          10
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": true,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.kling_o3_4k",
      "object": "model",
      "capability": "video_generation",
      "name": "Kling O3 4K",
      "description": "Kling O3 at 4K resolution. Higher cost, top-tier quality.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5,
          10
        ],
        "resolution": "4k"
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": true,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.kling_v3",
      "object": "model",
      "capability": "video_generation",
      "name": "Kling V3 Standard",
      "description": "Kling V3 standard.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5,
          10
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.kling_v3_pro",
      "object": "model",
      "capability": "video_generation",
      "name": "Kling V3 Pro",
      "description": "Kling V3 pro — top quality.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5,
          10
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.kling_v3_motion_control",
      "object": "model",
      "capability": "video_generation",
      "name": "Kling V3 Motion Control",
      "description": "Transfer motion from a reference video onto a character image. Requires both image_url (character) and source_video_url (motion reference).",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5
        ]
      },
      "capabilities": {
        "text_to_output": false,
        "image_to_output": false,
        "reference_images": false,
        "source_video": false,
        "motion_control": true,
        "first_last_frame": false
      }
    },
    {
      "id": "video.kling_v3_pro_motion_control",
      "object": "model",
      "capability": "video_generation",
      "name": "Kling V3 Pro Motion Control",
      "description": "Pro-tier Kling V3 motion-control — higher quality character animation. Requires both image_url and source_video_url.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5
        ]
      },
      "capabilities": {
        "text_to_output": false,
        "image_to_output": false,
        "reference_images": false,
        "source_video": false,
        "motion_control": true,
        "first_last_frame": false
      }
    },
    {
      "id": "video.kling_v3_4k",
      "object": "model",
      "capability": "video_generation",
      "name": "Kling V3 4K",
      "description": "Kling V3 at 4K resolution.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5,
          10
        ],
        "resolution": "4k"
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.kling_v26",
      "object": "model",
      "capability": "video_generation",
      "name": "Kling 2.6",
      "description": "Kling 2.6 standard — text/image to video.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5,
          10
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.kling_v26_pro",
      "object": "model",
      "capability": "video_generation",
      "name": "Kling 2.6 Pro",
      "description": "Kling 2.6 pro tier — higher quality.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5,
          10
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": true,
        "first_last_frame": false
      }
    },
    {
      "id": "video.kling_v26_motion_control",
      "object": "model",
      "capability": "video_generation",
      "name": "Kling 2.6 Motion Control",
      "description": "Motion-control variant of Kling 2.6 (legacy). Requires image_url + source_video_url.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5
        ]
      },
      "capabilities": {
        "text_to_output": false,
        "image_to_output": false,
        "reference_images": false,
        "source_video": false,
        "motion_control": true,
        "first_last_frame": false
      }
    },
    {
      "id": "video.kling_v25_turbo",
      "object": "model",
      "capability": "video_generation",
      "name": "Kling 2.5 Turbo Pro",
      "description": "Faster Kling variant (legacy but reliable).",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5,
          10
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.kling_v21_master",
      "object": "model",
      "capability": "video_generation",
      "name": "Kling 2.1 Master",
      "description": "Kling 2.1 Master (legacy) — enhanced quality.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5,
          10
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.sora_2",
      "object": "model",
      "capability": "video_generation",
      "name": "Sora 2",
      "description": "OpenAI Sora 2 — text and image to video, 4–20s.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          4,
          8,
          12,
          16,
          20
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.hailuo_23",
      "object": "model",
      "capability": "video_generation",
      "name": "Hailuo 2.3",
      "description": "MiniMax Hailuo 2.3 — dynamic video generation.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          6,
          10
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.hailuo_23_pro",
      "object": "model",
      "capability": "video_generation",
      "name": "Hailuo 2.3 Pro",
      "description": "MiniMax Hailuo 2.3 Pro tier.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          6,
          10
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.hailuo_02",
      "object": "model",
      "capability": "video_generation",
      "name": "Hailuo 02",
      "description": "MiniMax Hailuo 02 (legacy) — image-to-video standard tier.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          6,
          10
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.hailuo_02_fast",
      "object": "model",
      "capability": "video_generation",
      "name": "Hailuo 02 Fast",
      "description": "Faster Hailuo 02 image-to-video variant.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          6,
          10
        ]
      },
      "capabilities": {
        "text_to_output": false,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.hailuo_23_fast",
      "object": "model",
      "capability": "video_generation",
      "name": "Hailuo 2.3 Fast",
      "description": "Faster Hailuo 2.3 image-to-video standard tier.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          6,
          10
        ]
      },
      "capabilities": {
        "text_to_output": false,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.hailuo_23_fast_pro",
      "object": "model",
      "capability": "video_generation",
      "name": "Hailuo 2.3 Fast Pro",
      "description": "Faster Hailuo 2.3 pro-tier image-to-video.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          6,
          10
        ]
      },
      "capabilities": {
        "text_to_output": false,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.luma_dream_machine",
      "object": "model",
      "capability": "video_generation",
      "name": "Luma Dream Machine",
      "description": "Luma Dream Machine — fluid motion, distinctive style.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5,
          9
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.wan_v22",
      "object": "model",
      "capability": "video_generation",
      "name": "WAN 2.2",
      "description": "WAN 2.2 — strong character animation.",
      "status": "preview",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5,
          8
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.wan_25_preview",
      "object": "model",
      "capability": "video_generation",
      "name": "WAN 2.5 Preview",
      "description": "WAN 2.5 preview — newer than 2.2, may change without notice.",
      "status": "preview",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5,
          8
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.wan_animate_replace",
      "object": "model",
      "capability": "video_generation",
      "name": "WAN Animate (Replace)",
      "description": "WAN animate-replace — swap subject in source video using a reference image. Requires image_url + source_video_url.",
      "status": "preview",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5
        ]
      },
      "capabilities": {
        "text_to_output": false,
        "image_to_output": false,
        "reference_images": false,
        "source_video": false,
        "motion_control": true,
        "first_last_frame": false
      }
    },
    {
      "id": "video.wan_animate_move",
      "object": "model",
      "capability": "video_generation",
      "name": "WAN Animate (Move)",
      "description": "WAN animate-move — animate static images with natural motion from a reference video. Requires image_url + source_video_url.",
      "status": "preview",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          5
        ]
      },
      "capabilities": {
        "text_to_output": false,
        "image_to_output": false,
        "reference_images": false,
        "source_video": false,
        "motion_control": true,
        "first_last_frame": false
      }
    },
    {
      "id": "video.seedance_2_0",
      "object": "model",
      "capability": "video_generation",
      "name": "Seedance 2.0",
      "description": "ByteDance Seedance 2.0 — text/image/reference to video. Routes via BytePlus when configured.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          4,
          5,
          8,
          10,
          12,
          15
        ],
        "resolutions": [
          "480p",
          "720p",
          "1080p"
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": true,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.seedance_2_0_fast",
      "object": "model",
      "capability": "video_generation",
      "name": "Seedance 2.0 Fast",
      "description": "Faster, cheaper Seedance 2.0 variant.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          4,
          5,
          8,
          10,
          12,
          15
        ],
        "resolutions": [
          "480p",
          "720p",
          "1080p"
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": true,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.grok_video",
      "object": "model",
      "capability": "video_generation",
      "name": "Grok Imagine Video",
      "description": "xAI Grok Imagine — high-fidelity text/image to video.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          4,
          5,
          8,
          10,
          15
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": true,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.grok_video_edit",
      "object": "model",
      "capability": "video_generation",
      "name": "Grok Imagine Edit",
      "description": "Edit existing videos with text prompts. Requires source_video_url.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          4,
          5,
          8,
          10
        ]
      },
      "capabilities": {
        "text_to_output": false,
        "image_to_output": false,
        "reference_images": false,
        "source_video": true,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.grok_video_extend",
      "object": "model",
      "capability": "video_generation",
      "name": "Grok Imagine Extend",
      "description": "Extend an existing video by 2–10s. Requires source_video_url.",
      "status": "available",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          2,
          5,
          10
        ]
      },
      "capabilities": {
        "text_to_output": false,
        "image_to_output": false,
        "reference_images": false,
        "source_video": true,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "video.happy_horse",
      "object": "model",
      "capability": "video_generation",
      "name": "Happy Horse",
      "description": "Alibaba Happy Horse — text/image/reference-to-video and video-edit.",
      "status": "preview",
      "is_default": false,
      "limits": {
        "aspect_ratios": [
          "16:9",
          "9:16",
          "1:1"
        ],
        "duration_seconds": [
          3,
          5,
          8,
          10,
          15
        ]
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": true,
        "source_video": true,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "speech.elevenlabs_turbo_v2_5",
      "object": "model",
      "capability": "speech_generation",
      "name": "ElevenLabs Turbo v2.5",
      "description": "Low-latency TTS, balance of quality and speed. Default.",
      "status": "available",
      "is_default": true,
      "limits": {
        "max_characters": 40000
      }
    },
    {
      "id": "speech.elevenlabs_flash_v2_5",
      "object": "model",
      "capability": "speech_generation",
      "name": "ElevenLabs Flash v2.5",
      "description": "Fastest ElevenLabs TTS, lowest cost.",
      "status": "available",
      "is_default": false,
      "limits": {
        "max_characters": 40000
      }
    },
    {
      "id": "speech.elevenlabs_v3",
      "object": "model",
      "capability": "speech_generation",
      "name": "ElevenLabs v3",
      "description": "Highest-quality expressive voice generation.",
      "status": "available",
      "is_default": false,
      "limits": {
        "max_characters": 40000
      }
    },
    {
      "id": "speech.elevenlabs_multilingual_v2",
      "object": "model",
      "capability": "speech_generation",
      "name": "ElevenLabs Multilingual v2",
      "description": "29 languages, high fidelity.",
      "status": "available",
      "is_default": false,
      "limits": {
        "max_characters": 40000
      }
    },
    {
      "id": "music.elevenlabs_music_v1",
      "object": "model",
      "capability": "music_generation",
      "name": "ElevenLabs Music v1",
      "description": "Prompt-based music generation up to 5 minutes.",
      "status": "available",
      "is_default": true,
      "limits": {
        "max_duration_seconds": 300
      }
    },
    {
      "id": "music.lyria3_pro",
      "object": "model",
      "capability": "music_generation",
      "name": "Lyria 3 Pro",
      "description": "Google Lyria 3 Pro — full structured songs up to 3 minutes with vocals, lyrics, and multi-language support. Accepts an optional image_url for inspiration and a negative_prompt. Flat per-generation fee (duration is not configurable).",
      "status": "available",
      "is_default": false,
      "limits": {
        "max_duration_seconds": 180,
        "prompt_max_length": 5000
      },
      "capabilities": {
        "text_to_output": true,
        "image_to_output": true,
        "reference_images": false,
        "source_video": false,
        "motion_control": false,
        "first_last_frame": false
      }
    },
    {
      "id": "sfx.elevenlabs_v1",
      "object": "model",
      "capability": "sound_effect_generation",
      "name": "ElevenLabs SFX",
      "description": "Sound effect generation up to 30s.",
      "status": "available",
      "is_default": true,
      "limits": {
        "max_duration_seconds": 30
      }
    },
    {
      "id": "transcription.whisper_v1",
      "object": "model",
      "capability": "transcription",
      "name": "OpenAI Whisper v1",
      "description": "Speech-to-text with word and segment timestamps. Accepts a direct audio/video URL or a YouTube URL. Async — returns a queued run; poll genfire_get_run for the transcript.",
      "status": "available",
      "is_default": true,
      "limits": {
        "max_file_mb": 500,
        "max_duration_seconds": 7200
      }
    },
    {
      "id": "image_edit.bria_background_remove",
      "object": "model",
      "capability": "image_editing",
      "name": "BRIA Background Remove",
      "description": "Remove the background from an image. Returns a transparent PNG.",
      "status": "available",
      "is_default": true,
      "limits": {
        "input": "image_url"
      }
    },
    {
      "id": "video_upscale.fal_video_upscaler",
      "object": "model",
      "capability": "video_upscaling",
      "name": "FAL Video Upscaler",
      "description": "Upscale a video by 2x or 4x. Async — returns a queued run; poll genfire_get_run for completion.",
      "status": "available",
      "is_default": true,
      "limits": {
        "scale_factors": [
          2,
          4
        ]
      }
    },
    {
      "id": "lipsync.lipsync_2_pro",
      "object": "model",
      "capability": "lipsync_generation",
      "name": "Lipsync 2 Pro",
      "description": "High-quality lip-sync at 480p or 720p. Default.",
      "status": "available",
      "is_default": true,
      "limits": {
        "resolutions": [
          "480p",
          "720p"
        ]
      }
    },
    {
      "id": "lipsync.sync_lipsync_v2_pro",
      "object": "model",
      "capability": "lipsync_generation",
      "name": "Sync Lipsync v2 Pro",
      "description": "Alternative lip-sync engine.",
      "status": "available",
      "is_default": false,
      "limits": {
        "resolutions": [
          "480p",
          "720p"
        ]
      }
    },
    {
      "id": "lipsync.sync_lipsync_v3",
      "object": "model",
      "capability": "lipsync_generation",
      "name": "Sync Lipsync v3",
      "description": "Premium lip-sync engine — higher fidelity than v2 Pro.",
      "status": "available",
      "is_default": false,
      "limits": {
        "resolutions": [
          "480p",
          "720p"
        ]
      }
    }
  ]
}
GET /models/pricing
models:read

Get per-model pricing

Returns the credits charged per unit for every model in the registry. Use this to estimate cost before generating — e.g. an 8-second Veo 3.1 video at 16 credits/second = 128 credits before any audio multiplier.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/models/pricing \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "object": "list",
  "data": [
    {
      "model": "image.nano_banana_2",
      "capability": "image_generation",
      "unit": "per_image",
      "credits": 3,
      "operation_key": "nano_banana_2"
    },
    {
      "model": "video.veo_3_1",
      "capability": "video_generation",
      "unit": "per_second",
      "credits": 16,
      "operation_key": "veo31_fast",
      "notes": "Audio adds a multiplier when generate_audio=true."
    },
    {
      "model": "speech.elevenlabs_turbo_v2_5",
      "capability": "speech_generation",
      "unit": "per_character",
      "credits": 0.025,
      "operation_key": "elevenLabsTts"
    }
  ]
}

Notes

  • Unit values: `per_image` (image models, max 4 per request), `per_second` (video / music / SFX / lipsync), `per_character` (speech).
  • Some video models add a multiplier when `generate_audio=true`. Check the `notes` field on each entry.
GET /audio/voices
models:read

List voices for speech generation

Returns the voice ids accepted by `voice_id` on `/audio/speech`. By default this lists the voices you have cloned (their ids look like `fal_cloned_<id>`); a cloned voice id is otherwise only shown once at clone time in the dashboard, so this is the way to discover it programmatically. Pass `?include=stock` to also return built-in ElevenLabs stock voices.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

include query optional

Comma-separated extra sources to include. Currently only `stock` is supported, which appends built-in ElevenLabs voices.

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/audio/voices \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "object": "list",
  "data": [
    {
      "id": "fal_cloned_abc123",
      "object": "voice",
      "name": "My Cloned Voice",
      "type": "cloned",
      "provider": "fal_qwen3",
      "preview_url": "https://cdn.genfire.ai/voice-clones/preview-abc123.wav",
      "created_at": "2026-05-01T12:00:00.000Z"
    }
  ]
}

Notes

  • Cloned voices are scoped to the authenticated account — you only ever see your own.
  • Stock voices are large and account-global, so they are excluded unless `include=stock` is passed.

Reference

Usage

GET /usage
runs:read

Get aggregated API usage

Aggregate API usage for the authenticated account over a date range. Returns totals (credits spent, run counts) plus a breakdown grouped by model, capability, or day. Default range is the last 30 days; max range is 365 days.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

start_date query optional

Inclusive lower bound (ISO date or full timestamp). Defaults to 30 days ago.

end_date query optional

Exclusive upper bound. Defaults to now.

group_by query optional

Bucketing for the breakdown: `model`, `capability`, `day`, or `none`.

Default: model

capability query optional

Optional filter, e.g. `video_generation`.

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/usage \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "object": "usage_summary",
  "period": {
    "start": "2026-04-01T00:00:00.000Z",
    "end": "2026-04-30T23:59:59.999Z"
  },
  "group_by": "model",
  "totals": {
    "credits_spent": 4823,
    "runs_count": 187,
    "successful_runs": 178,
    "failed_runs": 9
  },
  "breakdown": [
    {
      "group": "video.veo_3_1",
      "credits_spent": 2400,
      "runs_count": 30,
      "successful_runs": 30,
      "failed_runs": 0,
      "avg_credits_per_run": 80
    },
    {
      "group": "image.nano_banana_2",
      "credits_spent": 423,
      "runs_count": 141,
      "successful_runs": 138,
      "failed_runs": 3,
      "avg_credits_per_run": 3
    }
  ]
}

Notes

  • Buckets are sorted by `credits_spent` descending, except `group_by=day` which is sorted chronologically.
  • Counts only include runs that hit `/v1` endpoints. Dashboard generations and workflow runs initiated outside the public API are not included.

Reference

Uploads

POST /uploads
uploads:write

Create a signed upload URL

Allocates a pre-signed PUT URL so a client can upload a local file directly to GenFire storage without proxying bytes through the API. Use the returned `asset_url` as `image_url`, `video_url`, or `audio_url` in subsequent generation requests.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Body Fields

filename string required

Original filename. The extension is preserved in the stored object path.

content_type string optional

MIME type for the upload. Pinned into the signed URL — the PUT must send the same `Content-Type`.

Default: application/octet-stream

size_bytes number optional

Optional declared file size. Rejected if greater than the 5 GB ceiling.

curl Example

curl https://api.genfire.ai/v1/uploads \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "filename": "reference.png",
  "content_type": "image/png",
  "size_bytes": 124000
}'

Response Example

{
  "asset_id": "asset_8f3c4a2b1d6e7f9a0b1c2d3e",
  "upload_url": "https://storage.googleapis.com/genfire-uploads/...?X-Goog-Signature=...",
  "asset_url": "https://storage.googleapis.com/genfire-uploads/...?X-Goog-Signature=...",
  "content_type": "image/png",
  "expires_at": "2026-05-12T02:21:25.985Z"
}

Request Example Body

{
  "filename": "reference.png",
  "content_type": "image/png",
  "size_bytes": 124000
}

Notes

  • PUT the file bytes to `upload_url` within 15 minutes. The signed URL is pinned to the `content_type` you submitted — sending a different `Content-Type` header will be rejected by the storage layer.
  • `asset_url` is a 7-day signed READ URL. Re-upload the asset before this point if you need long-lived references.
  • Maximum upload size is 5 GB.

Reference

Influencers

GET /influencers
influencers:read

List your trained influencers

Returns the influencer characters owned by the authenticated account that are in `ready` status. Use the returned `id` and `handle` in the `mentions` array of an image generation request to inject the character.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/influencers \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "object": "list",
  "data": [
    {
      "id": "model_abc123def456",
      "object": "influencer",
      "handle": "sarah",
      "display_name": "Sarah Chen",
      "status": "ready",
      "source_type": "uploaded",
      "preview_url": "https://firebasestorage.googleapis.com/...",
      "created_at": "2026-04-12T10:30:00.000Z",
      "updated_at": "2026-04-12T10:35:00.000Z"
    }
  ]
}

Notes

  • Drafts and archived influencers are NOT returned. Train and finalize them in the dashboard before they can be referenced.
GET /influencers/{influencerId}
influencers:read

Get a single influencer by id

Returns full details for one influencer the authenticated account owns.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

influencerId path required

Influencer id from `GET /v1/influencers`.

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/influencers/{influencerId} \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "id": "model_abc123def456",
  "object": "influencer",
  "handle": "sarah",
  "display_name": "Sarah Chen",
  "status": "ready",
  "source_type": "uploaded",
  "preview_url": "https://firebasestorage.googleapis.com/...",
  "created_at": "2026-04-12T10:30:00.000Z",
  "updated_at": "2026-04-12T10:35:00.000Z"
}

Notes

  • 404 if the influencer does not exist or is not owned by the authenticated account.

Reference

Runs

GET /runs
runs:read

List recent runs

Lists recent runs for the authenticated account. Use this to inspect async activity across generation endpoints and workflows.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

status query optional

Optional run status filter such as `queued`, `processing`, `completed`, or `failed`.

capability query optional

Optional capability filter such as `image_generation` or `workflow.hook_pack`.

limit query optional

Maximum number of runs to return.

Default: 25

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/runs \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "object": "list",
  "data": [
    {
      "id": "run_img_123",
      "object": "run",
      "status": "completed",
      "capability": "image_generation",
      "endpoint": "images.generations.create",
      "model": "image.nano_banana_2",
      "request_id": "run_img_123",
      "input_summary": {
        "prompt": "Studio product photo of a matte black water bottle",
        "model": "image.nano_banana_2",
        "aspect_ratio": "1:1",
        "count": 1
      },
      "output": {
        "images": [
          {
            "url": "https://cdn.genfire.ai/output/image-001.png"
          }
        ],
        "output_url": "https://cdn.genfire.ai/output/image-001.png"
      },
      "usage": {
        "credits": 8
      },
      "error": null,
      "resource_id": null,
      "provider_request_id": null,
      "created_at": "2026-03-25T12:00:00.000Z",
      "updated_at": "2026-03-25T12:00:02.000Z",
      "completed_at": "2026-03-25T12:00:02.000Z"
    },
    {
      "id": "run_vid_123",
      "object": "run",
      "status": "queued",
      "capability": "video_generation",
      "endpoint": "videos.generations.create",
      "model": "video.veo_3_1",
      "request_id": "run_vid_123",
      "input_summary": {
        "prompt": "Cinematic close-up of a luxury watch with soft lighting",
        "model": "video.veo_3_1",
        "aspect_ratio": "16:9",
        "duration": 8,
        "has_image": false,
        "generate_audio": true
      },
      "output": null,
      "usage": null,
      "error": null,
      "resource_id": "video_123",
      "provider_request_id": "provider_req_123",
      "created_at": "2026-03-25T12:00:00.000Z",
      "updated_at": "2026-03-25T12:00:00.000Z",
      "completed_at": null
    }
  ]
}
GET /runs/{runId}
runs:read

Get a run by id

Use the run id returned by a generation endpoint or workflow execution to inspect status, output, usage, and provider metadata.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

runId path required

The run id returned by the API.

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/runs/{runId} \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "id": "run_img_123",
  "object": "run",
  "status": "completed",
  "capability": "image_generation",
  "endpoint": "images.generations.create",
  "model": "image.nano_banana_2",
  "request_id": "run_img_123",
  "input_summary": {
    "prompt": "Studio product photo of a matte black water bottle",
    "model": "image.nano_banana_2",
    "aspect_ratio": "1:1",
    "count": 1
  },
  "output": {
    "images": [
      {
        "url": "https://cdn.genfire.ai/output/image-001.png"
      }
    ],
    "output_url": "https://cdn.genfire.ai/output/image-001.png"
  },
  "usage": {
    "credits": 8
  },
  "error": null,
  "resource_id": null,
  "provider_request_id": null,
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:02.000Z",
  "completed_at": "2026-03-25T12:00:02.000Z"
}
GET /runs/{runId}/output
runs:read

Get the output envelope for a run

Returns just the terminal output envelope for a run, which is useful when you only need the final payload.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

runId path required

The run id returned by the API.

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/runs/{runId}/output \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "id": "run_img_123",
  "object": "run_output",
  "status": "completed",
  "capability": "image_generation",
  "output": {
    "images": [
      {
        "url": "https://cdn.genfire.ai/output/image-001.png"
      }
    ],
    "output_url": "https://cdn.genfire.ai/output/image-001.png"
  },
  "error": null,
  "completed_at": "2026-03-25T12:00:02.000Z"
}

Reference

Generation

POST /images/generations
images:write

Generate images

Create one or more images using a public image model alias. This endpoint usually completes synchronously and returns a completed run.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Required

Body Fields

prompt string required

The image prompt. May include @<handle> mentions when paired with a `mentions` array.

model string optional

Optional image model alias from `/models`. Models with an internal edit variant accept `mentions`, `image_url`, and `image_urls` for influencer-conditioned or multi-image edits.

Default: image.nano_banana_2

aspect_ratio string optional

Image aspect ratio.

Default: 1:1

count integer optional

Number of images to generate, from 1 to 4.

Default: 1

image_url string optional

Optional single source image URL. When provided with an edit-capable model, the request is routed through the model's edit variant. Use `image_urls` for multi-image edits.

image_urls array optional

Optional list of up to 14 source image URLs for a multi-image edit. Supported by GPT Image 2, Seedream, Qwen Image 2 and Nano Banana; Grok uses at most the first 3. Routes through the model's edit variant.

mentions array optional

Optional `[{ handle, influencer_id }]` to inject a trained influencer character into the image. The model is auto-switched to its edit variant and the influencer's reference photos are added as conditioning. Currently a single mention per request is supported.

quality string optional

Quality tier: low, medium, high, auto. Only applies to image.gpt_image_2. Affects cost: low=1×, medium=6×, high=22×.

Default: high

resolution string optional

Output resolution: 1K, 2K, 4K. Nano Banana family edit only (image.nano_banana, image.nano_banana_2, image.nano_banana_pro) — request must supply image_url or mentions to route through the model edit variant. Affects cost: 1K=1×, 2K=1.5×, 4K=3×.

curl Example

curl https://api.genfire.ai/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: unique_request_key" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Studio product photo of a matte black water bottle on dark stone",
  "model": "image.nano_banana_2",
  "aspect_ratio": "1:1",
  "count": 1
}'

Response Example

{
  "id": "run_img_123",
  "object": "run",
  "status": "completed",
  "capability": "image_generation",
  "endpoint": "images.generations.create",
  "model": "image.nano_banana_2",
  "request_id": "run_img_123",
  "input_summary": {
    "prompt": "Studio product photo of a matte black water bottle",
    "model": "image.nano_banana_2",
    "aspect_ratio": "1:1",
    "count": 1
  },
  "output": {
    "images": [
      {
        "url": "https://cdn.genfire.ai/output/image-001.png"
      }
    ],
    "output_url": "https://cdn.genfire.ai/output/image-001.png"
  },
  "usage": {
    "credits": 8
  },
  "error": null,
  "resource_id": null,
  "provider_request_id": null,
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:02.000Z",
  "completed_at": "2026-03-25T12:00:02.000Z"
}

Request Example Body

{
  "prompt": "Studio product photo of a matte black water bottle on dark stone",
  "model": "image.nano_banana_2",
  "aspect_ratio": "1:1",
  "count": 1
}

Notes

  • When `mentions` is supplied: the model must have an internal edit variant (most do — see `/models`). The server resolves the influencer, replaces `@<handle>` in the prompt with `the character`, appends an identity directive, and adds up to four reference images as conditioning.
  • Influencers must be in status `ready`. Drafts and archived ones cannot be referenced.
POST /videos/generations
videos:write

Generate videos

Create a video run. Routing is automatic from the inputs you supply: prompt only → text-to-video, +image_url → image-to-video, +reference_image_urls → reference-to-video, +source_video_url → video-edit/extend, +image_url +source_video_url → motion-control, +first_frame_url +last_frame_url → first-last-frame interpolation. Each video model declares which combinations it supports under `capabilities` on `GET /models`.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Required

Body Fields

prompt string required

The video prompt.

model string optional

Optional video model alias from `/models`.

Default: video.veo_3_1

aspect_ratio string optional

Video aspect ratio.

Default: 16:9

duration integer optional

Target duration in seconds.

Default: 5

resolution string optional

Output resolution (e.g. 480p, 720p, 1080p). Supported values and pricing are per-model — see `resolutions` under `/models`. Higher resolutions cost more credits.

image_url string optional

Source image for image-to-video, or character image for motion-control.

source_video_url string optional

Source video for video-edit, video-extend, or motion-control modes.

reference_image_urls array optional

Up to 9 reference image URLs for reference-to-video mode.

first_frame_url string optional

First-frame image for first-last-frame interpolation. Must be paired with last_frame_url.

last_frame_url string optional

Last-frame image for first-last-frame interpolation. Must be paired with first_frame_url.

generate_audio boolean optional

Whether to include generated audio when supported.

Default: true

curl Example

curl https://api.genfire.ai/v1/videos/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: unique_request_key" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Cinematic close-up of a luxury watch with soft lighting",
  "model": "video.veo_3_1",
  "aspect_ratio": "16:9",
  "duration": 8,
  "generate_audio": true
}'

Response Example

{
  "id": "run_vid_123",
  "object": "run",
  "status": "queued",
  "capability": "video_generation",
  "endpoint": "videos.generations.create",
  "model": "video.veo_3_1",
  "request_id": "run_vid_123",
  "input_summary": {
    "prompt": "Cinematic close-up of a luxury watch with soft lighting",
    "model": "video.veo_3_1",
    "aspect_ratio": "16:9",
    "duration": 8,
    "has_image": false,
    "generate_audio": true
  },
  "output": null,
  "usage": null,
  "error": null,
  "resource_id": "video_123",
  "provider_request_id": "provider_req_123",
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:00.000Z",
  "completed_at": null
}

Request Example Body

{
  "prompt": "Cinematic close-up of a luxury watch with soft lighting",
  "model": "video.veo_3_1",
  "aspect_ratio": "16:9",
  "duration": 8,
  "generate_audio": true
}

Notes

  • Poll `GET /runs/{runId}` until the run moves to `completed` or `failed`.
  • Per-model duration / aspect-ratio / resolution limits are returned by `/models`; passing an unsupported value returns a 400 listing the allowed values.
  • If you provide an input combination the model does not declare in `capabilities`, you get `unsupported_input_combination`.
POST /images/background-remove
images:write

Remove image background

Remove the background from an image using BRIA. Returns a transparent PNG. Synchronous — typically completes in a couple seconds.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Required

Body Fields

image_url string required

Absolute URL of the source image.

curl Example

curl https://api.genfire.ai/v1/images/background-remove \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: unique_request_key" \
  -H "Content-Type: application/json" \
  -d '{
  "image_url": "https://example.com/photo.jpg"
}'

Response Example

{
  "id": "run_bg_123",
  "object": "run",
  "status": "completed",
  "capability": "image_editing",
  "endpoint": "images.background_remove.create",
  "model": "image_edit.bria_background_remove",
  "request_id": "run_bg_123",
  "input_summary": {
    "model": "image_edit.bria_background_remove",
    "image_url": "https://example.com/photo.jpg"
  },
  "output": {
    "images": [
      {
        "url": "https://cdn.genfire.ai/output/bg-removed.png"
      }
    ],
    "output_url": "https://cdn.genfire.ai/output/bg-removed.png"
  },
  "usage": {
    "credits": 1
  },
  "error": null,
  "resource_id": null,
  "provider_request_id": null,
  "created_at": "2026-04-30T12:00:00.000Z",
  "updated_at": "2026-04-30T12:00:01.500Z",
  "completed_at": "2026-04-30T12:00:01.500Z"
}

Request Example Body

{
  "image_url": "https://example.com/photo.jpg"
}
POST /videos/upscale
videos:write

Upscale a video

Upscale a video by 2x or 4x using FAL's video upscaler. Async — returns a queued run; poll `/runs/{runId}` for completion (typically 1-5 min).

Auth: Bearer API key or OAuth access token
Idempotency-Key: Required

Body Fields

source_video_url string required

Absolute URL of the source video.

scale_factor integer optional

Either 2 or 4.

Default: 2

curl Example

curl https://api.genfire.ai/v1/videos/upscale \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: unique_request_key" \
  -H "Content-Type: application/json" \
  -d '{
  "source_video_url": "https://cdn.genfire.ai/video.mp4",
  "scale_factor": 2
}'

Response Example

{
  "id": "run_upscale_123",
  "object": "run",
  "status": "queued",
  "capability": "video_upscaling",
  "endpoint": "videos.upscale.create",
  "model": "video_upscale.fal_video_upscaler",
  "request_id": "run_upscale_123",
  "input_summary": {
    "model": "video_upscale.fal_video_upscaler",
    "scale_factor": 2
  },
  "output": null,
  "usage": null,
  "error": null,
  "resource_id": null,
  "provider_request_id": "fal_req_abc",
  "created_at": "2026-04-30T12:00:00.000Z",
  "updated_at": "2026-04-30T12:00:00.500Z",
  "completed_at": null
}

Request Example Body

{
  "source_video_url": "https://cdn.genfire.ai/video.mp4",
  "scale_factor": 2
}

Notes

  • Costs more credits than generation per-second, scaled by the scale factor.
  • Poll `GET /runs/{runId}` until status is `completed` or `failed`.
POST /lipsync/generations
lipsync:write

Generate a lip-synced video

Lip-sync an existing video to either a hosted audio file or a base64-encoded audio payload.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Required

Body Fields

video_url string required

Absolute URL to the source video.

audio_url string optional

Absolute URL to the source audio.

audio_base64 string optional

Base64-encoded audio content. Provide this instead of `audio_url` when uploading audio inline.

audio_file_name string optional

Optional file name to associate with inline audio.

title string optional

Optional title used for the internal video record.

Default: AI Lip-sync Video

description string optional

Optional description for the internal video record.

sync_mode string optional

How the video should align to the audio.

Default: cut_off

model string optional

Optional lipsync model alias from `/models`.

Default: lipsync.lipsync_2_pro

duration number optional

Optional duration hint between 1 and 300 seconds.

curl Example

curl https://api.genfire.ai/v1/lipsync/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: unique_request_key" \
  -H "Content-Type: application/json" \
  -d '{
  "video_url": "https://example.com/source-video.mp4",
  "audio_url": "https://example.com/source-audio.mp3",
  "sync_mode": "cut_off",
  "model": "lipsync.lipsync_2_pro"
}'

Response Example

{
  "id": "run_vid_123",
  "object": "run",
  "status": "queued",
  "capability": "lipsync_generation",
  "endpoint": "lipsync.generations.create",
  "model": "lipsync.lipsync_2_pro",
  "request_id": "run_vid_123",
  "input_summary": {
    "prompt": "Cinematic close-up of a luxury watch with soft lighting",
    "model": "video.veo_3_1",
    "aspect_ratio": "16:9",
    "duration": 8,
    "has_image": false,
    "generate_audio": true
  },
  "output": null,
  "usage": null,
  "error": null,
  "resource_id": "video_123",
  "provider_request_id": "provider_req_123",
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:00.000Z",
  "completed_at": null
}

Request Example Body

{
  "video_url": "https://example.com/source-video.mp4",
  "audio_url": "https://example.com/source-audio.mp3",
  "sync_mode": "cut_off",
  "model": "lipsync.lipsync_2_pro"
}

Notes

  • Provide either `audio_url` or `audio_base64`.
  • This endpoint is async and usually returns a queued run first.
POST /audio/speech
audio:write

Generate speech audio

Text-to-speech generation using a public speech model alias.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Required

Body Fields

text string required

The text to speak.

voice_id string required

The voice id to use: either a stock ElevenLabs voice id or one of your cloned voice ids (`fal_cloned_<id>`). List options via `/audio/voices`.

model string optional

Optional speech model alias from `/models`.

Default: speech.elevenlabs_turbo_v2_5

voice_name string optional

Optional human-readable voice name passed through to the audio generator.

output_format string optional

Optional output format when supported by the backing provider.

curl Example

curl https://api.genfire.ai/v1/audio/speech \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: unique_request_key" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Introducing the new GenFire creative workflow.",
  "voice_id": "voice_abc123",
  "model": "speech.elevenlabs_turbo_v2_5"
}'

Response Example

{
  "id": "run_speech_123",
  "object": "run",
  "status": "completed",
  "capability": "speech_generation",
  "endpoint": "audio.speech.create",
  "model": "speech.elevenlabs_turbo_v2_5",
  "request_id": "run_img_123",
  "input_summary": {
    "prompt": "Studio product photo of a matte black water bottle",
    "model": "image.nano_banana_2",
    "aspect_ratio": "1:1",
    "count": 1
  },
  "output": {
    "audio_id": "audio_123",
    "audio_url": "https://cdn.genfire.ai/output/audio-123.mp3",
    "duration": 6.4
  },
  "usage": {
    "credits": 8
  },
  "error": null,
  "resource_id": null,
  "provider_request_id": null,
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:02.000Z",
  "completed_at": "2026-03-25T12:00:02.000Z"
}

Request Example Body

{
  "text": "Introducing the new GenFire creative workflow.",
  "voice_id": "voice_abc123",
  "model": "speech.elevenlabs_turbo_v2_5"
}
POST /audio/music
audio:write

Generate music

Create music from a prompt. You can request a simple audio result or a more detailed music result with timestamps.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Required

Body Fields

prompt string required

Description of the music you want generated.

model string optional

Optional music model alias from `/models`.

Default: music.elevenlabs_music_v1

duration_seconds number optional

Desired music length in seconds. ElevenLabs models only — ignored by Lyria 3 Pro, which produces a flat-length song.

Default: 30

include_details boolean optional

Return detailed music metadata when supported (ElevenLabs only).

Default: false

with_timestamps boolean optional

Include timestamps when `include_details` is true (ElevenLabs only).

Default: false

force_instrumental boolean optional

Bias generation toward instrumental output when supported (ElevenLabs only).

image_url string optional

Optional image URL used as inspiration for the generated music. Lyria 3 Pro only — the model matches the mood and theme of the image.

negative_prompt string optional

Description of what to exclude from the generated audio. Lyria 3 Pro only.

output_format string optional

Optional output format when supported by the backing provider.

curl Example

curl https://api.genfire.ai/v1/audio/music \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: unique_request_key" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Confident electronic music bed for a product launch video",
  "model": "music.elevenlabs_music_v1",
  "duration_seconds": 30,
  "include_details": false
}'

Response Example

{
  "id": "run_music_123",
  "object": "run",
  "status": "completed",
  "capability": "music_generation",
  "endpoint": "audio.music.create",
  "model": "music.elevenlabs_music_v1",
  "request_id": "run_img_123",
  "input_summary": {
    "prompt": "Studio product photo of a matte black water bottle",
    "model": "image.nano_banana_2",
    "aspect_ratio": "1:1",
    "count": 1
  },
  "output": {
    "audio_id": "audio_music_123",
    "audio_url": "https://cdn.genfire.ai/output/music-123.mp3",
    "duration": 30
  },
  "usage": {
    "credits": 8
  },
  "error": null,
  "resource_id": null,
  "provider_request_id": null,
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:02.000Z",
  "completed_at": "2026-03-25T12:00:02.000Z"
}

Request Example Body

{
  "prompt": "Confident electronic music bed for a product launch video",
  "model": "music.elevenlabs_music_v1",
  "duration_seconds": 30,
  "include_details": false
}
POST /audio/sfx
audio:write

Generate sound effects

Generate short sound effects or foley-style audio from a text prompt.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Required

Body Fields

prompt string required

The sound effect prompt.

model string optional

Optional sound effect model alias from `/models`.

Default: sfx.elevenlabs_v1

duration_seconds number optional

Optional desired duration in seconds.

output_format string optional

Optional output format when supported by the backing provider.

prompt_influence number optional

Optional prompt influence value when supported.

loop boolean optional

Whether to generate a loop-friendly result when supported.

curl Example

curl https://api.genfire.ai/v1/audio/sfx \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: unique_request_key" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Heavy metal door slam in a large warehouse",
  "model": "sfx.elevenlabs_v1",
  "duration_seconds": 4
}'

Response Example

{
  "id": "run_sfx_123",
  "object": "run",
  "status": "completed",
  "capability": "sound_effect_generation",
  "endpoint": "audio.sfx.create",
  "model": "sfx.elevenlabs_v1",
  "request_id": "run_img_123",
  "input_summary": {
    "prompt": "Studio product photo of a matte black water bottle",
    "model": "image.nano_banana_2",
    "aspect_ratio": "1:1",
    "count": 1
  },
  "output": {
    "audio_id": "audio_sfx_123",
    "audio_url": "https://cdn.genfire.ai/output/sfx-123.mp3",
    "duration": 4.1
  },
  "usage": {
    "credits": 8
  },
  "error": null,
  "resource_id": null,
  "provider_request_id": null,
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:02.000Z",
  "completed_at": "2026-03-25T12:00:02.000Z"
}

Request Example Body

{
  "prompt": "Heavy metal door slam in a large warehouse",
  "model": "sfx.elevenlabs_v1",
  "duration_seconds": 4
}
POST /audio/transcriptions
audio:write

Transcribe audio or video (speech-to-text)

Transcribe speech to text with word- and segment-level timestamps using OpenAI Whisper. Provide exactly one of `audio_url`, `video_url`, or `youtube_url`. Video sources have their audio extracted automatically. Billed per second of media duration.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Required

Body Fields

audio_url string optional

URL of a direct audio file (mp3, wav, m4a, aac, ogg, flac, opus, webm, wma). One of audio_url / video_url / youtube_url is required.

video_url string optional

URL of a direct video file; audio is extracted before transcription.

youtube_url string optional

A YouTube URL to download and transcribe (max 2 hours).

model string optional

Optional transcription model alias from `/models`.

Default: transcription.whisper_v1

curl Example

curl https://api.genfire.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: unique_request_key" \
  -H "Content-Type: application/json" \
  -d '{
  "audio_url": "https://cdn.genfire.ai/uploads/interview.mp3",
  "model": "transcription.whisper_v1"
}'

Response Example

{
  "id": "run_transcription_123",
  "object": "run",
  "status": "completed",
  "capability": "transcription",
  "endpoint": "audio.transcriptions.create",
  "model": "transcription.whisper_v1",
  "request_id": "run_img_123",
  "input_summary": {
    "prompt": "Studio product photo of a matte black water bottle",
    "model": "image.nano_banana_2",
    "aspect_ratio": "1:1",
    "count": 1
  },
  "output": {
    "transcript_id": "audio_txn_123",
    "text": "Welcome to the GenFire creative workflow.",
    "language": "en",
    "duration": 3.2,
    "words": [
      {
        "word": "Welcome",
        "start": 0,
        "end": 0.4,
        "probability": 1
      }
    ],
    "segments": [
      {
        "id": 0,
        "start": 0,
        "end": 3.2,
        "text": "Welcome to the GenFire creative workflow."
      }
    ],
    "audio_url": "https://storage.googleapis.com/genfire/extracted-audio/123.mp3"
  },
  "usage": {
    "credits": 8
  },
  "error": null,
  "resource_id": null,
  "provider_request_id": null,
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:02.000Z",
  "completed_at": "2026-03-25T12:00:02.000Z"
}

Request Example Body

{
  "audio_url": "https://cdn.genfire.ai/uploads/interview.mp3",
  "model": "transcription.whisper_v1"
}

Notes

  • Max media size 500MB; max duration 2 hours.
  • Async — usually returns a queued run first; poll the run until `status` is `completed`, then read `output.text` / `output.words` / `output.segments`.
  • YouTube transcription is supported but downloads third-party content — ensure your use complies with the source platform’s terms.
POST /products/extract
products:write

Extract product data from a URL

Scrape product details from a public product page and return the result inside a run envelope.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Required

Body Fields

url string required

A public product page URL. Private, local, and unsafe targets are blocked.

curl Example

curl https://api.genfire.ai/v1/products/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: unique_request_key" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com/products/matte-black-water-bottle"
}'

Response Example

{
  "id": "run_product_123",
  "object": "run",
  "status": "completed",
  "capability": "product_extraction",
  "endpoint": "products.extract.create",
  "model": null,
  "request_id": "run_img_123",
  "input_summary": {
    "prompt": "Studio product photo of a matte black water bottle",
    "model": "image.nano_banana_2",
    "aspect_ratio": "1:1",
    "count": 1
  },
  "output": {
    "product": {
      "success": true,
      "title": "Matte Black Water Bottle",
      "description": "Insulated stainless steel water bottle",
      "category": "hydration",
      "price": "$39",
      "images": [
        "https://example.com/product.jpg"
      ]
    },
    "cached": false
  },
  "usage": {
    "credits": 8
  },
  "error": null,
  "resource_id": null,
  "provider_request_id": null,
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:02.000Z",
  "completed_at": "2026-03-25T12:00:02.000Z"
}

Request Example Body

{
  "url": "https://example.com/products/matte-black-water-bottle"
}

Notes

  • Unsafe or private-network targets are rejected before scraping begins.

Reference

Workflows

GET /workflows
workflows:read

List executable workflows

Returns the workflow catalog. Use this when you want a higher-level outcome rather than raw media generation.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/workflows \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "object": "list",
  "data": [
    {
      "id": "storyboard",
      "object": "workflow",
      "name": "Storyboard Planning",
      "description": "Create a creative project and generate the brief, brand kit, script, shot list, and storyboard planning outputs.",
      "status": "available",
      "input_schema": {
        "type": "object",
        "required": [
          "prompt"
        ],
        "properties": {
          "prompt": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "aspect_ratio": {
            "type": "string",
            "enum": [
              "16:9",
              "9:16",
              "1:1"
            ]
          }
        }
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "current_stage": {
            "type": "string"
          },
          "next_action": {
            "type": "string"
          }
        }
      }
    },
    {
      "id": "hook_pack",
      "object": "workflow",
      "name": "Hook Pack",
      "description": "Generate three monetizable UGC-style hooks plus a supporting body and CTA.",
      "status": "available",
      "input_schema": {
        "type": "object",
        "required": [
          "prompt"
        ],
        "properties": {
          "prompt": {
            "type": "string"
          },
          "audience": {
            "type": "string"
          },
          "tone": {
            "type": "string",
            "enum": [
              "casual",
              "professional",
              "humorous",
              "educational",
              "persuasive",
              "emotional"
            ]
          },
          "length": {
            "type": "string",
            "enum": [
              "short",
              "medium",
              "long"
            ]
          },
          "target_duration": {
            "type": "number"
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "additional_requirements": {
            "type": "string"
          }
        }
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "hooks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "body": {
            "type": "string"
          },
          "call_to_action": {
            "type": "string"
          },
          "full_script": {
            "type": "string"
          }
        }
      }
    },
    {
      "id": "ugc_ad",
      "object": "workflow",
      "name": "UGC Ad Script",
      "description": "Generate an outcome-oriented UGC ad script with hooks, body, CTA, and a full spoken script.",
      "status": "available",
      "input_schema": {
        "type": "object",
        "required": [
          "prompt"
        ],
        "properties": {
          "prompt": {
            "type": "string"
          },
          "audience": {
            "type": "string"
          },
          "tone": {
            "type": "string",
            "enum": [
              "casual",
              "professional",
              "humorous",
              "educational",
              "persuasive",
              "emotional"
            ]
          },
          "length": {
            "type": "string",
            "enum": [
              "short",
              "medium",
              "long"
            ]
          },
          "target_duration": {
            "type": "number"
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "additional_requirements": {
            "type": "string"
          }
        }
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "hooks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "body": {
            "type": "string"
          },
          "call_to_action": {
            "type": "string"
          },
          "full_script": {
            "type": "string"
          }
        }
      }
    },
    {
      "id": "creative_pack",
      "object": "workflow",
      "name": "Creative Pack",
      "description": "Build a product-aware creative pack with analysis, angles, hooks, and a monetizable script.",
      "status": "available",
      "input_schema": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string"
          },
          "product_url": {
            "type": "string",
            "format": "uri"
          },
          "product_name": {
            "type": "string"
          },
          "product_description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "audience": {
            "type": "string"
          },
          "tone": {
            "type": "string",
            "enum": [
              "casual",
              "professional",
              "humorous",
              "educational",
              "persuasive",
              "emotional"
            ]
          },
          "length": {
            "type": "string",
            "enum": [
              "short",
              "medium",
              "long"
            ]
          },
          "image_urls": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "additional_requirements": {
            "type": "string"
          }
        }
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "product": {
            "type": "object"
          },
          "analysis": {
            "type": "object"
          },
          "hooks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "body": {
            "type": "string"
          },
          "call_to_action": {
            "type": "string"
          },
          "full_script": {
            "type": "string"
          }
        }
      }
    },
    {
      "id": "product_ad_variants",
      "object": "workflow",
      "name": "Product Ad Variants",
      "description": "Generate multiple UGC-style ad script variants for the same product or offer.",
      "status": "available",
      "input_schema": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string"
          },
          "product_name": {
            "type": "string"
          },
          "product_description": {
            "type": "string"
          },
          "audience": {
            "type": "string"
          },
          "tone": {
            "type": "string",
            "enum": [
              "casual",
              "professional",
              "humorous",
              "educational",
              "persuasive",
              "emotional"
            ]
          },
          "length": {
            "type": "string",
            "enum": [
              "short",
              "medium",
              "long"
            ]
          },
          "variant_count": {
            "type": "number",
            "minimum": 1,
            "maximum": 5
          },
          "additional_requirements": {
            "type": "string"
          }
        }
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "variant_count": {
            "type": "number"
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      }
    }
  ]
}
GET /workflows/{workflowKey}
workflows:read

Get one workflow definition

Returns the input and output schema for a specific workflow.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

workflowKey path required

A workflow id such as `hook_pack` or `creative_pack`.

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/workflows/{workflowKey} \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "id": "hook_pack",
  "object": "workflow",
  "name": "Hook Pack",
  "description": "Generate three monetizable UGC-style hooks plus a supporting body and CTA.",
  "status": "available",
  "input_schema": {
    "type": "object",
    "required": [
      "prompt"
    ],
    "properties": {
      "prompt": {
        "type": "string"
      },
      "audience": {
        "type": "string"
      },
      "tone": {
        "type": "string",
        "enum": [
          "casual",
          "professional",
          "humorous",
          "educational",
          "persuasive",
          "emotional"
        ]
      },
      "length": {
        "type": "string",
        "enum": [
          "short",
          "medium",
          "long"
        ]
      },
      "target_duration": {
        "type": "number"
      },
      "keywords": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "additional_requirements": {
        "type": "string"
      }
    }
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "hooks": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "body": {
        "type": "string"
      },
      "call_to_action": {
        "type": "string"
      },
      "full_script": {
        "type": "string"
      }
    }
  }
}
POST /workflows/{workflowKey}/runs
workflows:write

Execute a workflow

Creates a run for the requested workflow. The request body depends on the workflow you choose.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Required

Parameters

workflowKey path required

A workflow id such as `storyboard`, `hook_pack`, or `creative_pack`.

Body Fields

workflow-specific fields object required

Use the schema from `GET /workflows/{workflowKey}` or the workflow catalog below.

curl Example

curl https://api.genfire.ai/v1/workflows/{workflowKey}/runs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: unique_request_key" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Portable blender for busy professionals",
  "audience": "Remote workers who skip breakfast",
  "tone": "persuasive",
  "length": "short",
  "target_duration": 20,
  "keywords": [
    "protein shake",
    "commute",
    "healthy"
  ],
  "additional_requirements": "Lead with convenience and save time."
}'

Response Example

{
  "id": "run_workflow_123",
  "object": "run",
  "status": "completed",
  "capability": "workflow.hook_pack",
  "endpoint": "workflows.hook_pack.run",
  "model": null,
  "request_id": "run_img_123",
  "input_summary": {
    "workflow": "hook_pack",
    "prompt": "Portable blender for busy professionals",
    "audience": "Remote workers who skip breakfast",
    "tone": "persuasive",
    "length": "short",
    "target_duration": 20,
    "keywords": [
      "protein shake",
      "commute",
      "healthy"
    ],
    "additional_requirements": "Lead with convenience and save time."
  },
  "output": {
    "workflow": "hook_pack",
    "topic": "Portable blender for busy professionals",
    "hooks": [
      "If breakfast keeps losing to your calendar, this fixes it.",
      "I stopped skipping protein the day I threw this in my bag.",
      "This is how I make a full shake before my first meeting."
    ],
    "body": "Portable, fast, and easy to clean for daily use.",
    "call_to_action": "Try it before your next busy week.",
    "full_script": "If breakfast keeps losing to your calendar...",
    "word_count": 96,
    "estimated_duration": 22
  },
  "usage": {
    "credits": 8
  },
  "error": null,
  "resource_id": null,
  "provider_request_id": null,
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:02.000Z",
  "completed_at": "2026-03-25T12:00:02.000Z"
}

Request Example Body

{
  "prompt": "Portable blender for busy professionals",
  "audience": "Remote workers who skip breakfast",
  "tone": "persuasive",
  "length": "short",
  "target_duration": 20,
  "keywords": [
    "protein shake",
    "commute",
    "healthy"
  ],
  "additional_requirements": "Lead with convenience and save time."
}

Notes

  • The workflow catalog below includes example payloads for every supported workflow.

Reference

Batches

GET /batches
batches:read

List recent batches

Lists batch jobs created by the authenticated account.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

status query optional

Optional status filter such as `queued`, `processing`, `completed`, `failed`, or `partial`.

mode query optional

Optional batch mode filter: `workflow` or `operation`.

target query optional

Optional target filter such as `hook_pack` or `images.generations.create`.

limit query optional

Maximum number of batches to return.

Default: 25

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/batches \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "object": "list",
  "data": [
    {
      "id": "batch_123",
      "object": "batch",
      "mode": "workflow",
      "target": "hook_pack",
      "status": "queued",
      "total_items": 2,
      "completed_items": 0,
      "failed_items": 0,
      "concurrency": 2,
      "input_summary": {
        "mode": "workflow",
        "target": "hook_pack",
        "item_count": 2
      },
      "output": null,
      "error": null,
      "created_at": "2026-03-25T12:00:00.000Z",
      "updated_at": "2026-03-25T12:00:00.000Z",
      "completed_at": null
    }
  ]
}
GET /batches/{batchId}
batches:read

Get a batch by id

Returns batch-level status, counts, and summary output.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

batchId path required

The batch id returned by `POST /batches`.

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/batches/{batchId} \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "id": "batch_123",
  "object": "batch",
  "mode": "workflow",
  "target": "hook_pack",
  "status": "queued",
  "total_items": 2,
  "completed_items": 0,
  "failed_items": 0,
  "concurrency": 2,
  "input_summary": {
    "mode": "workflow",
    "target": "hook_pack",
    "item_count": 2
  },
  "output": null,
  "error": null,
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:00.000Z",
  "completed_at": null
}
GET /batches/{batchId}/items
batches:read

List items in a batch

Returns one row per batch item so you can inspect per-item progress and run ids.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

batchId path required

The batch id returned by `POST /batches`.

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/batches/{batchId}/items \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "object": "list",
  "data": [
    {
      "id": "batch_item_123",
      "object": "batch_item",
      "batch_id": "batch_123",
      "index": 0,
      "target": "hook_pack",
      "status": "queued",
      "run_id": null,
      "input_summary": {
        "prompt": "Portable blender for busy professionals"
      },
      "output": null,
      "error": null,
      "created_at": "2026-03-25T12:00:00.000Z",
      "updated_at": "2026-03-25T12:00:00.000Z",
      "completed_at": null
    }
  ]
}
POST /batches
batches:write

Create a batch

Create a batch over workflows or selected generation operations. Each item becomes its own run when processed.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Required

Body Fields

mode string required

Use `workflow` for workflow batches or `operation` for supported primitive operations.

target string required

Workflow key or supported operation target such as `images.generations.create`.

concurrency number optional

How many items to process concurrently.

Default: 2

items array required

Array of batch items. Each item must have an `input` object.

curl Example

curl https://api.genfire.ai/v1/batches \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: unique_request_key" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "workflow",
  "target": "hook_pack",
  "concurrency": 2,
  "items": [
    {
      "input": {
        "prompt": "Portable blender for busy professionals"
      }
    },
    {
      "input": {
        "prompt": "Portable blender for college students"
      }
    }
  ]
}'

Response Example

{
  "id": "batch_123",
  "object": "batch",
  "mode": "workflow",
  "target": "hook_pack",
  "status": "queued",
  "total_items": 2,
  "completed_items": 0,
  "failed_items": 0,
  "concurrency": 2,
  "input_summary": {
    "mode": "workflow",
    "target": "hook_pack",
    "item_count": 2
  },
  "output": null,
  "error": null,
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:00.000Z",
  "completed_at": null,
  "items": [
    {
      "id": "batch_item_123",
      "object": "batch_item",
      "batch_id": "batch_123",
      "index": 0,
      "target": "hook_pack",
      "status": "queued",
      "run_id": null,
      "input_summary": {
        "prompt": "Portable blender for busy professionals"
      },
      "output": null,
      "error": null,
      "created_at": "2026-03-25T12:00:00.000Z",
      "updated_at": "2026-03-25T12:00:00.000Z",
      "completed_at": null
    },
    {
      "id": "batch_item_124",
      "object": "batch_item",
      "batch_id": "batch_123",
      "index": 1,
      "target": "hook_pack",
      "status": "queued",
      "run_id": null,
      "input_summary": {
        "prompt": "Portable blender for college students"
      },
      "output": null,
      "error": null,
      "created_at": "2026-03-25T12:00:00.000Z",
      "updated_at": "2026-03-25T12:00:00.000Z",
      "completed_at": null
    }
  ]
}

Request Example Body

{
  "mode": "workflow",
  "target": "hook_pack",
  "concurrency": 2,
  "items": [
    {
      "input": {
        "prompt": "Portable blender for busy professionals"
      }
    },
    {
      "input": {
        "prompt": "Portable blender for college students"
      }
    }
  ]
}

Notes

  • Current operation batches support `images.generations.create` and `videos.generations.create`.
  • Workflow batches support any workflow listed by `GET /workflows`.
  • Items in `operation`-mode batches accept the same body fields as the operation `target` — e.g. `quality` and `resolution` are honored when batching `images.generations.create`.

Reference

Webhooks

GET /webhooks
webhooks:read

List webhook endpoints

Returns webhook destinations registered for the authenticated account.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/webhooks \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "object": "list",
  "data": [
    {
      "id": "wh_123",
      "object": "webhook_endpoint",
      "url": "https://example.com/webhooks/genfire",
      "description": "Agency production endpoint",
      "status": "active",
      "events": [
        "run.completed",
        "run.failed"
      ],
      "signing_secret_preview": "gfwsec_1234...abcd",
      "created_at": "2026-03-25T12:00:00.000Z",
      "updated_at": "2026-03-25T12:00:00.000Z",
      "last_delivery_at": null
    }
  ]
}
GET /webhooks/deliveries
webhooks:read

List webhook deliveries

Returns delivery attempts for the authenticated account.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

endpoint_id query optional

Optional webhook endpoint id to filter deliveries.

limit query optional

Maximum number of deliveries to return.

Default: 25

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/webhooks/deliveries \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "object": "list",
  "data": [
    {
      "id": "delivery_123",
      "object": "webhook_delivery",
      "endpoint_id": "wh_123",
      "event_type": "run.completed",
      "run_id": "run_img_123",
      "batch_id": null,
      "status": "success",
      "attempt_count": 1,
      "max_attempts": 6,
      "response_status": 200,
      "response_body": "ok",
      "last_error": null,
      "request_headers": {
        "X-GenFire-Signature": "sha256=..."
      },
      "created_at": "2026-03-25T12:00:05.000Z",
      "updated_at": "2026-03-25T12:00:05.000Z",
      "last_attempt_at": "2026-03-25T12:00:05.000Z",
      "next_attempt_at": null,
      "delivered_at": "2026-03-25T12:00:05.000Z"
    }
  ]
}
POST /webhooks
webhooks:write

Create a webhook endpoint

Registers a webhook destination and returns the signing secret once.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Body Fields

url string required

Public HTTPS endpoint that will receive webhook POST requests.

description string optional

Optional human-readable label for the endpoint.

events array optional

Optional list of event types to subscribe to.

Default: ["run.completed","run.failed"]

curl Example

curl https://api.genfire.ai/v1/webhooks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com/webhooks/genfire",
  "description": "Agency production endpoint",
  "events": [
    "run.completed",
    "run.failed"
  ]
}'

Response Example

{
  "id": "wh_123",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks/genfire",
  "description": "Agency production endpoint",
  "status": "active",
  "events": [
    "run.completed",
    "run.failed"
  ],
  "signing_secret_preview": "gfwsec_1234...abcd",
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:00:00.000Z",
  "last_delivery_at": null,
  "signing_secret": "gfwsec_live_example_secret"
}

Request Example Body

{
  "url": "https://example.com/webhooks/genfire",
  "description": "Agency production endpoint",
  "events": [
    "run.completed",
    "run.failed"
  ]
}

Notes

  • Store the signing secret immediately. It is only returned when the endpoint is created.
POST /webhooks/deliveries/{deliveryId}/replay
webhooks:write

Replay a webhook delivery

Queues a new delivery attempt for an existing webhook delivery record.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

deliveryId path required

The webhook delivery id.

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/webhooks/deliveries/{deliveryId}/replay \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "id": "delivery_456",
  "object": "webhook_delivery",
  "endpoint_id": "wh_123",
  "event_type": "run.completed",
  "run_id": "run_img_123",
  "batch_id": null,
  "status": "pending",
  "attempt_count": 0,
  "max_attempts": 6,
  "response_status": null,
  "response_body": null,
  "last_error": null,
  "request_headers": {
    "X-GenFire-Signature": "sha256=..."
  },
  "created_at": "2026-03-25T12:00:05.000Z",
  "updated_at": "2026-03-25T12:00:05.000Z",
  "last_attempt_at": null,
  "next_attempt_at": null,
  "delivered_at": null
}
PATCH /webhooks/{endpointId}
webhooks:write

Update a webhook endpoint

Update a webhook URL, description, status, or subscribed events.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

endpointId path required

The webhook endpoint id.

Body Fields

url string optional

New destination URL.

description string | null optional

New description or `null` to clear it.

status string optional

Use `active` or `disabled`.

events array optional

Replacement list of subscribed event types.

curl Example

curl https://api.genfire.ai/v1/webhooks/{endpointId} \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "disabled"
}'

Response Example

{
  "id": "wh_123",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks/genfire",
  "description": "Agency production endpoint",
  "status": "disabled",
  "events": [
    "run.completed",
    "run.failed"
  ],
  "signing_secret_preview": "gfwsec_1234...abcd",
  "created_at": "2026-03-25T12:00:00.000Z",
  "updated_at": "2026-03-25T12:05:00.000Z",
  "last_delivery_at": null
}

Request Example Body

{
  "status": "disabled"
}
DELETE /webhooks/{endpointId}
webhooks:write

Delete a webhook endpoint

Deletes the webhook endpoint. The endpoint id is no longer usable after deletion.

Auth: Bearer API key or OAuth access token
Idempotency-Key: Not required

Parameters

endpointId path required

The webhook endpoint id.

Body Fields

No body fields for this endpoint.

curl Example

curl https://api.genfire.ai/v1/webhooks/{endpointId} \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

204 No Content
Copied to clipboard