🐍 Python (OpenAI)
🦕 Node.js (OpenAI)
🐹 Go (OpenAI)
🔌 cURL / OpenAPI
# 1. Install official OpenAI package:
$ pip install openai
# 2. Point client to Saur runner (https://saur.run/v1 or http://localhost:8080/v1):
from openai import OpenAI
client = OpenAI (base_url ="https://saur.run/v1" , api_key ="saur_local" )
stream = client.chat.completions.create (
model ="google-antigravity" ,
messages =[{"role" : "user" , "content" : "Привет! Как работает Scale-to-Zero?" }],
stream =True ,
)
for chunk in stream:
print (chunk.choices[0 ].delta.content or "" , end ="" , flush =True )
// 1. Install official OpenAI package:
$ npm install openai
// 2. Point client to Saur runner:
import OpenAI from 'openai' ;
const client = new OpenAI ({ baseURL : 'https://saur.run/v1' , apiKey : 'saur_local' });
const res = await client.chat.completions.create ({
model : 'google-antigravity' ,
messages : [{ role : 'user' , content : 'Привет!' }],
});
console.log (res.choices[0 ].message.content);
// 1. Install official openai-go or go-openai:
$ go get github.com/openai/openai-go
// 2. Configure standard client with BaseURL:
client := openai.NewClient (
option.WithBaseURL ("https://saur.run/v1" ),
option.WithAPIKey ("saur_local" ),
)
# Standard OpenAI-compatible completion endpoint
$ curl -X POST https://saur.run/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "google-antigravity",
"messages": [{"role": "user", "content": "Привет, помоги с пайплайном"}]
}'
# OpenAPI 3.0.3 Contract: https://saur.run/openapi.yaml
<!-- Embed autonomous AI consultant before </body> on any website -->
<script
src ="https://saur.run/widget.js"
data-agent-id ="consultant"
data-title ="ИИ-Консультант" >
</script >