For the builders
A familiar starting point.
Room for more models.
An integration outline for the planned Modtrix text API. Learn the request shape and how usage will be billed before access opens.
Integration preview. Create and manage credentials in the Console. The examples are templates for the planned model API.
Create an API key
Register or sign in to the Console and create a key. Save it when it appears. Future model access will require an enabled account and a supported model.
Keep your key on the server
Store your API key and base URL in environment variables. Never include a secret key in browser code, public repositories, or shared screenshots.
Choose a model and send text
The planned interface follows the OpenAI-compatible chat completions format. Send a model ID and a list of text messages. Final compatibility details will be documented at launch.
Track token usage
Input and output are priced separately. Conversation history counts as input. Any model-specific reasoning, cache, or optional charges will be documented before they are enabled.
curl "$MODTRIX_BASE_URL/chat/completions" \
-H "Authorization: Bearer $MODTRIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID",
"messages": [
{"role": "user", "content": "Hello, Modtrix."}
]
}'import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["MODTRIX_BASE_URL"],
api_key=os.environ["MODTRIX_API_KEY"],
)
response = client.chat.completions.create(
model="MODEL_ID",
messages=[
{"role": "user", "content": "Hello, Modtrix."}
],
)
print(response.choices[0].message.content)The cURL example uses Bash. MODTRIX_BASE_URL must include the version path supplied at launch.
We’re starting with text.
Text input. Text output. No media generation.
The billing model
A request.
Two clear components.
Each model has its own input and output rate. Billable reasoning, where applicable, is included in output usage according to the model’s accounting.
Input tokens × input rate ÷ 1M
Output tokens × output rate ÷ 1M
For standard, uncached text requests. Check model-specific pricing conditions.
Try the cost estimatorA conversation away
Let’s build what comes next.
Tell us what you’re building. We’ll share availability and help you plan your integration.