Use OpenAI SDK with MaxonForge
If your code already uses the OpenAI SDK, you can call Claude, GPT, Gemini and the other catalogue models by changing the base URL. The request and response format stays the same, including streaming.
Set it up
- 1
Create an API key
Top up from ₹100 and create a key in Dashboard → API Keys. Store it in an environment variable, never in source code.
- 2
Python
Pass base_url when you create the client.
from openai import OpenAI import os client = OpenAI( api_key=os.environ["MAXONFORGE_API_KEY"], base_url="https://www.maxonforge.com/v1", ) resp = client.chat.completions.create( model="MODEL_ID", messages=[{"role": "user", "content": "Hello"}], ) print(resp.choices[0].message.content) - 3
Node.js
Pass baseURL when you create the client.
import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.MAXONFORGE_API_KEY, baseURL: "https://www.maxonforge.com/v1", }); const resp = await client.chat.completions.create({ model: "MODEL_ID", messages: [{ role: "user", content: "Hello" }], }); console.log(resp.choices[0].message.content);
Check that it works
List the models your key can call:
curl https://www.maxonforge.com/v1/models -H "Authorization: Bearer sk_mf_your_key"
Replace sk_mf_your_key with your key and MODEL_ID with an ID from the catalogue.
Models you can use with OpenAI SDK
USD per 1M tokens. Use the model ID exactly as shown. List price is the provider's published rate.
| Model ID | You pay in / out | List in / out |
|---|---|---|
| gpt-6-astra | $1.00 / $5.00 | $10.00 / $50.00 |
| claude-fable-5-1 | $1.00 / $5.00 | $10.00 / $50.00 |
| claude-fable-5 | $1.00 / $5.00 | $10.00 / $50.00 |
| claude-opus-5-5 | $0.400 / $2.00 | $4.00 / $20.00 |
| claude-opus-5 | $0.500 / $2.50 | $5.00 / $25.00 |
| claude-sonnet-5-5 | $0.240 / $1.20 | $2.00 / $10.00 |
Common errors
401
The key is missing, mistyped or revoked.
Copy the key again from Dashboard → API Keys. MaxonForge website keys start with sk_mf_.
402 insufficient_credits
The prepaid balance cannot cover the request. Nothing was charged.
Top up from ₹100 in Dashboard → Top up, then retry the same call.
404 model_not_found
The model ID is not in the published catalogue.
Copy an exact ID from the model catalogue at /models.
Questions
- Does streaming work?
- Yes. Set stream=True (Python) or stream: true (Node) exactly as with OpenAI.
- Can I use the Anthropic SDK instead?
- Yes. MaxonForge also serves the Anthropic Messages format; set the Anthropic client's base URL to https://www.maxonforge.com.
- How do I check my balance from code?
- GET https://www.maxonforge.com/v1/usage with your key returns the remaining prepaid balance.
Get a key and start from ₹100
Pay with UPI or card. Credit never expires, and every request is metered at the published rate.