samreshuuu API
Интегрируйте AI-возможности в ваш продукт: генерация текста, агенты, обработка документов и автоматизация задач.
Начало работы
1
Установите зависимости
# No SDK required — the API is plain HTTP + Server-Sent Events.
# Python: pip install requests
# Node.js: built-in fetch (Node 18+)
2
Настройте переменные окружения
export SAMRESHUUU_API_KEY="sk-org-your_api_key"
export SAMRESHUUU_BASE_URL="https://api.samreshuuu.ru/api/v1"
3
Отправьте первый запрос
import requests, os
API_KEY = os.environ["SAMRESHUUU_API_KEY"]
BASE = os.environ["SAMRESHUUU_BASE_URL"]
response = requests.post(
f"{BASE}/sessions/stream",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"message": "Summarize the key points of this contract"},
stream=True,
)
for line in response.iter_lines():
if line:
print(line.decode())
4
Получите ответ
data: {"type": "session", "session_id": "ses_abc123"}
data: {"type": "content", "text": "Here are the key points of the contract:\n\n"}
data: {"type": "content", "text": "1. **Term**: 24 months starting March 2026\n"}
data: {"type": "content", "text": "2. **Payment**: Monthly invoicing, net-30 terms\n"}
data: {"type": "done", "usage": {"input_tokens": 150, "output_tokens": 89}}
Доступные модели
samreshuuu предоставляет доступ к лучшим моделям для различных задач.
| Модель | Контекст | Описание |
|---|---|---|
sam-reshuu-001sam-reshuu-001 | 200K | Primary model for text generation, document analysis, and agent workflows |