API for AI agents: image, video, speech, music and transcription tools in one MCP server
Updated 2026-11-25
APIMODELS is a tool API for AI agents: one key and one MCP server for image generation, video generation, text-to-speech, music, transcription and media extraction, across 180+ models from Google, OpenAI, ByteDance, Kuaishou, MiniMax, Suno and others. Use it when your agent has to produce or read media, not only text.
We run apimodels.app, so this page describes our own service. Prices come from our model pages and reliability figures from the last 30 days of production traffic, the same numbers as the public reliability page.
Coding agents and assistants such as Claude Code, Codex, Cursor and ChatGPT are good at planning a video, a product shot or a podcast, but they cannot render one. A tool API fills that gap: the agent calls generate_video or text_to_speech itself, waits for the result and keeps working, with no human copying files between apps.
What the agent can do
The agent does not need to know model ids in advance: list_models returns every callable id grouped by type, and get_balance shows what is left. review_image lets the agent look at its own output and regenerate when the result misses the brief.
| MCP tool | What it does | Example models | Price |
|---|---|---|---|
| generate_image | Text-to-image and editing with reference images | Nano Banana 2.1, GPT Image 2.6, Nano Banana Pro, Seedream | from $0.01 per image (GPT Image 2.6 Flare); Nano Banana 2.1 $0.022 at 1K |
| generate_video | Text-to-video and image-to-video; long jobs return a task id | Seedance 2.0, Kling 4.0, Veo 3.1, MiniMax H3, Wan 3.0 | from $0.045 per second (Wan 3.0) |
| text_to_speech, clone_voice | Voice-over in many languages, custom voices | MiniMax Speech, ElevenLabs | per character, see the voice pages |
| generate_audio | Songs with vocals or instrumental, sound effects, dubbing | Suno v5 and v6, ElevenLabs sound effects | Suno $0.26 per call, two songs |
| transcribe_audio | Speech to text with word timestamps and speaker labels, or translation | Nemotron 3.5 Transcribe | $0.0025 per audio minute |
| extract_media | Turns a TikTok, Instagram, YouTube, X or Pinterest link into the media file, caption and counts | Media Downloader | from $0.004 per link |
| chat, embed | Language models and embeddings on the same key | GPT, Claude, Gemini, DeepSeek, Qwen | per token |
Connect it to your agent
Signing in creates a dedicated key named "MCP · app · date" for that client, so you never paste a key into a chat or a config file, and you can cut one client off by deleting its key in the console. The hosted server waits up to 50 seconds per call; a video that is still rendering comes back as a task id the agent collects later with get_task.
| Client | How to add it |
|---|---|
| Claude.ai and Claude Desktop | Settings → Connectors → Add custom connector, URL https://api.apimodels.app/mcp, then Connect and Authorize. Works on every Claude plan; Free allows one custom connector. |
| ChatGPT | Add a custom connector (remote MCP server) with https://api.apimodels.app/mcp, then sign in and authorize when asked. |
| Claude Code | claude mcp add --transport http apimodels https://api.apimodels.app/mcp |
| Codex | Add the url to ~/.codex/config.toml, then run codex mcp login apimodels. |
| Cursor | Add the url to ~/.cursor/mcp.json, then click Authenticate under Customize → MCPs. |
| Anything else on your computer | npx -y apimodels-mcp install finds Claude Code, Codex, Claude Desktop, Cursor, VS Code, Windsurf, Gemini CLI and OpenCode and asks before adding apimodels to each. |
What happens when a model fails
An agent running unattended cannot retry by hand, so failures are handled on our side. When an upstream errors, rate-limits or times out, the job is retried once and then moved to another channel that serves the same model, with the same task id. Over the last 30 days, 90.6% of image jobs and 39.3% of video jobs whose first attempt failed were still delivered this way, and 28 of 77 listed models succeeded on 99.9% of calls.
Calls that still fail are not billed, and the balance is prepaid, so a looping agent cannot run up a bill larger than what you topped up. Every call has a request id, and GET /v1/records/{id} returns the exact amount it cost.
Without MCP: plain HTTP and webhooks
Agent frameworks such as the OpenAI Agents SDK, LangGraph, CrewAI or n8n can call the same models as ordinary HTTP tools. Chat models use the OpenAI-compatible base URL https://api.apimodels.app/v1; image, video and audio jobs are created on /v1/images/generations, /v1/video/generations and /v1/audio/generations, return a task id, and can post the result to your callback_url when they finish.
When APIMODELS is not the right tool
If your agent only needs language models at high volume, an LLM router such as OpenRouter offers many more text models and LLM-specific routing controls; our strength is media. If you need a contractual SLA, we publish measured success rates but do not sign one. If your data cannot leave your own servers, this is a hosted service and will not fit.
If you want songs to land in your own Suno library or need one vendor's official terms, use that vendor's own MCP server where one exists.
Quick start
Remote MCP URL
https://api.apimodels.app/mcpClaude Code
claude mcp add --transport http apimodels https://api.apimodels.app/mcpCursor (~/.cursor/mcp.json)
{
"mcpServers": {
"apimodels": { "url": "https://api.apimodels.app/mcp" }
}
}Codex
# ~/.codex/config.toml
[mcp_servers.apimodels]
url = "https://api.apimodels.app/mcp"
# then, in a terminal:
codex mcp login apimodelscURL
curl -X POST https://api.apimodels.app/v1/images/generations \
-H "Authorization: Bearer $APIMODELS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "nano-banana-2-1", "prompt": "Studio product photo of a ceramic coffee mug on oak, soft window light", "aspect_ratio": "16:9", "resolution": "1K"}'
# returns {"data": {"taskId": "...", "state": "pending"}}; poll until state is "completed":
curl "https://api.apimodels.app/v1/images/generations?task_id=TASK_ID" -H "Authorization: Bearer $APIMODELS_API_KEY"FAQ
What is the best API for AI agents that need to create images or video?
One that the agent can call on its own and that does not break when a single provider does. APIMODELS gives the agent image, video, speech, music and transcription tools through one MCP server, retries and switches channels when an upstream fails, and does not bill calls that still fail. If you only need one model and already have that vendor's account, its own API is simpler.
Is there a free API for AI agents?
There is no free tier, but new accounts get $0.10 of credit, enough for four Nano Banana 2.1 images at 1K. After that you pay per call from a prepaid balance, with no subscription; failed calls are free.
How do I give an AI agent an API key safely?
Do not paste one in. Connect the hosted MCP server and sign in: it creates a separate key for that client, which you can delete in the console at any time without touching your other integrations. Because the balance is prepaid, the most an agent can spend is what you topped up.
Can an agent wait for a video to finish?
Yes. generate_video waits up to 50 seconds on the hosted server and then hands back a task id; the agent calls get_task until the video is ready, which usually takes one to a few minutes. Over plain HTTP, pass callback_url and the result is posted to you.
Does it work with ChatGPT?
Yes, as a custom connector: add https://api.apimodels.app/mcp as a remote MCP server in ChatGPT and sign in when asked. The same URL works in Claude, Claude Code, Codex and Cursor.
Do I pay when the agent's call fails?
No. Only delivered results are billed. Content-policy refusals and malformed requests are also free, though the agent has to change the prompt or parameters to get past them.
