Back to Features

Aimi Chat API

Build intelligent applications with Aimi's AI capabilities. OpenAI-compatible REST API with SSE streaming and Bearer token authentication.

RESTArchitecture
OpenAICompatible
SSEStreaming
99.9%Uptime

Chat Completions Endpoint

OpenAI-compatible API for AI chat completions. Access all models via a single endpoint.

POSThttps://aimichat.app/v1/chat/completions

Send chat messages and receive AI-powered responses. Supports streaming and multiple quality tiers.

SSE streamingQuality tiersRate limited

Authentication

BearerAuthorization: Bearer aimichat_xxx

Standard OAuth2 Bearer token authentication

X-API-KeyX-API-Key: aimichat_xxx

Custom header authentication

Query?api_key=aimichat_xxx

URL query parameter (not recommended for production)

Request Parameters

messages*
arrayArray of message objects with role ("user", "assistant", "system") and content
max_tokens
numberMaximum tokens in response (default: 2000, max: 2000)
temperature
numberCreativity level 0-1 (default: 0.7)
stream
booleanEnable SSE streaming (default: false)

Rate Limits & Credits

Free

10/min400/moFast + Balanced

Plus

10/min1,800/moFast + Balanced

Ultra

10/min5,500/moAll models

Quick Start

Get up and running in minutes with these examples.

curl -X POST https://aimichat.app/v1/chat/completions \
  -H "Authorization: Bearer aimichat_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{"role": "user", "content": "Hello!"}],
    "max_tokens": 500
  }'

Simple Integration

OpenAI Compatible

Drop-in replacement for OpenAI API. Use existing SDKs and tools with minimal code changes.

Secure API Keys

Generate up to 5 API keys per account with aimichat_ prefix. Keys are hashed and stored securely.

Bearer Token Auth

Standard Authorization: Bearer header, X-API-Key header, or query parameter authentication.

SSE Streaming

Real-time streaming responses using Server-Sent Events when stream: true is set.

Rate Limiting

10 requests per minute per API key. Includes X-RateLimit headers for tracking usage.

Credit-Based Usage

Each request uses credits from your monthly allocation. Free: 500, Plus: 4K, Ultra: 10K.

Quality Tiers

API keys can be set to Fast, Balanced, or Premium quality based on your subscription tier.

Usage Analytics

Track API key usage with last used timestamp, total request count, and monthly statistics.

Key Management

Create, list, and revoke API keys from your account dashboard. Soft delete for audit trails.

Error Handling

Comprehensive error responses with status codes, messages, and rate limit headers.

CORS Enabled

Cross-origin requests supported. Use from any domain or application.

Message Limits

Up to 50 messages per request, 50,000 total characters. 2,000 token max response.