MillGPT API
Use every MillGPT chat model from your own code, with one key and your mills balance. The API speaks the OpenAI chat format, so most OpenAI libraries and tools work once you change the base URL and the key.
Your API keys
How to call it
Base URL:
https://api.millgpt.com/v1
With curl:
curl https://api.millgpt.com/v1/chat/completions \
-H "Authorization: Bearer $MILLGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "claude-sonnet-5-5", "messages": [{"role": "user", "content": "Hello"}]}'
With the OpenAI library for Python:
from openai import OpenAI
client = OpenAI(base_url="https://api.millgpt.com/v1", api_key=MILLGPT_API_KEY)
reply = client.chat.completions.create(
model="gemini-3.8-flash",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)
GET https://api.millgpt.com/v1/models lists the models and their prices. Send "stream": true to receive the reply as it is written.
What it costs
•
What the model's provider charges, plus 5%, in mills. Every reply reports what it cost in usage.mills.
•
Any mills in your balance can be spent here, including free ones.
•
While a request runs, enough mills for its prompt and a long reply are set aside. What it does not use is returned when it ends.
•
To stop a streamed reply, send POST /chat/completions/{id}/stop with your key, where {id} is the id in the reply's chunks. The reply then ends with what it cost, and you pay only for what was written.
•
Closing the connection is not a reliable stop: the reply may still be written to its end and charged in full.
What works today
•
Text chat with every public chat model, streaming, and reasoning_effort for models that have it.
•
Not yet: pictures, tools and function calling, web search, and image, video and audio models.
•
Settings such as temperature and max_tokens are accepted but not used yet.