OpenClaude connects to AI/ML API through its OpenAI-compatible endpoint at https://api.aimlapi.com/v1.
AI/ML API is an aggregating gateway that exposes many chat models behind a single OpenAI-compatible API. OpenClaude ships a first-class AI/ML API provider preset: it stores credentials under AIMLAPI_API_KEY, sends the OpenClaude attribution headers, and discovers chat-capable models from the public /models catalog. It defaults to gpt-4o.
None. You don't need to visit https://aimlapi.com first — the guided top-up flow below can create an AI/ML API account and issue a key for you. If you already have a key from the dashboard, you can paste it directly instead.
- Start OpenClaude and run
/provider. - Choose AI/ML API, then confirm the default model (Step 1 of 2).
- Step 2 of 2 — choose how to get an API key:
- Top up and get API key — enter your AI/ML API email and password (an account is created automatically if you don't have one yet), pick a top-up amount ($20–$10,000) and payment method (card or crypto), complete payment in the browser, and OpenClaude saves the issued key for you.
- Enter existing API key — paste a key you already have from the AI/ML API dashboard.
Either way, the base URL (https://api.aimlapi.com/v1) and default model (gpt-4o) are filled in automatically.
Switch models any time with /model — only chat-capable models from the AI/ML API catalog are listed.
Run the same guided top-up flow non-interactively:
openclaude aimlapi topup --email you@example.com --amount 25 --method card- Credentials: pass
--email(or setAIMLAPI_EMAIL) and setAIMLAPI_PASSWORD; if either is missing you're prompted interactively (password entry is hidden). --amount: top-up amount in USD (min 20, max 10000; defaults to 25).--method:card(Stripe, default) orcrypto(NOWPayments).--model: default model id written into the provider profile (defaults togpt-4o).--no-open: print the payment URL instead of auto-opening a browser.
The issued key is written into OpenClaude's provider profile automatically once payment clears.
Setting AIMLAPI_API_KEY alone is enough; OpenClaude auto-detects the AI/ML API route:
export AIMLAPI_API_KEY="your-aimlapi-key"To configure the OpenAI-compatible route explicitly:
export CLAUDE_CODE_USE_OPENAI=1
export AIMLAPI_API_KEY="your-aimlapi-key"
export OPENAI_BASE_URL="https://api.aimlapi.com/v1"
export OPENAI_MODEL="gpt-4o"OPENAI_API_KEY also works as a fallback credential for the route.
/statusshows AI/ML API as the active provider with thehttps://api.aimlapi.com/v1base URL./modellists chat-capable models discovered from the catalog.- Send any prompt to confirm responses come back from the selected model.
- Model discovery uses the public, unauthenticated
GET /modelsendpoint and surfaces only chat-completions models; image, audio, embeddings, and other modalities are intentionally not routed through the coding workflow. - Requests carry
X-AIMLAPI-Integration-*attribution headers (owner/repo/version) plus theHTTP-Referer: OpenClaudeandX-Title: OpenClaudeheaders that AI/ML API uses to attribute integration traffic. - Usage (
/usage) reporting is not supported for this provider.