Authentication
All API requests require an API key in the Authorization header:
Authorization: Bearer sk-asg-your-api-key-here
API keys start with sk-asg- and can be created on your profile page. Keys are shown only once at creation โ store them securely.
Rate Limits
| Endpoint | Max Requests | Period |
|---|---|---|
POST /api/v1/chat/completions | 30 | 1 min |
POST /api/v1/messages | 30 | 1 min |
POST /api/images/generate | 10 | 1 min |
POST /api/videos/generate | 5 | 1 min |
POST /api/music/generate | 5 | 1 min |
Chat Requests
OpenAI-compatible chat requests. Works with any OpenAI SDK โ just change the base URL and key.
Response
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "openai/gpt-4o",
"choices": [{
"index": 0,
"message": { "role": "assistant", "content": "Hello!" },
"finish_reason": "stop"
}]
}
Models
List of available chat models. Includes OpenAI, Anthropic, Google, Meta, Mistral and 100+ more.
{
"object": "list",
"data": [{
"id": "openai/gpt-4o",
"name": "GPT-4o",
"context_length": 128000
}]
}
Image Generation
Available Models
| Provider | Models |
|---|---|
google/imagen4, google/imagen4-fast, google/nano-banana | |
| OpenAI | gpt-image/1.5-text-to-image, gpt-image-2-text-to-image |
| Flux | flux-2/pro-text-to-image, flux-kontext-pro |
| Midjourney | midjourney |
Video Generation
Available Models
| Provider | Model |
|---|---|
veo3, veo3_fast | |
| OpenAI | sora |
| Kling | kling-video, kling-motion |
| Runway | runway |
Music Generation
Supports Suno V4, V4_5, and V5 models for high-quality music generation.
Audio Transcription
Supports whisperx and incredibly-fast-whisper models for accurate speech-to-text conversion.
Video Translation
Translate video audio and generate subtitles automatically.
Account
Endpoints for getting user profile and usage.
Returns current user profile and linked auth providers.
{
"user": {
"id": 12345,
"display_name": "John Doe",
"email": "john@example.com"
}
}
Returns account usage statistics.
Pricing
The AiSearch&Generate platform is non-commercial and designed for research purposes. The token allocation is determined individually based on the project's needs.
Errors
| Code | Description |
|---|---|
400 | Bad request โ missing or invalid parameters |
401 | Unauthorized โ invalid or expired API key |
404 | Not found โ task not found |
502 | Bad gateway โ upstream service unavailable |