v1.2 SPECIFICATIONUnified Gateway Operational

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.

Base URL
https://studioai.stream/v1
Auth Scheme
Bearer <sk-stream-key>
Dialect & Architecture
OpenAI / SSE / Async Tasks
POST/v1/chat/completions

Generates 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 • required

ID of the target model (e.g. deepseek-chat, claude-3-5-sonnet, gpt-4o, gemini-2.5-flash).

messagesarray • required

A list of messages comprising the conversation so far. Each message contains role (system, user, or assistant) and content.

streamboolean • optional • default: false

If set, tokens are streamed via Server-Sent Events (SSE) chunks formatted as data: {"choices":[{"delta":{"content":"..."}}]}.

temperaturenumber • optional • default: 0.7

Sampling temperature between 0 and 2. Higher values like 0.8 make output more random, lower values like 0.2 make it more focused.