Volver al catálogo

AI/ML API MCP

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.

Acciones
25
Triggers
0
Autenticación
—
OAuth gestionado
No
Información técnica: el detalle de parámetros, schemas y triggers de esta página está pensado para equipos de integración. Si solo necesitas saber si tu herramienta favorita está disponible, basta con ver la lista de acciones.

Acciones disponibles (25)

Cada acción es una operación que el agente puede ejecutar contra este conector. Haz clic en una acción para ver sus parámetros.

Account balanceAI_ML_API_MCP_ACCOUNT_BALANCEAcción

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).

Parámetros de entrada

Sin parámetros.

Parámetros de salida

Sin parámetros.

Account usageAI_ML_API_MCP_ACCOUNT_USAGEAcción

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).

Parámetros de entrada

Sin parámetros.

Parámetros de salida

Sin parámetros.

Audio generateAI_ML_API_MCP_AUDIO_GENERATEAcción

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.

Parámetros de entrada

  • modelstringObligatorio

    AIMLAPI music model id or alias, e.g. "elevenlabs/eleven_music". Find others with models_list (modality "audio") or jev_model_search.

  • paramsobject

    Model-specific request fields, sent to the model as they are, e.g. { "lyrics": "…" } for a song with vocals; the length field differs by model, e.g. { "music_length_ms": 30000 } (ElevenLabs) or { "seconds_total": 30 } (Stable Audio). Field names and allowed values differ by model: see its API reference on docs.aimlapi.com.

  • promptstringObligatorio

    The music to generate, in plain words: genre, mood, instruments, subject.

  • idempotency_keystring

    Optional key that makes a resubmit safe: the same key returns the same job without starting (or charging) a second generation. Without a key, the same request within 24 hours is deduplicated the same way; send a new key to generate again on purpose.

Parámetros de salida

Sin parámetros.

Document ocrAI_ML_API_MCP_DOCUMENT_OCRAcción

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.

Parámetros de entrada

  • modelstringObligatorio

    AIMLAPI OCR model id, e.g. "mistral/mistral-ocr-latest" or "google/gc-document-ai". Find others with jev_model_search (kind "ocr").

  • paramsobject

    Model-specific request fields, sent to the model as they are, e.g. { "pages": [0, 1] } to read some pages only, or { "mimeType": "application/pdf" } for Google. Field names and allowed values differ by model: see its API reference on docs.aimlapi.com.

  • documentanyObligatorio

    The document, in the shape the model expects. Mistral and Zhipu models: { "type": "document_url", "document_url": "https://…/file.pdf" } or { "type": "image_url", "image_url": "https://…/page.png" }. Google: the document URL as a string, with `params.mimeType`.

Parámetros de salida

Sin parámetros.

Embeddings createAI_ML_API_MCP_EMBEDDINGS_CREATEAcción

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).

Parámetros de entrada

  • inputanyObligatorio

    One text, or an array of texts embedded in one call (one vector each, in the same order).

  • modelstringObligatorio

    AIMLAPI embedding model id, e.g. "text-embedding-3-small". Find others with models_list (modality "embedding").

  • dimensionsinteger

    Length of the returned vectors, for models that can shorten them (e.g. OpenAI text-embedding-3-small and -large). Omit it for the model's full length.

  • encoding_formatstringenum

    How each vector comes back: "float" (the default), an array of numbers; or "base64", a base64 string of its float32 values — smaller, but it has to be decoded.

    floatbase64

Parámetros de salida

Sin parámetros.

Image editAI_ML_API_MCP_IMAGE_EDITAcción

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.

Parámetros de entrada

  • modelstringObligatorio

    AIMLAPI image-editing model id, e.g. "openai/gpt-image-2" or "x-ai/grok-imagine-image". Other edit models (Nano Banana edit, Qwen image edit, Flux Kontext) run through image_generate with `params.image_url(s)`; jev_model_search names the tool for each.

  • paramsobject

    Model-specific request fields, sent to the model as they are, e.g. { "size": "1024x1024", "quality": "high" } for OpenAI models, or { "resolution": "1k" } for grok-imagine. Field names and allowed values differ by model: see its API reference on docs.aimlapi.com.

  • promptstringObligatorio

    The change to make to the images, in plain words.

  • mask_urlstringuri

    URL of a mask image, for models that take one (OpenAI gpt-image): transparent where the image should change.

  • image_urlsstring[]Obligatorio

    URLs of the images to edit: 1–16 (grok-imagine takes up to 5), JPEG, PNG or WebP, each up to 20 MiB, and the request is refused when all of them together pass the platform's per-request file budget. Public URLs and image_generate outputs both work.

Parámetros de salida

Sin parámetros.

Image generateAI_ML_API_MCP_IMAGE_GENERATEAcción

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).

Parámetros de entrada

  • modelstringObligatorio

    AIMLAPI image model id or alias, e.g. "flux/schnell". Find others with models_list (modality "image") or jev_model_search.

  • paramsobject

    Model-specific request fields, sent to the model as they are, e.g. { "size": "1024x1024" } (OpenAI models) or { "image_size": "landscape_16_9", "num_images": 2 } (most others), plus the input image — { "image_url": "https://…" } or { "image_urls": ["https://…"] } — for a model that edits images or turns them into 3D models. Field names and allowed values differ by model: see its API reference on docs.aimlapi.com.

  • promptstringObligatorio

    What to generate, in plain words — or, for an editing model, the change to make to the input image. Required here even for a model that takes only an image (image-to-3D), which ignores it.

Parámetros de salida

Sin parámetros.

Jev model searchAI_ML_API_MCP_JEV_MODEL_SEARCHAcción

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`.

Parámetros de entrada

  • kindstringenum

    Optional: the kind of model, when you already know it — skips one step and costs less.

    chatimageimage_editvideottssttmusicembeddingsocrdecisions3d
  • limitinteger

    Most models to return (1-30, default 10).

  • querystringObligatorio

    The model you need, in plain words, e.g. "generate images with readable text", "transcribe a meeting and label speakers", "cheap fast chat model with tool calling".

Parámetros de salida

Sin parámetros.

Jev tool searchAI_ML_API_MCP_JEV_TOOL_SEARCHAcción

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.

Parámetros de entrada

  • limitinteger

    Most tools to return (1-20, default 8).

  • querystringObligatorio

    What you need done, in plain words, e.g. "get the Google reviews of a restaurant", "recent posts from a public Facebook group", "current share price of NVIDIA".

Parámetros de salida

Sin parámetros.

Job resultAI_ML_API_MCP_JOB_RESULTAcción

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.

Parámetros de entrada

  • job_idstringObligatorio

    The job id returned by video_generate, audio_generate or speech_transcribe — or by image_generate, image_edit, llm_chat, speech_generate or document_ocr when they answered with a job because the result took too long.

  • include_rawboolean

    speech_transcribe jobs only: also return the provider document (speakers, timestamps) as `result.raw` (default false: `result.text` only). Long recordings give large documents.

Parámetros de salida

Sin parámetros.

Job statusAI_ML_API_MCP_JOB_STATUSAcción

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.

Parámetros de entrada

  • job_idstringObligatorio

    The job id returned by video_generate, audio_generate or speech_transcribe — or by image_generate, image_edit, llm_chat, speech_generate or document_ocr when they answered with a job because the result took too long.

Parámetros de salida

Sin parámetros.

Llm chatAI_ML_API_MCP_LLM_CHATAcción

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.

Parámetros de entrada

  • ninteger

    How many alternative replies the model generates (default 1). With n > 1 the tool returns every reply in `choices`, the first one also in `content`; every reply is billed. A model whose card does not list n returns one reply.

  • seedinteger

    An integer for best-effort repeatable sampling: the same seed, model and parameters tend to give the same reply. Not every model supports it, and none guarantees it.

  • stopany

    A string, or a list of strings, at which the model stops writing; the stop text itself is not included in the reply.

  • modelstringObligatorio

    AIMLAPI model id or alias, e.g. "gpt-5" or "claude-opus-4-8". Find ids with models_search, models_list or jev_model_search.

  • toolsobject[]

    Functions the model may ask to call, in OpenAI format: [{ "type": "function", "function": { "name": "…", "description": "…", "parameters": { JSON Schema } } }]. The model does not run them: its calls come back in `tool_calls`, and you send each result back as a { "role": "tool", "tool_call_id": "…", "content": "…" } message. These are your own functions, not AIMLAPI Agent Tools (tools_run). Only for models with the `tools` capability.

  • top_pnumber

    Nucleus sampling, 0–1: the model picks only among the most likely tokens whose probabilities add up to top_p (0.1 = the top 10%). Omit it for the model default.

  • streamboolean

    How the gateway reads the reply from the model: as a stream (true, the default) or in one response (false). This tool returns the complete reply either way; it does not stream to you.

  • messagesobject[]Obligatorio

    OpenAI-style chat messages, oldest first; each is an object like { "role": "user"|"assistant"|"system"|"tool", "content": "…" }. For a model with the `vision` capability, `content` can be an array of parts such as { "type": "image_url", "image_url": { "url": "https://…" } }.

  • providerstring

    Pin the request to one upstream provider of the model, e.g. "openai" or "google": only that provider is tried, with no fallback to others, and a parameter it does not support is an error instead of being dropped. Omit it (or "auto") to let AIMLAPI use the primary provider and fall back to others. A provider the model does not have is an error that lists the available ones.

  • max_tokensinteger

    Most tokens the model may generate — the older OpenAI name of the limit, kept for compatibility. Same limit as max_completion_tokens: AIMLAPI sends the value under whichever name the provider expects, so the two fields set the same limit; on reasoning models it also covers the hidden reasoning tokens. Set one; if both are set, max_completion_tokens wins.

  • temperaturenumber

    Sampling temperature, 0–2: higher gives more varied replies, lower more focused and repeatable ones. Omit it for the model default; set temperature or top_p, not both.

  • tool_choiceany

    Whether the model calls one of `tools`: "auto" (the default with tools — the model decides), "none", "required" (it must call one), or { "type": "function", "function": { "name": "…" } } to force that function.

  • response_formatobject

    Reply format. { "type": "json_object" } asks for valid JSON; { "type": "json_schema", "json_schema": { "name": "…", "schema": { … }, "strict": true } } asks for JSON that matches the schema. Only for models with the `structured_output` capability; omit it for plain text.

  • presence_penaltynumber

    -2 to 2. Positive values lower the chance of any token that has already appeared, which nudges the model toward new topics. Default 0.

  • reasoning_effortstringenum

    How much a model with the `reasoning` capability thinks before answering: "none", "minimal", "low", "medium", "high", "xhigh" or "max" — more effort is slower and uses more (billed) tokens. Each model accepts its own subset (some have no "none"), and a level the model does not accept is an error. A model without reasoning ignores it, unless `provider` is set.

    noneminimallowmediumhighxhighmax
  • frequency_penaltynumber

    -2 to 2. Positive values lower the chance of a token the more often it has already appeared, which reduces word-for-word repetition. Default 0.

  • max_completion_tokensinteger

    Most tokens the model may generate — the newer OpenAI name of the limit, preferred. Same limit as max_tokens: AIMLAPI sends the value under whichever name the provider expects, so the two fields set the same limit; on reasoning models it also covers the hidden reasoning tokens. Set one; if both are set, max_completion_tokens wins.

Parámetros de salida

Sin parámetros.

Model getAI_ML_API_MCP_MODEL_GETAcción

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.

Parámetros de entrada

  • idstringObligatorio

    Model id or alias, e.g. "gpt-5" or "claude-opus-4-8".

Parámetros de salida

Sin parámetros.

Models compareAI_ML_API_MCP_MODELS_COMPAREAcción

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.

Parámetros de entrada

  • idsstring[]Obligatorio

    2–10 model ids or aliases to compare side by side.

Parámetros de salida

Sin parámetros.

Models find bestAI_ML_API_MCP_MODELS_FIND_BESTAcción

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`.

Parámetros de entrada

  • limitinteger

    How many top models to return (default 5, max 50).

  • modalitystringenum

    Only models of this kind: text (LLMs), image, video, audio, embedding, ocr or other (derived from the model tags).

    textimagevideoaudioembeddingocrother
  • max_pricenumber

    Maximum comparable USD price for the model's headline unit, normalized to 1,000,000 units (per 1M tokens for LLMs, per 1M seconds for video, etc.). A model priced per request option (resolution, duration, audio) matches when its cheapest option does. Most meaningful paired with a `modality` filter; models priced on request are excluded.

  • min_contextinteger

    Minimum context window, in tokens.

  • capabilitiesstring[]

    Required capabilities — ALL must be present. Curated vocabulary, e.g. `tools`, `streaming`, `vision`, `reasoning`, `structured_output`, `web_search`, `audio`, `file_input`, `image_to_video`.

  • optimize_forstringObligatorioenum

    'cheapest' ranks by comparable price — a model priced per request option by its cheapest option (models priced on request are excluded); 'fastest' ranks by median (p50) time to first token over recent traffic, or median duration for a model without one (models with no recent traffic are excluded).

    cheapestfastest

Parámetros de salida

Sin parámetros.

Models listAI_ML_API_MCP_MODELS_LISTAcción

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.

Parámetros de entrada

  • limitinteger

    Maximum models to return (default 50, max 200).

  • cursorstring

    Pagination cursor from a previous response's `next_cursor`.

  • modalitystringenum

    Only models of this kind: text (LLMs), image, video, audio, embedding, ocr or other (derived from the model tags).

    textimagevideoaudioembeddingocrother
  • max_pricenumber

    Maximum comparable USD price for the model's headline unit, normalized to 1,000,000 units (per 1M tokens for LLMs, per 1M seconds for video, etc.). A model priced per request option (resolution, duration, audio) matches when its cheapest option does. Most meaningful paired with a `modality` filter; models priced on request are excluded.

  • min_contextinteger

    Minimum context window, in tokens.

  • capabilitiesstring[]

    Required capabilities — ALL must be present. Curated vocabulary, e.g. `tools`, `streaming`, `vision`, `reasoning`, `structured_output`, `web_search`, `audio`, `file_input`, `image_to_video`.

Parámetros de salida

Sin parámetros.

Models searchAI_ML_API_MCP_MODELS_SEARCHAcción

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.

Parámetros de entrada

  • limitinteger

    Maximum models to return (default 50, max 200).

  • querystringObligatorio

    Text to find in the model id, aliases, name, description or tags (case-insensitive). The whole query is matched as one substring, so use one keyword, e.g. "flux" or "whisper".

  • cursorstring

    Pagination cursor from a previous response's `next_cursor`.

  • modalitystringenum

    Only models of this kind: text (LLMs), image, video, audio, embedding, ocr or other (derived from the model tags).

    textimagevideoaudioembeddingocrother
  • max_pricenumber

    Maximum comparable USD price for the model's headline unit, normalized to 1,000,000 units (per 1M tokens for LLMs, per 1M seconds for video, etc.). A model priced per request option (resolution, duration, audio) matches when its cheapest option does. Most meaningful paired with a `modality` filter; models priced on request are excluded.

  • min_contextinteger

    Minimum context window, in tokens.

  • capabilitiesstring[]

    Required capabilities — ALL must be present. Curated vocabulary, e.g. `tools`, `streaming`, `vision`, `reasoning`, `structured_output`, `web_search`, `audio`, `file_input`, `image_to_video`.

Parámetros de salida

Sin parámetros.

PingAI_ML_API_MCP_PINGAcción

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.

Parámetros de entrada

Sin parámetros.

Parámetros de salida

Sin parámetros.

Speech generateAI_ML_API_MCP_SPEECH_GENERATEAcción

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.

Parámetros de entrada

  • textstringObligatorio

    The text to read aloud.

  • modelstringObligatorio

    AIMLAPI text-to-speech model id or alias, e.g. "openai/gpt-4o-mini-tts" or "elevenlabs/eleven_multilingual_v2". Find others with jev_model_search (kind "tts").

  • voicestring

    The voice, from the model provider's own list, e.g. "alloy" for OpenAI models. Omit it for the model default where it has one; a voice the model does not have is an error.

  • paramsobject

    Model-specific request fields, sent to the model as they are, e.g. { "response_format": "mp3", "speed": 1.2 } for OpenAI models, or { "output_format": "mp3_44100_128" } for ElevenLabs. Field names and allowed values differ by model: see its API reference on docs.aimlapi.com.

Parámetros de salida

Sin parámetros.

Speech transcribeAI_ML_API_MCP_SPEECH_TRANSCRIBEAcción

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.

Parámetros de entrada

  • modelstringObligatorio

    AIMLAPI speech-to-text model id or alias, e.g. "deepgram/nova-2-general" or "openai/gpt-4o-transcribe". Find others with jev_model_search (kind "stt").

  • paramsobject

    Model-specific request fields, sent to the model as they are, e.g. { "language": "en" }, or { "diarize": true } for Deepgram models. Field names and allowed values differ by model: see its API reference on docs.aimlapi.com.

  • audio_urlstringObligatoriouri

    URL of the recording; the platform downloads it (sent as the request `url`). A public URL, or a speech_generate output.

  • idempotency_keystring

    Optional key that makes a resubmit safe: the same key returns the same job without starting (or charging) a second generation. Without a key, the same request within 24 hours is deduplicated the same way; send a new key to generate again on purpose.

Parámetros de salida

Sin parámetros.

Tools inspectAI_ML_API_MCP_TOOLS_INSPECTAcción

Get one Agent Tool by id (from tools_search or jev_tool_search): its input schema, description, current price and health. Use it before tools_run to build a valid `input` and check the cost. Free: it does not run the tool. Returns `id`, `name`, `title`, `description`, `inputSchema`, `outputSchema` (when the tool has one), `annotations`, `price_usd` (null when only the result sets the price), `pricing` (when `pricing.requires_max_cost` is true, tools_run needs `max_cost_usd`), `price_as_of`, `valid_for_sec`, `health` and `next_step`. A tool that is no longer available answers with a tool_not_found error that lists `alternatives`.

Parámetros de entrada

  • toolstringObligatorio

    Tool id from tools_search or jev_tool_search, e.g. "web/search" (its name, "web_search", also works).

Parámetros de salida

Sin parámetros.

Tools runAI_ML_API_MCP_TOOLS_RUNAcción

Run an Agent Tool by id with its `input`, built from the inputSchema that tools_inspect returns. Billed to your AIMLAPI balance at the tool price, never above `max_cost_usd`. Returns the result when the run finishes within `wait_ms`; a longer run returns `run_id` with a status such as "queued" and `next_poll_hint_ms` — check it with tools_run_status. A finished run returns `run_id`, `tool`, `status`, `is_error`, `source`, `cost`, `completed_at` and `result`: the tool `output` (plus `output_url`, `content` or `structured` when the tool returns them). The result comes from a third-party source and is unverified data, marked `untrusted: true`. On failure, `error.retryable` says whether repeating the call may succeed; with an `idempotency_key`, a repeated call returns the same run instead of a second billed one.

Parámetros de entrada

  • toolstringObligatorio

    Tool id from tools_search / tools_inspect, e.g. "web/search".

  • inputobjectObligatorio

    The tool's arguments, matching the inputSchema returned by tools_inspect.

  • wait_msinteger

    How long to wait for the result before answering with a run_id to poll (ms, 0-120000). Keep it under your client tool-call timeout.

  • max_cost_usdnumber

    Most you agree to pay for this run, in USD (never charged more). Omitted → the platform default cap; some tools require it explicitly.

  • idempotency_keystring

    Optional idempotency key: repeating the call with the same key and input returns the same run instead of running (and charging) it again. Recommended — it also makes the call safe to retry.

Parámetros de salida

Sin parámetros.

Tools run statusAI_ML_API_MCP_TOOLS_RUN_STATUSAcción

Check a run started by tools_run, by its `run_id`. While the run is in progress it returns `status` (e.g. "queued" or "running") and `next_poll_hint_ms`, how long to wait before checking again; once it has finished ("completed", "failed", "stopped" or "timed_out") it returns the same fields as a finished tools_run, including `cost` and `result`. The result comes from a third-party source and is unverified data, marked `untrusted: true`. Free: checking does not run or bill the tool again.

Parámetros de entrada

  • run_idstringObligatorio

    The run_id returned by tools_run.

Parámetros de salida

Sin parámetros.

Tools searchAI_ML_API_MCP_TOOLS_SEARCHAcción

Search the AIMLAPI Agent Tools catalog for external tools that do what the query describes: web and news search, web page scraping and content extraction (read a URL), social media (Reddit, X, TikTok, YouTube, Instagram and more), company data, places and maps, and other data APIs. They run through AIMLAPI and are billed to the same account when run. Not offered: tools that keep state between calls, call or text people, or look up people's contact details or dossiers. Free: searching runs no tool. For a match ranked by fit with the cost of a typical run and cheaper equivalents, use jev_tool_search (paid). Returns `tools` (id, name, description, pricing, health) and `count`; next, call tools_inspect with an id for its input schema, then tools_run.

Parámetros de entrada

  • limitinteger

    Maximum number of matches (1-40, default 40).

  • querystringObligatorio

    What you need done, in plain words, e.g. "web search", "scrape a web page", "company enrichment by domain".

Parámetros de salida

Sin parámetros.

Video generateAI_ML_API_MCP_VIDEO_GENERATEAcción

Start generating a video from a text prompt — or from an image, with an image-to-video model — with an AIMLAPI video model. For images use image_generate, for music audio_generate. Billed to your AIMLAPI balance at the model's price, usually per second of video (see model_get). Returns at once with `job_id`, `kind`, `model` and status "processing": generation takes minutes, so check it with job_status and, once it is "complete", fetch the video 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.

Parámetros de entrada

  • modelstringObligatorio

    AIMLAPI video model id or alias, e.g. "kling-video/v1.6/standard". Find others with models_list (modality "video") or jev_model_search.

  • paramsobject

    Model-specific request fields, sent to the model as they are, e.g. { "duration": 5, "resolution": "720p", "aspect_ratio": "16:9" }, or { "image_url": "https://…" } for an image-to-video model. Field names and allowed values differ by model: see its API reference on docs.aimlapi.com.

  • promptstringObligatorio

    What happens in the video, in plain words.

  • idempotency_keystring

    Optional key that makes a resubmit safe: the same key returns the same job without starting (or charging) a second generation. Without a key, the same request within 24 hours is deduplicated the same way; send a new key to generate again on purpose.

Parámetros de salida

Sin parámetros.