Base URL
Authentication
All endpoints use Bearer token authentication. Pass your ModelsLab API key in theAuthorization header:
Endpoints
Chat Completions
OpenAI-compatible chat completions endpoint. Works with OpenAI SDKs, LangChain, and any OpenAI-compatible client.
Messages
Anthropic-compatible messages endpoint. Works with the Anthropic SDK, Claude Code, and any Anthropic-compatible client.
Function Calling
Enable models to call functions and tools. Supports both OpenAI and Anthropic tool use formats.
Advanced Parameters
Detailed reference for sampling, penalties, streaming, response formatting, and more.
Count Tokens
Count the number of tokens in a message before sending it. Useful for managing costs and context windows.
List Models
Retrieve the list of all available LLM models and their capabilities.
Coding Tools Integration
Use ModelsLab with Claude Code, Codex, Cursor, Continue, Aider, and other AI coding assistants.
SDK Compatibility
ModelsLab’s LLM API is designed as a drop-in replacement for both OpenAI and Anthropic APIs. Just change the base URL and API key:- OpenAI SDK
- Anthropic SDK
- Claude Code (CLI)
Supported Models
Browse all available LLM models at modelslab.com/models/category/llmaster, or use the List Models endpoint to fetch them programmatically. Popular models include:- Qwen 2.5 VL 72B — Vision-language model with strong reasoning
- DeepSeek R1 — Advanced reasoning model
- Llama 3.1 70B/405B — Meta’s open-source flagship models
- Mistral Large — Mistral AI’s most capable model
- And 200+ more…

