---
title: "Generate image"
method: POST
path: "/api/agents/generate/image"
---

# Generate image

`POST /api/agents/generate/image`

## Request

- Base URL: `https://splice.film.fun`
- URL: `https://splice.film.fun/api/agents/generate/image`
- Auth: API key in header `x-api-key`

Text-to-image (and optional reference/style). Uses default production if production_id omitted.

## Request body

- object
  - `production_id` string
  - `prompt` string, required
  - `modelId` string
  - `model` string
  - `width` number
  - `height` number
  - `negativePrompt` string
  - `referenceImage` string
  - `referenceImages` string[]
  - `styleImage` string
  - `characterReference` string
  - `seed` number
  - `steps` number
  - `cfgScale` number
  - `aspectRatio` string
  - `aspect_ratio` string
  - `tags` string[]
  - `production_item_metadata` object
  - `parameters` object

## Response `201`

Generated

- ProductionItemId
  - `production_item_id` string, required

## Other responses

- `400`: Validation failed
- `401`: Unauthorized
- `404`: Production not found
- `503`: Generate failed

---

[API](https://skmtc.dev/film/apis/film-fun-splice-agent-api.md) · [All operations](https://skmtc.dev/film/apis/film-fun-splice-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/film/apis/film-fun-splice-agent-api/revisions/72c22f361c20?raw)
