AI Gateway API
One authenticated API for chat completions, image generation, text embeddings, PDF parsing, and audio transcription. Requests are routed to enabled provider models configured in the gateway.
Failover Routing
Automatic multi-provider token redirection patterns when core SLAs threshold limits drop.
Encrypted Transit
Cryptographic validation architecture processing requests through isolated OIDC environments.
Real-time Metrics
Granular pipeline insight tracing exact model weight execution prices and system overheads.
Quick Start Blueprint
Get started: Sign in to the developer portal and create an API key. Keep the secret on your server and send it in the X-API-Key header.
const response = await fetch('https://aiservice.prabisha.com/chat', {
method: 'POST',
headers: {
'X-API-Key': process.env.AI_SERVICE_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
messages: [{ role: 'user', content: 'Hello, AI Gateway!' }],
preferredProvider: 'GEMINI'
})
});
const result = await response.json();
console.log(result.data.content);
Available Endpoints
| Method | Path | Guide |
|---|---|---|
| POST | /chat | Chat completions |
| POST | /image | Image generation |
| POST | /embeddings | Text embeddings |
| POST | /documents/parse | PDF document parsing |
| POST | /transcript | Audio transcription |
All listed AI endpoints require an active key in the X-API-Key header. See the endpoint guides for request fields and response shapes.