Tokenify
Get API keyConsole
Menu

Image generation API

3 image models through one API key, for generating and editing images, called with the OpenAI or Gemini SDK or plain HTTP, and billed per image with no plan. From $0.018/image, prices as of 2026-11-29.

Get API key
Use in your agent

Connect the Tokenify MCP server

Paste this into the agent’s chat:

Claude Code

Add the Tokenify MCP server for all my projects by running: claude mcp add --transport http --scope user tokenify https://api.tokenify.dev/mcp — then tell me to start a new conversation, where you will ask me to sign in.

Codex

Add the Tokenify MCP server by running: codex mcp add tokenify --url https://api.tokenify.dev/mcp — then tell me to restart Codex and sign in with Authenticate next to tokenify in Settings > MCP servers (in a terminal: codex mcp login tokenify).

In Claude (claude.ai or the desktop app): open Connectors, choose Add custom connector and enter https://api.tokenify.dev/mcp. Claude opens Tokenify to sign in. On a Team or Enterprise plan an owner adds it for the organisation.

A browser opens to sign in and pick the project to spend from. The agent quotes each generation and, by default, asks you before one that costs $1 or more.

In a terminal instead
Claude Code
claude mcp add --transport http tokenify https://api.tokenify.dev/mcp
Codex
codex mcp add tokenify --url https://api.tokenify.dev/mcp
codex mcp login tokenify
No MCP in your client? Paste a prompt instead

With a key in TOKENIFY_API_KEY

Read https://www.tokenify.dev/agents.md — it describes the Tokenify API, at https://api.tokenify.dev. Use it to generate images with bytedance/seedream-5.0-flash, with the key in my TOKENIFY_API_KEY environment variable. Tell me the price before each call, and ask me first if this task's total could reach $1 or more, or if you cannot work out what a call will cost. Save every result into this project: decode an image that comes back inline, and download anything returned as a link, because links expire after 7 days.

Every image model, per image

ModelPer imageLarger sizesLargestReference images
bytedance/seedream-5.0-pro$0.036
at 1K
no size sent: 2K, $0.072
$0.072
above 2.61 megapixels
4.62 megapixels1 free, then $0.0024 each
for each image returned
bytedance/seedream-5.0-lite$0.028
at 2048x2048
the same price16.78 megapixelsfree
bytedance/seedream-5.0-flash$0.018
at 2K
the same price4.62 megapixelsfree

A reference image is charged for every image a request returns: three references on a model with one free make two charged references per image.

Prices updated , from the catalogue the gateway bills from.

Which one to use

Call it from the code you already have

The same call works in OpenAI's images shape or the Gemini API's, and the image docs have the sizes each model accepts. The samples below are written for Seedream 5.0 Flash; each model's own page has samples sized for it.

import base64
from openai import OpenAI

# max_retries=0: a resent request after a dropped connection is a second,
# billed image.
client = OpenAI(base_url="https://api.tokenify.dev/v1", api_key="YOUR_TOKENIFY_KEY", max_retries=0)

res = client.images.generate(
model="bytedance/seedream-5.0-flash",
prompt="A still life of three pears, soft window light",
size="2K",
)
open("out.jpg", "wb").write(base64.b64decode(res.data[0].b64_json))

Questions people ask before signing up

How is image generation priced?

Per image, not per token. Some models charge more above a size, and a request that names no size gets the model’s default, which can be the dearer one — the table gives the default, the price at it and the size where the price steps up. Nothing is charged for an image that was refused.

Which image model here is cheapest?

Seedream 5.0 Flash, at $0.018 an image at 2K.

Can I keep using the OpenAI or Gemini SDK?

Yes. The OpenAI SDK's images calls and the Gemini API's generateContent both reach the same models with the same key. Point the base URL at us and use a Tokenify key.

Can I edit an image I already have?

Yes — send it with the prompt and the model works from it instead of starting from nothing. Some models charge for reference images beyond a free allowance, for every image the request returns; the table gives each model’s figures.

Can I generate several images in one request?

Yes. One image is the default; the OpenAI shape takes n and the Gemini shape a candidate count, and each image returned is billed as one.

Can I try it with the free credit?

Yes. The trial credit covers images, so the first images cost nothing.

How long is a generated image kept?

Depending on the call, the image comes back in the response itself or as a link to our storage; a link works for 7 days. The image docs say which call returns which.

The families

Last updated 2026-11-24. Prices come from the live catalogue at the time this page was built.