Quickstart
Get a Mira API key from platform.vmira.ai — keys start with sk-mira-. Once you have one, the fastest path is:
Base URL
https://api.vmira.ai/v1cURL
bash
curl https://api.vmira.ai/v1/chat/completions \
-H "Authorization: Bearer $MIRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mira",
"messages": [
{"role": "user", "content": "Hello, Mira."}
]
}'Python — official OpenAI SDK
The Mira surface is OpenAI-compatible, so the official openai package works unchanged — only the base URL and key change.
python
from openai import OpenAI
client = OpenAI(
api_key="sk-mira-...",
base_url="https://api.vmira.ai/v1",
)
resp = client.chat.completions.create(
model="mira",
messages=[{"role": "user", "content": "Explain quantum tunneling like I'm a chemist."}],
)
print(resp.choices[0].message.content)JavaScript — official OpenAI SDK
typescript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.MIRA_API_KEY,
baseURL: "https://api.vmira.ai/v1",
});
const resp = await client.chat.completions.create({
model: "mira",
messages: [{ role: "user", content: "What's surprising about TLS 1.3?" }],
});
console.log(resp.choices[0].message.content);Response shape
json
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1779800000,
"model": "mira",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "..." },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 142,
"total_tokens": 154
}
}