Swan Inference API
Call 42+ AI Models via an OpenAI-Compatible API
Quick Start
1. Get an API Key
2. Make Your First Request
curl https://inference.swanchain.io/v1/chat/completions \
-H "Authorization: Bearer sk-swan-YOUR-API-KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-r1-distill-llama-70b",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is Swan Chain?"}
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://inference.swanchain.io/v1",
api_key="sk-swan-YOUR-API-KEY",
)
response = client.chat.completions.create(
model="deepseek-r1-distill-llama-70b",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is Swan Chain?"},
],
)
print(response.choices[0].message.content)Try Without an API Key
Limit
Value
Subscription Plan
Feature
Pay-As-You-Go
Pro ($6/month)
Authentication
Key Prefix
Purpose
API Endpoints
List Models
Chat Completions
Parameter
Type
Required
Description
Streaming
Embeddings
Parameter
Type
Required
Description
Image Generation
Parameter
Type
Required
Description
Audio Transcription
Parameter
Type
Required
Description
Supported Models
Category
Models
Pricing
Rate Limits
Model Category
Requests per Minute
Request Limits
Parameter
Limit
Error Handling
Status Code
Meaning
Response Headers
Header
Description
Using with LLM Frameworks
LangChain (Python)
LlamaIndex
LiteLLM
Vercel AI SDK (TypeScript)
Pricing
Category
Pricing Unit
Billed In
Network Stats
Endpoint
Description
Learn More
Last updated