Get started with MAIA Router in minutes. Create an API key, then call a model from your app.
Create an API Key Go to "API Keys" and add a new key. Keep it secret. Go to API Keys
Call a model (JavaScript with OpenAI SDK)
Replace YOUR_API_KEY with the key you created.
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'YOUR_API_KEY',
baseURL: '<https://api.maiarouter.ai/v1>'
});
const completion = await client.chat.completions.create({
model: 'maia/gemini-2.5-flash',
messages: [
{ role: 'user', content: 'Hello MAIA!' }
]
});
console.log(completion.choices[0].message.content);
Call a model (Python with OpenAI SDK)
Install the OpenAI Python library first:
pip install openai
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="<https://api.maiarouter.ai/v1>"
)
completion = client.chat.completions.create(
model="maia/gemini-2.5-flash",
messages=[
{"role": "user", "content": "Hello MAIA!"}
]
)
print(completion.choices[0].message.content)
Call a model (cURL)
Quick test from your terminal.
curl <https://api.maiarouter.ai/v1/chat/completions> \\
-H "Authorization: Bearer YOUR_API_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"model": "maia/gemini-2.5-flash",
"messages": [
{
"role": "user",
"content": "Hello MAIA!"
}
]
}'
<https://api.maiarouter.ai/v1>
<https://api.maiarouter.ai/v1/chat/completion>
Create video:
Endpoint :
POST <https://api.maiarouter.ai/v1/videos>
cURL Example :
curl --location '<https://api.maiarouter.ai/v1/videos>' \\
--header 'Content-Type: application/json' \\
--header 'Authorization: Bearer sk-123' \\
--data '{
"model": "sora-2",
"prompt": "A beautiful sunset over the ocean"
}'
Remix video :
Endpoint :