Artificial Intelligence

AI/ML API MCP

AI/ML API MCP lets agents browse and compare hundreds of AI models, run chat, embedding, image, video, audio, speech and OCR generation, track jobs, and check account balance and usage.

Tools

This is a reference catalogue. Tools cannot be configured or run from this page.

  • Account balance

    Get the balance of the AIMLAPI account that owns this API key, and whether it is running low. Use it before a costly generation or after an insufficient_balance error; for what this key has spent and its spending limit, use account_usage. Free. Returns `balance_usd` and `low_balance_threshold_usd` (report amounts to the user in USD), `low_balance` (true when the balance is below that threshold) and `status`; `balance` and `low_balance_threshold` are the same amounts in API credits (2,000,000 credits = $1).

  • Account usage

    Get this API key's spending and the spending limit set on it, if any, with what is left of the limit. Use it to see how much a key has used or how close it is to its cap; for the money left on the account, use account_balance. Free. Returns `total_usage_usd` — the key's total spend since it was created (`total_usage` is the same in API credits, 2,000,000 credits = $1; `monthly_usage_usd` / `monthly_usage` are older, deprecated names for the same lifetime totals); `limit` — null when the key has no limit, otherwise `threshold` (the cap in USD), `retention` (the window the cap resets on: day, week or month; null for a lifetime cap), `spent_usd` and `remaining_usd` in the current window, and `window_start`; and `scopes` — the endpoint families the key may call, e.g. model:chat or model:image (null = all).

  • Audio generate

    Start generating music — a song with or without lyrics, or an instrumental — from a text prompt with an AIMLAPI music model. For text-to-speech use speech_generate, for speech-to-text speech_transcribe, for images image_generate, for video video_generate. Billed to your AIMLAPI balance at the model's price (see model_get). Returns at once with `job_id`, `kind`, `model` and status "processing": check it with job_status and, once it is "complete", fetch the audio URL with job_result. The same request again within 24 hours returns the job already started instead of a second billed generation; send a new `idempotency_key` to generate again on purpose.

  • Document ocr

    Read the text of a scanned document or an image (OCR) with an AIMLAPI OCR model. To ask questions about the text afterwards, pass it to llm_chat. Billed to your AIMLAPI balance at the model's price, usually per page (see model_get). Returns `untrusted: true`, `notice` and `result`: the model's body as the REST API gives it — for Mistral and Zhipu `pages[]` with each page's `markdown`, for Google a Document AI `document` — and `meta` (model, provider, usage). Large documents give large results: read a page range with `params.pages`; a result over 16 MiB is refused, and still billed. A result that takes longer than about a minute returns a `job_id` with status "processing" instead: fetch it with job_result.

  • Embeddings create

    Turn text into embedding vectors (lists of numbers that capture its meaning) with an AIMLAPI embedding model, for semantic search, retrieval, clustering or deduplication. To generate text, use llm_chat. Billed to your AIMLAPI balance per input token at the model's price (see model_get). Returns `model`, `data` (one { index, embedding } per input, in input order) and `usage` (the token counts billed).

  • Image edit

    Edit images with an OpenAI gpt-image or xAI grok-imagine model: give the images by URL and describe the change. For other edit models (Nano Banana edit, Qwen image edit, Flux Kontext), and to generate new images, use image_generate. Billed to your AIMLAPI balance at the model's price (see model_get); grok-imagine also bills an edit its moderation refuses. Returns the REST body as it is: `data`, one entry per output image with its `url` (or `b64_json`), and `meta` (model, provider, usage). An image URL that cannot be fetched, is not an image or is too large is refused with a validation_error naming the field and the reason, before anything is billed. A result that takes longer than about a minute returns a `job_id` with status "processing" instead: fetch it with job_result.

  • Image generate

    Generate images from a text prompt — or edit an image, or turn one into a 3D model, with a model that does that (the input image goes in `params`) — with an AIMLAPI image model. To edit with an OpenAI gpt-image or xAI grok-imagine model, use image_edit. For video use video_generate, for music audio_generate. Billed to your AIMLAPI balance at the model's price, often per image (see model_get). Returns the model's response as the REST API gives it: `data`, one entry per image with its `url` (or `b64_json` when the request asks for base64); `meta` (model, provider, usage); and, for an image-to-3D model, its own file fields such as `model_glb`, `model_urls` or `model_mesh`. A result that takes longer than about a minute returns a `job_id` with status "processing" instead: fetch it with job_result (job_status reports progress).

  • Jev model search

    Find the right AI model for a task described in plain words — chat and coding LLMs, image generation or editing, video, text-to-speech, speech-to-text, music, embeddings, OCR, 3D, classification — ranked by Jev (TypeSafe Jev, an AI model that judges how well each model in the AIMLAPI catalog fits the task). Use it when you know the job but not the model; to match a name or keyword use models_search, and to rank by price or speed alone use models_find_best (both free). About $0.002 per search, billed to your AIMLAPI balance; the same search within 10 minutes is free, and a key with no balance gets a free keyword match instead. Returns `models` (id, name, developer, kind, summary, `tier`, `fit`, `price` in the natural unit — per image, per second of video, per minute of audio, per 1M tokens — capabilities, context_length, and `quality` ratings where known), the `kind` and `priority` read from the need, `sort` (strong matches first and cheapest first, or best rated first when the need asks for the best), `nothing_fits`, `ranking` (jev, cache or fallback) and `search_cost_usd`. Each hit also names `tool`, the tool of this server that runs it (e.g. image_edit for gpt-image edits but image_generate for Nano Banana edit; null when none does, as for decisions models). There is no budget filter: compare the prices and pick. Next: model_get for every price option, then the hit's `tool`.

  • Jev tool search

    Find an API tool for a task described in plain words — web search, reading or scraping a web page, social media (X, Instagram, TikTok, Reddit, YouTube, Facebook, LinkedIn), maps and place reviews, SEO, stocks and crypto data, company data, jobs, real estate, weather, image tools and more — ranked by Jev (TypeSafe Jev, an AI model that judges how well each Agent Tool in the AIMLAPI catalog fits the task). Use it when you know the job but not the tool; tools_search searches the same catalog for free, without the ranking, typical-run prices or equivalents. About $0.002 per search, billed to your AIMLAPI balance; the same search within 10 minutes is free, and a key with no balance gets a free keyword match instead. Returns `tools` (id, name, provider, summary, `tier`, `fit`, the `price` of a typical run, `health`, and `equivalents`: the same job through another provider for the same price or less), `nothing_fits`, `sort` (how the list is ordered: strong matches first, cheapest first, tools that are down last), `ranking` (jev, cache or fallback) and `search_cost_usd`. Next: tools_inspect, then tools_run.

  • Job result

    Get the output of a job. Call it once job_status reports "complete" — or directly: an unfinished job comes back with status "processing" and `ready: false`, a failed one with status "error" and `error`. Returns `job_id`, `kind`, `model`, `status` and `result`, by kind: `video` / `audio` — `url` (plus `urls` for several outputs) and `usage`; `image` — what image_generate or image_edit returns (`data`, `meta`); `chat` — what llm_chat returns; `tts` — what speech_generate returns (`audio.url`, `meta`); `ocr` — what document_ocr returns (marked `untrusted: true`); `stt` — the transcript `text`, marked `untrusted: true`, plus `raw` (the provider document) with `include_raw: true`. Free: fetching never starts or bills a generation.

  • Job status

    Check how a generation job is going, without fetching its output. Jobs come from video_generate, audio_generate and speech_transcribe, and from image_generate, image_edit, llm_chat, speech_generate or document_ocr when they answered with a job_id. Returns `job_id`, `kind`, `model` and `status`: "processing" (still running; check again in a few seconds), "complete" (then call job_result for the output) or "error" (with `error`). Free: checking never starts or bills a generation.

  • Llm chat

    Get a reply from any AIMLAPI language model (the `model` parameter selects it) to a list of chat messages: text, code, reasoning, image understanding for vision models, and function calling with your own `tools`. For embeddings use embeddings_create; for images, video or music use image_generate, video_generate or audio_generate. Billed to your AIMLAPI balance at the model's price (see model_get). Returns the complete reply: `content`, `role`, `finish_reason`, `model`, `usage` (token counts) and `tool_calls` (the functions the model asked to call, or null); with `n` > 1 also `choices`, every reply with its own `index`, `content`, `finish_reason` and `tool_calls`. A reply that takes longer than about two minutes returns a `job_id` with status "processing" instead: fetch the reply with job_result.

  • Model get

    Get everything about one model, by id or alias: capabilities, input and output modalities, limits, the complete price list and recent performance metrics. Use it before running a model to check its price options and limits; to compare several models use models_compare. Free. Returns `id` (the canonical id) and `models`: one card PER endpoint the model is callable through (e.g. chat-completions and responses), each with its own `type`, `aliases`, `capabilities`, `modalities`, `info` (name, developer, description, context_length, output_max), `pricing` and `metrics` (TTFT / TPS / duration, p50–p99). Prices are USD with the margin applied: per-unit rates, and per-option rates under `pricing.variants` for models priced by resolution, duration or audio — when present, the variants are the price and `units` only lists what is metered, so a $0 or null unit there is not the price.

  • Models compare

    Compare 2–10 models side by side: capabilities, the full price list and recent performance metrics of each. Use it to choose between candidates you already have (from models_list, models_search or jev_model_search); for a single model use model_get. Free. Returns `models` (the same full cards as model_get; a model callable through several endpoints expands to one card per endpoint), `not_found` (ids that matched nothing, instead of failing), `stale` and `generated_at`. Prices are USD with the margin applied: per-unit rates, and per-option rates under `pricing.variants` for models priced by resolution, duration or audio — when present, the variants are the price and `units` only lists what is metered, so a $0 or null unit there is not the price.

  • Models find best

    Rank models by a single objective — the cheapest (optimize_for 'cheapest', by comparable price) or the fastest ('fastest', by median latency over recent traffic) — and return the top few. Use it for questions like "the cheapest image model" or "the fastest model with tool calling"; to browse the catalog without ranking use models_list, and to rank by how well models fit a described need use jev_model_search. Free. Add a `modality` filter so models are ranked like for like. Returns `optimize_for`, `results` (compact cards as in models_list, best first, with `latency_ms_p50` when ranking by speed), `excluded` (how many models could not be ranked and why: priced on request, priced in another unit, no recent traffic, or metrics unavailable), `stale` and `generated_at`.

  • Models list

    Browse the AIMLAPI model catalog: all models, or those matching filters (modality, maximum price, minimum context window, required capabilities), sorted by id and paginated. Use it to see what is available; to find a model by name or keyword use models_search, to rank models by price or speed use models_find_best, and to match a need described in plain words use jev_model_search. Free. Returns `models` (compact cards: id, name, type, modality, tags, capabilities, context_length, output_max, comparable_price), `total`, `next_cursor` (pass it as `cursor` for the next page; null on the last page), `stale` (true when an older copy of the catalog is served) and `generated_at`. For a model priced per request option, comparable_price is its cheapest option and `varies_by` names the request parameters that change it; model_get lists every rate and the speed metrics.

  • Models search

    Find AIMLAPI models whose id, aliases, name, description or tags contain a keyword (case-insensitive substring), optionally narrowed by the same filters as models_list. Use it when you know part of a name or a keyword, e.g. "flux", "whisper" or "claude"; to browse without a keyword use models_list, and for a need described in plain words ("a cheap model that reads invoices") use jev_model_search. Free. Returns the same fields and pagination as models_list.

  • Ping

    Check that the AIMLAPI MCP server is reachable and accepts your API key. Takes no input and returns the text "pong"; it runs no model and costs nothing. To see the balance, use account_balance.

  • Speech generate

    Read a text aloud with an AIMLAPI text-to-speech model and get a link to the audio file. For music use audio_generate; to turn speech into text use speech_transcribe. Billed to your AIMLAPI balance at the model's price, usually per character (see model_get). Returns the REST body as it is: `audio` with the file `url`, and `meta` (model, provider, usage). A result that takes longer than about a minute returns a `job_id` with status "processing" instead: fetch it with job_result.

  • Speech transcribe

    Start transcribing a recording (speech to text) with an AIMLAPI speech-to-text model, from a URL the platform downloads. To read text aloud use speech_generate. Billed to your AIMLAPI balance at the model's price, usually per second of audio (see model_get); the job result does not include the cost, which the AIMLAPI dashboard and `GET /v2/logs` show. Returns at once with `job_id`, `kind`, `model` and status "processing": check it with job_status and, once it is "complete", fetch the transcript with job_result — `result.text`, marked `untrusted: true` because it is the recording's content; job_result with `include_raw: true` adds the provider document (speakers, timestamps) as `result.raw`. Long recordings give large documents. The same request again within 24 hours returns the job already started instead of a second billed transcription; send a new `idempotency_key` to transcribe again on purpose.

Page 1 / 2Next