OpenAI Compatibility
Drop-in replacement
Python
from openai import OpenAI
# Before (OpenAI)
# client = OpenAI(api_key="sk-...")
# After (DOS AI)
client = OpenAI(
base_url="https://api.dos.ai/v1",
api_key="dos_sk_...",
)
# Everything else stays the same
response = client.chat.completions.create(
model="dos-ai",
messages=[{"role": "user", "content": "Hello!"}],
temperature=0.7,
max_tokens=256,
)JavaScript / TypeScript
cURL / HTTP
Supported endpoints
Endpoint
Method
Description
Supported parameters
Parameter
Type
Description
Framework compatibility
LangChain
LlamaIndex
Vercel AI SDK
What's different from OpenAI
Feature
Status
Notes
Migration checklist
Using both OpenAI and DOS AI
Last updated