samreshuuu API

Integrate AI capabilities into your product: text generation, agents, document processing, and task automation.

Your integration talks to Samreshuuu through two doors, both opened by an organization key (sk-org-…):

  • the OpenAI-compatible API at https://samreshuuu.ru/v1: chat with your agents, model is the agent's handle;
  • the MCP server at https://samreshuuu.ru/mcp/: connected services and code execution for your own agent or IDE.

What the key may do is set by its scopes, see Authentication. The native /api/v1 is the internal API of the Samreshuuu apps and is not an integration contract.

Getting Started

1

Create a key

Open Settings → API keys, create a key with Full access and store it in an environment variable:

bash
export SAMRESHUUU_API_KEY="sk-org-your_api_key"
2

Pick an agent

GET /v1/models lists the agents your organization can talk to, the built-in assistant (samreshu) first. The id of an entry is the agent's handle, the same @handle you use in the app.

bash
curl https://samreshuuu.ru/v1/models \ -H "Authorization: Bearer $SAMRESHUUU_API_KEY"
3

Send a message

python
import os from openai import OpenAI client = OpenAI(api_key=os.environ["SAMRESHUUU_API_KEY"], base_url="https://samreshuuu.ru/v1") stream = client.chat.completions.create( model="samreshu", messages=[{"role": "user", "content": "Give three short tips for naming a product card on a marketplace"}], stream=True, ) for chunk in stream: print(chunk.choices[0].delta.content or "", end="")

The agent answers with its own instructions, model, connectors and skills. See Streaming for the chunk format and tool events.

Section Map

Frequently asked questions

Do I need an SDK to use the samreshuuu API?

No. The API is OpenAI-compatible: the OpenAI SDK works by changing the base URL, and plain HTTP with Server-Sent Events works too. Connected services and code execution are reached over the MCP server with the same key.

How do I start a turn and read the response?

POST /v1/chat/completions with model set to an agent handle from GET /v1/models. Set stream to true to read the answer as it is written.

How is the base URL structured?

The integrator API lives under https://samreshuuu.ru/v1 and the MCP server at https://samreshuuu.ru/mcp/. Both take an organization key (sk-org-...).

Was this page helpful?