Skip to main content
The AI/ML API provider gives unified access to over 300+ AI models, including Deepseek, Gemini, ChatGPT, and others, via a single standardized interface. The models run with enterprise-grade rate limits and uptime, and are ideal for production use. You can sign up at aimlapi.com and view full provider documentation at docs.aimlapi.com.

Parameters

ParameterTypeDefaultDescription
idstr"gpt-4o-mini"The id of the model to use
namestr"AIMLAPI"The name of the model
providerstr"AIMLAPI"The provider of the model
api_keyOptional[str]NoneThe API key for AI/ML API (defaults to AIMLAPI_API_KEY env var)
base_urlstr"https://api.aimlapi.com/v1"The base URL for the AI/ML API
max_tokensint4096Maximum number of tokens to generate
AIMLAPI extends the OpenAI-compatible interface and supports most parameters from OpenAI.
I