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.

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

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

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

  • Video generate

    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.