AI/ML API
AI · AI
Chat, embeddings, OCR, and image generation across models on their own key.
Acts as the person, not as itself
Each user connects their own account. Every call carries both identities — the agent and the person it is acting for — so the agent can never reach past what that individual can already do.
Credentials never touch the agent
Tokens live in the vault and attach server-side at call time. The agent holds a session, not a secret, and revoking access does not mean rotating a key.
Every call on the record
Who asked, which agent acted, which action ran, and the verdict that let it through — one audit trail across every integration, not one per vendor.
What an agent can do
Each action is granted on its own. An agent allowed to read is not thereby allowed to write, and the scope beside each row is what the acting user must have connected for it to run at all.
aimlapi_get_model_by_idREADGet Model via GET /model/{id}. Gets one model by id or alias (`gpt-4o` and `openai/gpt-4o` both resolve), with its release date, developer, context length, maximum output, training cutoff and pricing. Answers with or without a credential.
aimlapi_get_models_metricsREADGet Model Metrics via GET /models/metrics. Latency and throughput percentiles (p50/p75/p90/p99 for total duration, time to first token and tokens per second) over a recent window, per model and endpoint. Narrow it with `aliases`. Answers with or without a credential.
aimlapi_get_v1_batchesREADGet Batch via GET /v1/batches. Fetches a batch created by Create Batch, by its `id`. An unknown id answers 404 'Inference not found'; omitting the id answers 400 'Query validation error!'.
aimlapi_get_v1_billing_balanceREADGet Balance via GET /v1/billing/balance. The account's current credit balance with the time it was last updated, whether it is below the low-balance threshold, and the auto-debit status. A balance of zero is why inference calls answer 403 'You've run out of funds' while management calls keep working.
aimlapi_get_v1_keyREADGet Current API Key via GET /v1/key. The metadata of the key most recently used for inference -- prefix, name, disabled state, model-access scopes, spending limit and monthly usage. No key material is returned. Answers 404 'No used inference API key found' when the account has made no inference call yet, which is an empty result rather than an error.
aimlapi_get_v1_keysREADList API Keys via GET /v1/keys. Lists the account's API keys by PREFIX -- the first 8 characters, the same value the dashboard shows -- with each key's name, whether it is disabled, its model-access scopes, its spending limit and its monthly usage. No key material is returned. This call is itself gated by a per-key endpoint permission: a key without it is refused with 403 'This endpoint is not allowed for this API key', which is a permission to enable at aimlapi.com/app/keys, not a bad key.
aimlapi_get_v1_modelsREADList Models via GET /v1/models. Lists every model AI/ML API serves, with its developer, context length, modalities, capabilities and pricing. Filter with `type`, `tags`, `modalities`, `input_modalities`, `output_modalities` or `capabilities`, or name one with `id`. This is how to find a valid `model` value for any inference call -- the catalogue changes often enough that AI/ML API publishes a deprecations feed for it. Answers with or without a credential.
aimlapi_get_v1_models_deprecationsREADList Model Deprecations via GET /v1/models/deprecations. Lists models that are deprecated or withdrawn, each with the date it was deprecated, the date it shuts down, the reason and the model that replaces it. Check this before pinning a model id: a withdrawn id stops answering. Answers with or without a credential.
aimlapi_get_v1_responses_response_idREADGet Model Response via GET /v1/responses/{response_id}. Fetches a response created by Create Model Response, by its id. This is how a `background: true` response is polled. An unknown id answers 404 'Inference not found'.
aimlapi_get_v1_stt_generation_idREADGet Transcription via GET /v1/stt/{generation_id}. Fetches a transcription started by Create Transcription, by its generation id. An unknown id answers 404 'Inference not found'.
aimlapi_get_v2_billingREADGet Billing Summary via GET /v2/billing. The account's current balance and currency (the v2 billing generation). Shorter than Get Balance; use Get Balance for the low-balance and auto-debit state.
aimlapi_get_v2_billing_detailREADGet Billing Detail via GET /v2/billing/detail. The account holder's id and email beside the current balance, currency and the auto top-up settings (whether it is enabled, the threshold that triggers it and the amount it adds).
aimlapi_get_v2_billing_transactionsREADList Billing Transactions via GET /v2/billing/transactions. The account's billing ledger: top-ups, charges, bonuses, refunds, adjustments, model usage, expired credits. Filter by `from`/`to` date, `direction` (TOPUP or CHARGE) or `type`; page with `limit` (up to 100) and the `cursor` the previous page returned.
aimlapi_get_v2_generate_audioREADGet Audio Generation via GET /v2/generate/audio. Fetches an audio generation started by Generate Audio, by its `generation_id`. An unknown id answers 404 'Inference not found'.
aimlapi_get_v2_logsREADList Request Logs via GET /v2/logs. The account's per-request log: which model, which key prefix, whether it succeeded, what it cost. Supply either `period` or BOTH `start` and `end` -- with neither, the call is refused with 400 'Query validation error!'. Filter by `model`, `key_prefix` or `status`, and page with `limit` (up to 100) and `offset`.
aimlapi_get_v2_usageREADGet Usage Summary via GET /v2/usage. Total spend and request count over a period. Supply either `period` (for example `24h`) or BOTH `start` and `end` -- with neither, the call is refused with 400 'Query validation error!'. Narrow to one key with `key_prefix`.
aimlapi_get_v2_usage_detailREADGet Usage Detail via GET /v2/usage/detail. Spend and request counts broken down by day, by model, or by both (`group_by`). Supply either `period` or BOTH `start` and `end` -- with neither, the call is refused with 400 'Query validation error!'. `tz` sets the timezone day boundaries are cut on.
aimlapi_get_v2_video_generationsREADGet Video Generation via GET /v2/video/generations. Fetches a video generation started by Generate Video, by its `generation_id`. Video generation is slow, so this is the poll call. An unknown id answers 404 'Inference not found'.
aimlapi_post_v1_batchesWRITECreate Batch via POST /v1/batches. Submits a batch of inference requests for asynchronous processing. `requests` is an ARRAY of items, each with its own `custom_id` and `params`; the call is refused with 400 naming `requests` if it is missing. Returns a batch id to poll with Get Batch.
aimlapi_post_v1_batches_cancel_batch_idWRITECancel Batch via POST /v1/batches/cancel/{batch_id}. Cancels a batch that is still running, by its id. Requests already completed inside the batch are not undone -- this stops the ones that have not run. An unknown id answers 404 'Inference not found'.
aimlapi_post_v1_chat_completionsWRITECreate Chat Completion via POST /v1/chat/completions. The OpenAI-compatible chat completion call, and the main inference entry point: send `model` and `messages`, get a completion. Which further arguments are accepted depends on the model family the `model` id selects -- this schema is the union of every family's, so the provider, not this schema, decides whether `reasoning_effort` or `top_k` means anything for the model you chose, and says so in a 400 naming the exact field. Find a valid `model` with List Models.
aimlapi_post_v1_embeddingsWRITECreate Embeddings via POST /v1/embeddings. Turns `input` text into embedding vectors with the chosen embedding `model`. `dimensions` and `encoding_format` are accepted by the model families that support them.
aimlapi_post_v1_images_editsWRITEEdit Image via POST /v1/images/edits. Edits an existing `image` from a `prompt`, optionally confined to a `mask`. `n`, `size`, `quality`, `background` and `output_format` control the result.
aimlapi_post_v1_images_generationsWRITEGenerate Image via POST /v1/images/generations. Generates images from a `prompt` with the chosen image `model`. The arguments a given model takes vary widely -- `image_size`, `aspect_ratio`, `num_images`, `guidance_scale`, `seed`, `output_format`, safety and acceleration knobs -- and this schema is the union of every image family's; the provider refuses the ones the chosen model does not know, naming the field.
aimlapi_post_v1_messagesWRITECreate Message via POST /v1/messages. The Anthropic-compatible messages call: send `model`, `messages` and `max_tokens`, get a message. `system`, `tools`, `tool_choice`, `thinking`, `stop_sequences` and `metadata` follow Anthropic's own shapes. Use Create Chat Completion for the OpenAI-shaped equivalent.
aimlapi_post_v1_ocrWRITERun OCR via POST /v1/ocr. Extracts text from a `document` (a URL or base64 payload) with an OCR model. `pages` limits which pages are read and `include_image_base64` returns the page images alongside the text.
aimlapi_post_v1_responsesWRITECreate Model Response via POST /v1/responses. The OpenAI Responses-API call: send `model` and `input`, get a response object. Supports stateful conversation through `previous_response_id`, server-side storage through `store`, hosted tools through `tools`, and `background` for long runs -- poll a background response with Get Model Response.
aimlapi_post_v1_stt_createWRITECreate Transcription via POST /v1/stt/create. Starts a transcription of an audio `url` with a speech-to-text `model`. Returns a generation id; fetch the text with Get Transcription. Diarization, punctuation, redaction, summarization and intent/topic detection are available on the model families that support them.
aimlapi_post_v1_ttsWRITECreate Speech via POST /v1/tts. Turns `text` into audio with a text-to-speech `model` and a `voice`. Voice, format, sample-rate and prosody arguments differ by provider family and this schema is their union.
aimlapi_post_v2_generate_audioWRITEGenerate Audio via POST /v2/generate/audio. Starts a music or audio generation from a `prompt` (and `lyrics`, for the models that sing) with an audio `model`. Returns a generation id; fetch the result with Get Audio Generation.
aimlapi_post_v2_generate_audio_preprocessWRITEPreprocess Reference Audio via POST /v2/generate/audio/preprocess. Prepares a `reference_audio_url` for the audio models that clone or cover a reference track, returning the handle those models take.
aimlapi_post_v2_video_generationsWRITEGenerate Video via POST /v2/video/generations. Starts a video generation from a `prompt` and/or an `image_url` with a video `model`. Returns a generation id; fetch the result with Get Video Generation. Duration, aspect ratio, resolution, audio and reference-image arguments vary by model family and this schema is their union.
Often connected alongside
Put AI/ML API behind one governed endpoint.
Same permissions, same audit trail, whatever else you connect next.