API overview

The Mira API is compatible with the OpenAI format, making migration easy. Authenticate with your API key and send requests to our endpoints.

Base URL

https://api.vmira.ai/v1

Authentication

Include your API key in the Authorization header:

Header
Authorization: Bearer sk-mira-YOUR_API_KEY
Never expose your API key in client-side code or public repositories. Store keys in environment variables.

OpenAI compatibility

The Mira API is fully compatible with the OpenAI format. If you're already using the OpenAI SDK, just change the base URL and API key:

Migration from OpenAI
# Before (OpenAI)
OPENAI_API_KEY=sk-xxx
OPENAI_BASE_URL=https://api.openai.com/v1

# After (Mira)
OPENAI_API_KEY=sk-mira-xxx
OPENAI_BASE_URL=https://api.vmira.ai/v1

Available endpoints

POST/v1/chat/completionsCreate a chat completion
GET/api/v1/modelsList available models
POST/v1/embeddingsCreate text embeddings
POST/api/v1/api-keysCreate an API key
GET/api/v1/auth/me/usageGet usage data

Rate limits

Rate limits are applied per API key. If you exceed the limit, requests will return a 429 status code.

TierLimit
Free20 requests/day
Pro500 requests/day
MaxUnlimited

Next steps