aimlapi-chat
Installation
SKILL.md
Call text models
Three text protocols. Keep the one the code uses: switching is usually the base URL and the key.
| Protocol | Endpoint | SDK base URL | Auth header |
|---|---|---|---|
| OpenAI Chat Completions | POST /v1/chat/completions |
https://api.aimlapi.com/v1 |
Authorization: Bearer $AIMLAPI_API_KEY |
| OpenAI Responses | POST /v1/responses, GET /v1/responses/{id} |
https://api.aimlapi.com/v1 |
Authorization: Bearer … |
| Anthropic Messages | POST /v1/messages |
https://api.aimlapi.com (the SDK adds /v1/messages) |
x-api-key (what the Anthropic SDK sends) or Authorization: Bearer … |
When to use
- A chatbot, agent, summarizer or RAG pipeline
- "Use AI/ML API instead of OpenAI / Anthropic" in existing code
- Streaming output, tool/function calling, JSON that follows a schema
- Asking a model about an image, PDF, audio or video
- Embeddings