Skip to main content
Version: 1.0.0

AI Platform API Gateway

AI Platform API Gateway

A high-performance, enterprise-grade API Gateway for multi-tenant AI inference platform.

Features

  • Multi-tenant Architecture: Secure tenant isolation and data protection
  • AI/ML Inference: Support for chat completions, text completions, and embeddings
  • Authentication: JWT and API key-based authentication
  • Rate Limiting: Configurable rate limits per tenant and endpoint
  • Usage Tracking: Comprehensive usage analytics and billing integration
  • Model Registry: Manage and deploy custom AI models
  • Batch Processing: Asynchronous job processing for large workloads

Authentication

The API supports two authentication methods:

1. JWT Authentication

Use the /auth/login endpoint to obtain a JWT token, then include it in the Authorization header:

Authorization: Bearer <your-jwt-token>

2. API Key Authentication

Create an API key via the /api-keys endpoint, then include it in the Authorization header:

Authorization: Bearer <your-api-key>

Rate Limits

Rate limits are enforced per tenant and vary by subscription plan:

  • Requests per minute: Default 1000 RPM
  • Concurrent requests: Default 10
  • Cost per hour: Default $100 USD

Check your current limits using the /rate-limits endpoint.

Error Handling

All endpoints return consistent error responses:

{
"error": {
"type": "error_type",
"message": "Human readable error message",
"details": {}
},
"success": false,
"timestamp": "2024-01-01T00:00:00Z"
}

Common HTTP status codes:

  • 400: Bad Request - Invalid request data
  • 401: Unauthorized - Missing or invalid authentication
  • 403: Forbidden - Insufficient permissions
  • 404: Not Found - Resource not found
  • 422: Validation Error - Request validation failed
  • 429: Too Many Requests - Rate limit exceeded
  • 500: Internal Server Error - Server error

Streaming Responses

Some AI inference endpoints support streaming responses. Set "stream": true in your request to receive real-time results via Server-Sent Events (SSE).

Usage Tracking

All API usage is tracked for billing and analytics. Access your usage data via:

  • /usage - Get usage statistics
  • /billing/invoices - View billing invoices

Support

For API support and documentation, contact the AI Platform team.

Authentication

JWT token obtained from /auth/login

Security Scheme Type:

http

HTTP Authorization Scheme:

bearer

Bearer format:

JWT