Send Message
Send a message and Snorbe’s research agent will execute a research task and return the result as text. Internally, this creates a user chat, runs the agent, and returns the response in a single call.
Agent execution may take up to several minutes. Set a generous timeout.
Request
POST /api/trpc/chat.sendMessageWithApiKey
| Header | Required | Description |
|---|
Authorization | Yes | API key in Bearer snorbe_... format |
Content-Type | Yes | application/json |
Request Body
Following tRPC conventions, wrap input in a json key:
{
"json": {
"message": "Research the latest semiconductor trends",
"modelName": "snorbe-fast",
"locale": "en",
"fileUrls": []
}
}
Parameters
| Parameter | Type | Required | Description |
|---|
message | string | Yes | Message to send to the agent |
modelName | string | Yes | Model name (see below) |
locale | string | No | Response language: "ja" or "en". Default: "ja" |
fileUrls | string[] | No | Attached file URLs (max 10) |
Model Names
| Model | Description |
|---|
snorbe-fast | Fast model (recommended, low cost, quick response) |
snorbe-quality | High quality model (accuracy-focused) |
Individual model IDs from OpenAI, Anthropic, Gemini, DeepSeek, etc. are also supported.
Response
{
"result": {
"data": {
"json": {
"text": "Here are the latest semiconductor trends..."
}
}
}
}
Response Fields
| Field | Type | Description |
|---|
text | string | Agent response text |
Examples
curl -X POST "https://app.snorbe.com/api/trpc/chat.sendMessageWithApiKey" \
-H "Authorization: Bearer snorbe_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"json":{"message":"Research the latest semiconductor trends","modelName":"snorbe-fast","locale":"en"}}'
Error Responses
| HTTP Status | Code | Description |
|---|
| 400 | BAD_REQUEST | Validation error (invalid model name, etc.) |
| 401 | UNAUTHORIZED | Invalid, expired, or missing API key |
| 429 | TOO_MANY_REQUESTS | Rate limit exceeded |
| 500 | INTERNAL_SERVER_ERROR | Agent execution error |