Quickstart
RevAI is a private AI API. Every request needs a bearer token created from the Dashboard. The base URL for all endpoints is below.
Base URL
https://revai.my.to
cURL example
curl https://revai.my.to/chat \
-H "Authorization: Bearer rai-your-token" \
-H "Content-Type: application/json" \
-d '{
"model": "large",
"messages": [{"role": "user", "content": "Hello"}]
}'
Full endpoint map
Chat & Text
| Endpoint | Purpose |
|---|---|
| POST /chat | Streaming text generation (SSE) |
| GET /models | Machine-readable model catalog (requires auth) |
| GET /health | Liveness check, no auth required |
Audio
| Endpoint | Purpose |
|---|---|
| POST /transcribe | Audio → text, with diarization |
| POST /speech | Text → audio, binary response |
| POST /speech/stream | Text → audio, low-latency SSE chunks |
| GET /tones | List configured tone presets |
| GET /voices | List preset and custom voices |
| POST /voices | Register a custom voice from a sample |
| DELETE /voices/{id} | Remove a custom voice |
Image Generation
| Endpoint | Purpose |
|---|---|
| POST /image/blueprint | Diagrams, wireframes, schematics |
| POST /image/illustrate | Multi-image with 300+ art styles |
| POST /image/render | High-quality single image generation |
| POST /image/refine | Image-to-image transformation |
| GET /image/options | All valid parameters and style lists |
Document & Utility
| Endpoint | Purpose |
|---|---|
| POST /embed | Text embeddings |
| POST /ocr | OCR — extract text from PDFs/images |
| POST /moderate | Content moderation scoring |
Authentication
All API requests must include an Authorization header with a valid bearer token. Tokens are created and managed in the Dashboard.
Authorization: Bearer rai-xxxxxxxxxxxxxxxxxxxx
Token security
Treat tokens like passwords. Do not commit them to source control. Rotate compromised tokens immediately from the Dashboard.
| Condition | Result |
|---|---|
| Missing header | 401 Missing API token |
| Invalid token | 401 Invalid or inactive token |
| Expired token | 401 Token expired |
| Disabled token | 401 Invalid or inactive token |
POST /chat
Streaming text generation via Server-Sent Events. Responses arrive as data: lines terminated by [DONE].
Request body
| Parameter | Description |
|---|---|
| modelstringoptional | Model alias. Defaults to large. See Models for the full list. |
| messagesarrayrequired | Conversation history. Each object: {role, content}. Roles: user, assistant, system. |
Streaming response
: keep-alive
data: {"content": "Hello"}
data: {"content": "! How"}
data: {"content": " can I help?"}
data: [DONE]
JavaScript example
const resp = await fetch("https://revai.my.to/chat", {
method: "POST",
headers: {
"Authorization": `Bearer ${token}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "large",
messages: [{ role: "user", content: "Hello" }]
})
});
const reader = resp.body.getReader();
const dec = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
for (const line of dec.decode(value).split("\n")) {
if (!line.startsWith("data: ")) continue;
const chunk = line.slice(6);
if (chunk === "[DONE]") break;
process.stdout.write(JSON.parse(chunk).content);
}
}
POST /transcribe
Transcribe audio files via multipart/form-data. Files over 24 MB are auto-chunked server-side.
Form fields
| Field | Description |
|---|---|
| filefilerequired | Audio file. Formats: mp3, wav, m4a, ogg, flac, webm. |
| modelstringoptional | Default: transcribe. Options: transcribe, transcribe-rt, voice-pro. |
| languagestringoptional | ISO 639-1 code e.g. en, fr. Auto-detected if omitted. |
| diarizebooleanoptional | Label speakers. Returns segments array. Not supported with transcribe-rt. |
| context_biasstringoptional | Comma-separated vocabulary hints, up to 100 terms. |
| timestamp_granularitiesstringoptional | segment or word level timestamps. |
curl https://revai.my.to/transcribe \
-H "Authorization: Bearer rai-your-token" \
-F "file=@recording.mp3" \
-F "model=transcribe" \
-F "diarize=true"
POST /speech
Text to speech. 8 tone presets, custom voice cloning, 5 output formats. Hard cap 40k characters per request. Use /speech/stream for low-latency SSE chunks.
Request body
| Parameter | Description |
|---|---|
| inputstringrequired | Text to speak. Max 40,000 chars. Best quality under ~300 words. |
| modelstringoptional | Default: tts |
| tonestringoptional | Preset: neutral, warm, bright, calm, serious, urgent, narration, support |
| voice_idstringoptional | Voice ID from GET /voices. Overrides tone. |
| ref_audiostringoptional | Base64 audio for one-off voice cloning (5–25s ideal). Overrides tone and voice_id. |
| formatstringoptional | mp3 (default), wav, pcm, flac, opus |
| encodingstringoptional | binary (default) or base64 JSON envelope |
403 on /speech is not an auth failure
Speech runs content moderation upstream. A 403 means the text was rejected — check your input before rotating tokens.
Image Generation
Four models, all returning base64 image data over SSE. Check GET /image/options (requires auth) for the machine-readable list of all valid parameters. The Dashboard → Image tab has the full visual reference including all 300+ art styles.
Blueprint — POST /image/blueprint
Generates designs, diagrams, and structured visuals. Returns 1 image.
| Parameter | Description |
|---|---|
| promptstringrequired | Describe the diagram to generate |
| aspect_ratiostringoptional | 1:1 · 4:3 · 3:4 · 16:9 · 9:16 |
Illustrate — POST /image/illustrate
Generates images from descriptions with 300+ art styles, style blending, negative prompts, and guidance scale. Up to 40 images per call.
| Parameter | Description |
|---|---|
| promptstringrequired | What to generate |
| negative_promptstringoptional | What to avoid |
| art_stylestringoptional | Primary style. Full list at GET /image/options or Dashboard → Image. |
| art_style_mixstringoptional | Secondary style to blend with primary |
| shapestringoptional | Square · Portrait · Landscape · Random |
| num_imagesintegeroptional | 2, 4, 6, 8, 12, 18, 24, 32, 40 |
| guidancestringoptional | default(7) or 1–30. Higher = more prompt-adherent, lower = more creative. |
Render — POST /image/render
Blueprint but with artistic design approaches. Quality may vary. Returns 1 image.
| Parameter | Description |
|---|---|
| promptstringrequired | What to render |
| aspect_ratiostringoptional | 1:1 · 4:3 · 3:4 · 16:9 · 9:16 · 21:9 · 9:21 |
Refine — POST /image/refine
Render's image generation model repurposed for editing parts of an existing image as per your prompt.
| Parameter | Description |
|---|---|
| promptstringrequired | How to transform the image |
| imagestringrequired | Base64-encoded source image |
| image_mimestringoptional | image/png (default) or image/jpeg |
| aspect_ratiostringoptional | auto · 1:1 · 1:2 · 2:1 · 2:3 · 3:2 · 9:16 · 16:9 |
SSE event format (all image endpoints)
data: {"type": "status", "message": "Preparing generation", "model": "rev-render-v1"}
data: {"type": "image", "index": 0, "model": "rev-render-v1", "format": "png", "data": "<base64>"}
data: {"type": "done", "count": 1}
data: [DONE]
POST /embed
Generate text embeddings for semantic search, retrieval, and clustering.
| Parameter | Description |
|---|---|
| inputsarrayrequired | Array of strings to embed. Each truncated at 8k tokens. |
| modelstringoptional | embed (default) or codex-embed for code |
POST /ocr
Extract text from PDFs and images with paragraph-level bounding boxes and structural block labels.
| Parameter | Description |
|---|---|
| documentobjectrequired | Object with type (url or base64_image) and the corresponding url or image_url field. |
| modelstringoptional | scan (default, v4) or scan-legacy (v3) |
POST /moderate
Content moderation scoring. Classifies toxicity, jailbreak attempts, and policy violations. Returns category scores.
| Parameter | Description |
|---|---|
| inputsarrayrequired | Array of strings or conversation arrays to moderate |
| modelstringoptional | guard (default) |
Voices
List, create, and delete custom voices for use with /speech.
| Endpoint | Description |
|---|---|
| GET /voices | List all voices. Optional query: ?limit=, ?offset= |
| POST /voices | Register a voice. Fields: name, sample_audio (base64, 5–25s), optional languages, gender, tags |
| DELETE /voices/{id} | Delete a voice by ID |
Model list
Two ways to explore models: the machine-readable API endpoint and the interactive Dashboard. For per-model detail — aliases, rate limits, context, and code examples — click through to the model page.
GET /models — machine-readable catalog
curl https://revai.my.to/models \
-H "Authorization: Bearer rai-your-token"
{
"data": [
{ "id": "rev-large-v3", "name": "RevAI Large v3", "alias": "large", "family": "chat", "context": 256000 },
...
]
}
Full details per model
The Dashboard → Models tab has the full catalog with filters, rate limits, and usage stats. Each model card links to /model/{id} — a dedicated page with all aliases, context window, TPM/RPS limits, request parameters, and a cURL example. For image models (Illustrate), the detail page includes the full art style list.
Chat & Reasoning
RevAI Large v3
large · rev-large-v3
Flagship model. 256k context. Best for complex reasoning and long-context tasks.
RevAI Medium v3
medium · rev-medium-v3
Balanced performance. 256k context. Recommended default.
RevAI Small v4
small · rev-small-v4
Fast and efficient. 256k context. 5 RPS for high-throughput pipelines.
RevAI Mini 3B
mini-3b · rev-mini-3b
Ultra-fast 3B model. 128k context. 12.5 RPS peak.
RevAI Mini 8B
mini-8b · rev-mini-8b
Efficient 8B model. 128k context. Edge and batch workloads.
RevAI Mini 14B
mini-14b · rev-mini-14b
Multimodal 14B. 128k context. Native image understanding.
RevAI Prism v5
prism · rev-prism-v5
GLM architecture. 200k context. Strong multilingual output.
RevAI Forge v1 NEW
forge · rev-forge-v1
128k context. Strong reasoning and instruction following.
RevAI Nemo v1 NEW
nemo · rev-nemo-v1
128k context. Compact and capable, good multilingual coverage.
RevAI Flux v1 NEW
flux · rev-flux-v1
180k context. Long-document multimodal coverage.
Code
RevAI Codex v1
codex · rev-codex-v1
Dedicated code model. 256k context. FIM support.
RevAI Lean v1.5
lean · rev-lean-v15
Ultra-fast code. 128k context. 5M TPM for autocomplete pipelines.
RevAI Codex v2 NEW
codex-2 · rev-codex-v2
128k context. Secondary code model.
Audio
RevAI Transcribe v2
transcribe · rev-transcribe-v2
Audio → text. Diarization, 13 languages, timestamps.
RevAI Transcribe RT
transcribe-rt · rev-transcribe-rt
Real-time optimized transcription. No diarization.
RevAI Voice Pro
voice-pro · rev-voice-pro
Audio-aware chat. 32k context. Voice-first apps.
RevAI Speech v1
tts · rev-speech-v1
Text → speech. 8 tones, voice cloning, 5 formats.
Image
RevAI Blueprint v1
blueprint · POST /image/blueprint
Diagrams, wireframes, schematics.
RevAI Illustrate v1
illustrate · POST /image/illustrate
Multi-image. 300+ art styles, style blending, up to 40 images.
RevAI Render v1
render · POST /image/render
High-quality photorealistic single image.
RevAI Refine v1
refine · POST /image/refine
Image-to-image. Transform existing images with a prompt.
Embeddings, OCR & Moderation
RevAI Embed v1
embed · POST /embed
Text embeddings. 8k context. 20M TPM.
RevAI Codex Embed
codex-embed · POST /embed
Code embeddings for search and deduplication.
RevAI Scan v4
scan · POST /ocr
OCR with bounding boxes and structural labels.
RevAI Guard v2
guard · POST /moderate
Content moderation. 128k context. Jailbreak detection.
Migration
Retired aliases are silently remapped — nothing breaks. Update your calls when you can, since remapped requests log under the new model ID.
| Retired alias | Now routes to |
|---|---|
| nano · nemo | mini-8b |
| vision | mini-14b |
| vision-pro | medium |
| think | medium |
| think-mini · dev · dev-medium · dev-small | small |
| large2 | large |
| voice | transcribe |
Errors
All errors return JSON with a detail field.
| Code | Meaning | Common cause |
|---|---|---|
| 400 | Bad Request | Malformed JSON, missing field, bad audio format, or diarize with transcribe-rt |
| 401 | Unauthorized | Missing, invalid, expired, or disabled token |
| 403 | Forbidden | On /speech: input text rejected by content moderation |
| 404 | Not Found | Unknown endpoint, voice id, or resource |
| 422 | Unprocessable | Validation error on request body |
| 500 | Server Error | Upstream failure or server misconfiguration |
{ "detail": "Invalid or inactive token" }
