Skip to main content
POST
https://api.rotavision.com
/
sankalp
/
proxy
curl -X POST https://api.rotavision.com/v1/sankalp/proxy \
  -H "Authorization: Bearer rv_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5-mini",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant fluent in Hindi."},
      {"role": "user", "content": "भारत में AI adoption की स्थिति क्या है?"}
    ],
    "temperature": 0.7,
    "max_tokens": 1000
  }'
{
  "id": "proxy_abc123",
  "model": "gpt-5-mini",
  "provider": "openai",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "भारत में AI adoption तेजी से बढ़ रहा है। कुछ मुख्य बिंदु:\n\n1. **एंटरप्राइज़ अपनाना**: बड़ी कंपनियां जैसे TCS, Infosys, और Reliance AI में भारी निवेश कर रही हैं...\n\n2. **स्टार्टअप इकोसिस्टम**: भारत में 3,000+ AI स्टार्टअप्स हैं...\n\n3. **सरकारी पहल**: Digital India और AI Mission के तहत..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 45,
    "completion_tokens": 312,
    "total_tokens": 357
  },
  "cost": {
    "usd": 0.0021,
    "inr": 0.18
  },
  "latency_ms": 1250,
  "routing": {
    "selected_model": "gpt-5-mini",
    "selected_provider": "openai",
    "reason": "explicit_model_request"
  },
  "created_at": "2026-02-01T10:30:00Z"
}

Request

model
string
required
Model to use. Can be specific (gpt-5-mini, claude-4.5-sonnet) or auto for intelligent routing.
messages
array
required
Conversation messages in OpenAI format.
temperature
number
default:"1.0"
Sampling temperature (0-2).
max_tokens
integer
Maximum tokens to generate.
stream
boolean
default:"false"
Enable streaming response.
routing
object
Routing preferences.
compliance
object
Compliance settings.
curl -X POST https://api.rotavision.com/v1/sankalp/proxy \
  -H "Authorization: Bearer rv_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5-mini",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant fluent in Hindi."},
      {"role": "user", "content": "भारत में AI adoption की स्थिति क्या है?"}
    ],
    "temperature": 0.7,
    "max_tokens": 1000
  }'
{
  "id": "proxy_abc123",
  "model": "gpt-5-mini",
  "provider": "openai",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "भारत में AI adoption तेजी से बढ़ रहा है। कुछ मुख्य बिंदु:\n\n1. **एंटरप्राइज़ अपनाना**: बड़ी कंपनियां जैसे TCS, Infosys, और Reliance AI में भारी निवेश कर रही हैं...\n\n2. **स्टार्टअप इकोसिस्टम**: भारत में 3,000+ AI स्टार्टअप्स हैं...\n\n3. **सरकारी पहल**: Digital India और AI Mission के तहत..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 45,
    "completion_tokens": 312,
    "total_tokens": 357
  },
  "cost": {
    "usd": 0.0021,
    "inr": 0.18
  },
  "latency_ms": 1250,
  "routing": {
    "selected_model": "gpt-5-mini",
    "selected_provider": "openai",
    "reason": "explicit_model_request"
  },
  "created_at": "2026-02-01T10:30:00Z"
}

Streaming

For streaming responses, use the stream endpoint or set stream: true:
# Streaming in Python
for chunk in client.sankalp.proxy_stream(
    model="claude-4.5-sonnet",
    messages=[{"role": "user", "content": "Write a poem about India"}]
):
    print(chunk.choices[0].delta.content, end="")
// Streaming in Node.js
const stream = await client.sankalp.proxyStream({
  model: 'claude-4.5-sonnet',
  messages: [{ role: 'user', content: 'Write a poem about India' }]
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0].delta.content || '');
}