llms.txt
AIMLAPI β Unified AI/ML API. Documentation portal
One API to access 500+ AI models for chat, image, video, audio, code, embeddings and vision. Single integration for OpenAI, Anthropic, Google, Meta, ByteDance, DeepSeek, Kling AI, Alibaba Cloud, MiniMax, ElevenLabs and more.
Authentication
API Key via Authorization header:
Authorization: Bearer YOUR_AIMLAPI_KEY
Key Links
Compatibility
OpenAI-compatible API
Anthropic-compatible API
Supports streaming responses
Supports multimodal inputs
Supports tool calling / function calling
Supports JSON mode for compatible models
Supports batching for Anthropic models
Production Usage
Use exponential backoff for retries
Monitor usage via Billing and Logs dashboards
Model availability may vary by provider
Some models support asynchronous generation workflows
Async Workflows
POST /v2/generate/videoPOST /v2/generate/audioPoll generation status using returned generation IDs
SDKs
Base URL: https://api.aimlapi.com
Core Endpoints
POST /v1/chat/completionsβ Chat completion docsPOST /v1/images/generationsβ Image generation docsPOST /v2/generate/videoβ Video generation docsPOST /v1/stt/createβ Speech-to-Text API overviewPOST /v1/ttsβ Text-to-Speech API overviewPOST /v2/generate/audioMusic API overviewPOST /v1/embeddingsβ Embeddings docsGET /v1/modelsβ List all available models (see Models List in Key Links)GET /v2/billingβ [Get user balance info] (https://docs.aimlapi.com/api-references/service-endpoints/account-balance)
Example Request
cURL example:
curl -X POST https://api.aimlapi.com/v1/chat/completions -H "Authorization: Bearer YOUR_AIMLAPI_KEY" -H "Content-Type: application/json" -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'
Capabilities
chat β’ image-generation β’ video-generation β’ music-generation β’ speech-to-text β’ text-to-speech β’ embeddings β’ vision β’ code-generation β’ reasoning β’ function-calling β’ streaming β’ web-search β’ batching
Extended Resources
Last updated
Was this helpful?