OpenAI-Compatible API
samreshuuu exposes a drop-in chat/completions endpoint. If you already use the OpenAI SDK, change the base URL and the API key — nothing else.
- Base URL:
https://samreshuuu.ru/v1 - Auth: an API key with the
chatscope (see Authentication)
Drop-In Example
About the model field
The model parameter is required by the OpenAI SDK but ignored by the server — the platform selects the model. Pass any placeholder string. Sampling parameters such as temperature and max_tokens are accepted for compatibility but not honored on this endpoint.
Request Fields
| Field | Type | Description |
|---|---|---|
| messagesrequired | array | Chat messages. The last user message drives the turn; earlier messages are treated as history. |
| stream | boolean | When true, stream OpenAI chat.completion.chunk frames. Default false. |
| session_id | string | Reuse a session_id to continue a prior conversation. Omit to start fresh. |
| max_iterations | integer | Agent loop cap, 1–50. Default 25. |
| stream_options | object | Streaming extras. Set { "include_tool_progress": true } to also receive named tool.progress SSE events. Off by default. |
This key acts on the full seller account
A chat API key drives the same agent as the workspace — the model can reach the entire tool registry, including connectors to the seller's cabinet and the terminal tool. Treat the key like account credentials: scope it per integration, store it server-side only, and rotate it if exposed. There is no read-only mode on this endpoint.
Streaming
Set stream: true to receive Server-Sent Events in OpenAI's chunk format, terminated by a final data: [DONE] frame.
Tool progress (opt-in)
Pass stream_options: { "include_tool_progress": true } (or the header X-Hermes-Tool-Progress: 1) to receive named tool.progress SSE events interleaved with the standard chunks. They live on a separate event channel, so strict OpenAI clients that only read chat.completion.chunk ignore them — and never persist them into history. When the option is off the byte stream is identical to a vanilla OpenAI response.
Multi-turn
Pass the same session_id across requests to keep context. The first response creates the session; reuse its id on the next call.
FAQ
What do I change to use the OpenAI SDK with samreshuuu?
Only the base URL (https://samreshuuu.ru/v1) and the API key. Existing chat.completions code works unchanged, and the key needs the chat scope.
Is the model parameter honored?
No. The OpenAI SDK requires it, but the server ignores it and selects the model itself — pass any placeholder string. Sampling parameters such as temperature and max_tokens are accepted for compatibility but not honored on this endpoint.
How do I keep context across requests?
Pass the same session_id on each call. The first response creates the session; reuse its id to continue the conversation.
What can a chat API key do?
It drives the same agent as the workspace, with access to the full tool registry including the seller's connectors and the terminal tool. There is no read-only mode — treat the key like account credentials, keep it server-side, and rotate it if exposed.
Frequently asked questions
What do I change to use the OpenAI SDK with samreshuuu?
Only the base URL (https://samreshuuu.ru/v1) and the API key. Existing chat.completions code works unchanged, and the key needs the chat scope.
Is the model parameter honored?
No. The OpenAI SDK requires it, but the server ignores it and selects the model itself — pass any placeholder string. Sampling parameters such as temperature and max_tokens are accepted for compatibility but not honored on this endpoint.
How do I keep context across requests?
Pass the same session_id on each call. The first response creates the session; reuse its id to continue the conversation.
What can a chat API key do?
It drives the same agent as the workspace, with access to the full tool registry including the seller's connectors and the terminal tool. There is no read-only mode — treat the key like account credentials, keep it server-side, and rotate it if exposed.