SUPREME Setu API — Early Access
The SUPREME Setu OpenAI-compatible endpoints preview the upcoming public release. Want early access or custom organizational quota limits? Contact our solutions engineering team.
Quickstart Guide
Get up and running with the SUPREME Setu API in under five minutes. Connect any standard OpenAI SDK to our Setu endpoint, make requests, and stream real-time tokens.
Step 1: Obtain Your API Key
To access the Setu API gateway, an API key is required. Developer keys are currently in early preview:
- Submit an access inquiry via our Developer Contact Form to request early API access.
- Once granted, your key will be prefixed with
sk-supreme-. - Store your API key in an environment variable:
bash
export SUPREME_API_KEY="sk-supreme-YOUR_API_KEY_HERE"Step 2: Make Your First Request
Because Setu implements the standard OpenAI chat completions wire protocol, you can use raw curl without installing extra libraries:
bash
curl -X POST https://supremeai.services/api/setu/v1/chat/completions \
-H "Authorization: Bearer $SUPREME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "quantum-lite",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant fluent in Nepali and English."
},
{
"role": "user",
"content": "Hello! How do you say welcome to Nepal in Nepali?"
}
],
"temperature": 0.7
}'Example Response
json
{
"id": "chatcmpl-setu-91a3f01b",
"object": "chat.completion",
"created": 1728259200,
"model": "quantum-lite",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "In Nepali, you say: 'नेपालमा स्वागत छ' (Nepal ma swagat chha)."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 28,
"completion_tokens": 18,
"total_tokens": 46
}
}Step 3: Stream Real-Time Responses
To stream tokens as they are generated, set "stream": true. The server responds with text/event-stream chunks:
bash
curl -N -X POST https://supremeai.services/api/setu/v1/chat/completions \
-H "Authorization: Bearer $SUPREME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "quantum-lite",
"messages": [
{"role": "user", "content": "Count from 1 to 5 in Nepali."}
],
"stream": true
}'The gateway streams back Server-Sent Event (SSE) packets ending with data: [DONE]:
text
data: {"id":"chatcmpl-setu-1","object":"chat.completion.chunk","choices":[{"delta":{"content":"१"}}]}
data: {"id":"chatcmpl-setu-1","object":"chat.completion.chunk","choices":[{"delta":{"content":", २"}}]}
data: {"id":"chatcmpl-setu-1","object":"chat.completion.chunk","choices":[{"delta":{"content":", ३, ४, ५"}}]}
data: [DONE]Next Steps
- Integrate with the Official Python SDK or TypeScript SDK.
- Read the Authentication & Security Guide to manage tokens and scopes.
- Explore the Chat Completions Reference for advanced parameters like tool calls and max tokens.
