Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.samuraiapi.in/llms.txt

Use this file to discover all available pages before exploring further.

Enter your API key in the Authentication field at the top of each endpoint page to send live requests. All calls go to https://www.samuraiapi.in/v1.

Base URL

https://www.samuraiapi.in/v1

Authentication

All requests require a Bearer token:
Authorization: Bearer sk-samurai-YOUR_KEY
Get your API key from the Dashboard.

Available Endpoints

Chat Completions

POST /chat/completions — Generate text with any model

List Models

GET /models — See all available models

Generate Image

POST /images/generations — DALL-E 3, Flux, and more

Text to Speech

POST /audio/speech — 6 voices, 5 formats

Transcribe Audio

POST /audio/transcriptions — Whisper, 99 languages

Create Embedding

POST /embeddings — Vector embeddings for RAG & search

Response Format

Every response follows the OpenAI format:
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1715000000,
  "model": "gpt-4o",
  "choices": [...],
  "usage": {
    "prompt_tokens": 28,
    "completion_tokens": 45,
    "total_tokens": 73
  }
}

Error Format

{
  "error": {
    "type": "rate_limit_exceeded",
    "message": "Daily request limit reached. Resets at midnight UTC.",
    "code": 429
  }
}
See Error Codes for the full list.