StudioAI.stream API Reference
Universal AI Gateway routing Chat, Image, and Video models behind a single OpenAI-compatible base URL. Includes automatic TPM bypass, multi-provider failover, asynchronous video task management, and sub-millisecond crypto balance deduction.
/v1/chat/completionsGenerates a model response for the given chat conversation. Supports real-time Server-Sent Events (SSE) streaming and automatic multi-provider load balancing.
curl https://studioai.stream/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-stream-your-api-key" \
-d '{
"model": "deepseek-chat",
"messages": [
{"role": "system", "content": "You are an expert AI assistant."},
{"role": "user", "content": "Explain quantum computing in 3 sentences."}
],
"temperature": 0.7,
"stream": true
}'Body Parameters
modelstring • requiredID of the target model (e.g. deepseek-chat, claude-3-5-sonnet, gpt-4o, gemini-2.5-flash).
messagesarray • requiredA list of messages comprising the conversation so far. Each message contains role (system, user, or assistant) and content.
streamboolean • optional • default: falseIf set, tokens are streamed via Server-Sent Events (SSE) chunks formatted as data: {"choices":[{"delta":{"content":"..."}}]}.
temperaturenumber • optional • default: 0.7Sampling temperature between 0 and 2. Higher values like 0.8 make output more random, lower values like 0.2 make it more focused.