---
title: "Generate Image"
method: POST
path: "/tools/generate/image"
tags: ["accepts-api-key"]
---

# Generate Image

`POST /tools/generate/image`

## Request

- Base URL: `https://api.tellers.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tellers.ai/tools/generate/image`
- Auth: none declared

## Headers

- `x-api-key` string, nullable
- `authorization` string, nullable

## Request body

- GenerateImageRequest
  - `prompt` string, required: Text prompt for image generation.
  - `model` 'p-image' | 'ideogram' | 'gpt-image' | 'gpt-image-2.5-sunburst' | 'gpt-image-2.5-flare' | 'gpt-image-2' | 'banana' | 'banana-pro' | 'banana-flash' | 'seedream' | 'seedream-pro': Model to use.
  - `format` '16:9' | '9:16' | '1:1' | '3:2' | '2:3' | '4:3' | '3:4', nullable: Aspect ratio. Defaults to 16:9. Left unset so an explicit choice can be told from the default — a model that would ignore it rejects it rather than silently producing another shape.
  - `resolution` '1k' | '1.5k' | '2k' | '4k', nullable: Output resolution. Used by gpt-image (maps to pixel dimensions) and banana models (1k / 2k / 4k). Ignored by p-image.
  - `width` integer, nullable: Custom output width in pixels for Seedream. Must be supplied together with height.
  - `height` integer, nullable: Custom output height in pixels for Seedream. Must be supplied together with width.
  - `input_frame` union: Source image, enabling edit/compose mode. An asset id, or an object pinning `timestamp_seconds` / `is_last_frame` when the asset is a video — see GET /tools/models.
    - string
    - AssetFrameRef: A single frame of an asset — mirrors the tools' ``AssetFrame``.
      - `asset_id` string, required: The asset to take the frame from.
      - `timestamp_seconds` number, nullable: Which frame to take, in seconds, when the asset is a video. Ignored if `is_last_frame` is true. Defaults to the first frame.
      - `is_last_frame` boolean: Take the asset's final frame, ignoring `timestamp_seconds`.
      - `crop` AssetImageCropRef: Optional edge insets — mirrors the tools' ``AssetImageCrop``.
        - `crop_l` number, nullable
        - `crop_r` number, nullable
        - `crop_t` number, nullable
        - `crop_b` number, nullable

## Response `200`

Successful Response

- GenerateImageResponse
  - `asset_id` string, required

## Other responses

- `402`: Not enough Tellers tokens to run this tool. The call was refused before the tool ran, so nothing was charged. Buy more tokens or wait for the next subscription grant.
- `403`: The account's email is not verified yet, so it cannot spend tokens. Nothing was charged. `detail.code` is `EMAIL_NOT_VERIFIED`.
- `413`: The account is already using all the storage its plan allows, and a generation would add another file. Nothing was charged and no provider was called. Delete files or move to a plan with more storage; `GET /users/me` reports both the usage and the quota.
- `422`: Validation Error

---

[API](https://skmtc.dev/tellers/apis/tellers-api.md) - [All operations](https://skmtc.dev/tellers/apis/tellers-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tellers/apis/tellers-api/revisions/fdaa0fa44a26?raw)
