Chat and Assistants APIs
Use these APIs to call text models, list available models and prices, or chat with an assistant that uses your knowledge base.
Chat Completions works with the OpenAI-compatible SDK. Configure the GPTunneL base URL and your API key. For streams, see streaming responses. Claude models also support the Anthropic Messages format for the Anthropic SDK and Claude Code.
Base URL
Section titled “Base URL”https://gptunnel.ru/v1Send your API key in the Authorization header.
Endpoints
Section titled “Endpoints”| Method | Endpoint | Behavior |
|---|---|---|
GET |
/v1/models |
List available models with their prices |
POST |
/v1/chat/completions |
Get a chat response as JSON or stream it with SSE |
POST |
/v1/obfuscate |
Replace personal data in text without calling a model |
POST |
/v1/assistant/chat |
Send a message to an assistant that uses its knowledge base |
POST |
/v1/messages |
Call Claude models in the Anthropic Messages format |
See the Assistants API overview for how assistants differ from regular chat. Create the knowledge bases they use with the RAG API.
Call Formats
Section titled “Call Formats”| Format | Method and availability |
|---|---|
| Chat Completions | POST /v1/chat/completions. JSON and SSE verified with gpt-6-luna. |
| Anthropic Messages | POST /v1/messages. JSON and event streaming verified with claude-5.5-haiku. |
| Responses | POST /v1/responses for models with Responses enabled. |
| Gemini | POST /v1/models/{model}:generateContent and POST /v1beta/models/{model}:generateContent for models with Gemini enabled. For streaming, use :streamGenerateContent?alt=sse with the matching API version. |
A model listed in the catalog is visible to your API key. Availability through Responses or Gemini depends on the model’s enabled formats. For example, grom-1.5-pro worked with Chat Completions but returned 404 and Model is not enabled for this API format. in tests with Responses and Gemini. If you receive this error, use Chat Completions or select a model that supports the format you need.
For regular Chat Completions, send the previous messages in messages. When chatting with an assistant, reuse your chatId and pass a positive maxContext to include previous messages.
What’s important to know
Section titled “What’s important to know”The models endpoint also returns rates. See request pricing.
After a model is retired, requests run on the designated replacement and are billed at the rate of the model you originally requested. If there is no replacement, Chat Completions returns HTTP 410. See deprecated models.