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.
Use in your agent
Connect the Tokenify MCP server
Paste this into the agent’s chat:
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.
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 mcp add --transport http tokenify https://api.tokenify.dev/mcp
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
| Model | Per image | Larger sizes | Largest | Reference images |
|---|---|---|---|---|
Seedream 5.0 Pro20% off bytedance/seedream-5.0-pro | $0.036 at 1K no size sent: 2K, $0.072 | $0.072 above 2.61 megapixels | 4.62 megapixels | 1 free, then $0.0024 each for each image returned |
Seedream 5.0 Lite20% off bytedance/seedream-5.0-lite | $0.028 at 2048x2048 | the same price | 16.78 megapixels | free |
bytedance/seedream-5.0-flash | $0.018 at 2K | the same price | 4.62 megapixels | free |
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
- The cheapest image, for drafts and volumeSeedream 5.0 Flash$0.018 an image at 2K
- The largest imageSeedream 5.0 Liteup to 16.78 megapixels
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))from google import genai
from google.genai import types
client = genai.Client(
api_key="YOUR_TOKENIFY_KEY",
# their SDK defaults to v1; this endpoint answers on v1beta, as theirs does
http_options=types.HttpOptions(base_url="https://api.tokenify.dev", api_version="v1beta"),
)
res = client.models.generate_content(
model="seedream-5.0-flash",
contents="A still life of three pears, soft window light",
config=types.GenerateContentConfig(
response_modalities=["IMAGE"],
image_config=types.ImageConfig(image_size="2K"),
),
)
for part in res.candidates[0].content.parts:
if part.inline_data:
open("out.jpg", "wb").write(part.inline_data.data)curl https://api.tokenify.dev/v1/images/generations \
-H "Authorization: Bearer $TOKENIFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedream-5.0-flash",
"prompt": "A still life of three pears, soft window light",
"size": "2K"
}'# 1. Add Tokenify to Claude Code; it signs in through your browser the first time.
claude mcp add --transport http tokenify https://api.tokenify.dev/mcp
# 2. Then ask Claude Code:
# "Make an image of a paper boat on a pond with bytedance/seedream-5.0-flash, and save it into this project."
# It quotes the price first and, by default, asks you before anything
# that costs $1 or more.
# No MCP in your client? Paste this prompt instead:
# 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.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
- Seedream API — 3 models: Seedream 5.0 Pro, Seedream 5.0 Lite, Seedream 5.0 Flash.
Last updated 2026-11-24. Prices come from the live catalogue at the time this page was built.