Step 1: Get your API Key
- Sign up at samurai-ai.com
- Go to your Dashboard
- Click API Keys → Create New Key
- Copy your key — it starts with
sk-samurai-
Step 2: Install the SDK
Use the official OpenAI SDK — no special Samurai package needed:Step 3: Set your environment variable
.env file:
.env
Step 4: Make your first request
Try a cheaper model (same quality)
Try streaming
What’s next?
Chat Completions
Full parameter reference and multi-turn examples.
Streaming
Real-time streaming with SSE and Vercel AI SDK.
All Models
GPT-4.1, Claude Opus 4, Gemini 2.5 Pro, Llama 3.3 and 400+ more.
API Playground
Test every endpoint live in your browser.
Step 1: Get your API Key
- Sign up at samurai-ai.com
- Go to your Dashboard
- Click API Keys → Create New Key
- Copy your key — it starts with
sk-samurai-
Step 2: Install the SDK
Samurai AI is 100% OpenAI-compatible. Use the official OpenAI SDK — no special package needed:Step 3: Make your first request
What’s next?
Chat Completions
Learn all parameters and options for chat.
Browse Models
See all 400+ available models.
Image Generation
Generate images with DALL-E 3, Flux, and more.
Streaming
Stream responses in real time.