Complete reference for the LLM Portal REST API. All endpoints use JSON request and response bodies unless otherwise noted.
Base URL: https://chat.waymore.ai/api
Authentication
The API supports two authentication methods: API Key (Bearer token) for programmatic access, and Session (cookie-based) for browser requests. Include your API key in the Authorization header.
Extend the model with custom functions (tools) that it can invoke during a conversation. The API supports both OpenAI and Anthropic tool formats natively — the format is auto-detected from your request. Supports parallel tool calls.
Tool Definitions
Each tool has a type: "function" wrapper with parameters:
POST /api/chat/completions (OpenAI format)
1
{
2
"model":"Waymore-A1-Instruct-1011",
3
"messages":[
4
{"role":"user","content":"What is the weather in Athens, Greece?"}
5
],
6
"tools":[
7
{
8
"type":"function",
9
"function":{
10
"name":"get_weather",
11
"description":"Get the current weather for a given location",
12
"parameters":{
13
"type":"object",
14
"properties":{
15
"location":{
16
"type":"string",
17
"description":"The city and country, e.g. Athens, Greece"
18
},
19
"unit":{
20
"type":"string",
21
"enum":["celsius","fahrenheit"],
22
"description":"Temperature unit"
23
}
24
},
25
"required":["location"]
26
}
27
}
28
}
29
],
30
"tool_choice":"auto"
31
}
Tool Call Responses
Response includes tool_calls and finish_reason: "tool_calls".
Response 200 (OpenAI format)
1
{
2
"id":"chatcmpl-abc123",
3
"model":"Waymore-A1-Instruct-1011",
4
"choices":[
5
{
6
"index":0,
7
"message":{
8
"role":"assistant",
9
"content":"I'll check the current weather in Athens, Greece for you.",
10
"tool_calls":[
11
{
12
"id":"functions.get_weather:0",
13
"index":0,
14
"type":"function",
15
"function":{
16
"name":"get_weather",
17
"arguments":"{"location": "Athens, Greece"}"
18
}
19
}
20
]
21
},
22
"finish_reason":"tool_calls"
23
}
24
],
25
"usage":{
26
"prompt_tokens":885,
27
"completion_tokens":33,
28
"total_tokens":918
29
}
30
}
Submitting Tool Results
Send the result as a message with role: "tool" and the matching tool_call_id.
POST /api/chat/completions (OpenAI format)
1
{
2
"model":"Waymore-A1-Instruct-1011",
3
"messages":[
4
{"role":"user","content":"What is the weather in Athens, Greece?"},
5
{
6
"role":"assistant",
7
"content":"I'll check the current weather in Athens, Greece for you.",
The model can invoke multiple tools in a single response. Each tool call has a unique id and index. Submit all results before the next completion request.
Response with parallel tool calls
1
{
2
"choices":[
3
{
4
"message":{
5
"role":"assistant",
6
"content":"I'll check the weather for both cities.",
7
"tool_calls":[
8
{
9
"id":"functions.get_weather:0",
10
"index":0,
11
"type":"function",
12
"function":{
13
"name":"get_weather",
14
"arguments":"{"location": "Athens, Greece"}"
15
}
16
},
17
{
18
"id":"functions.get_weather:1",
19
"index":1,
20
"type":"function",
21
"function":{
22
"name":"get_weather",
23
"arguments":"{"location": "London, United Kingdom"}"
24
}
25
}
26
]
27
},
28
"finish_reason":"tool_calls"
29
}
30
]
31
}
tool_choice Options
Value
Behavior
"auto"
Model decides whether to call a tool (default)
"none"
Model will not call any tools
"required"
Model must call at least one tool
{"type":"function","function":{"name":"..."}}
Force a specific function to be called
Chat Sessions
Manage chat sessions (conversations). Sessions group messages together and track the model being used.
GET
/api/chat/sessions
List all chat sessions for the current user (50 most recent).
POST
/api/chat/sessions
Create a new chat session with optional title and model.
PATCH
/api/chat/sessions/:sessionId
Update a session's title or model.
DELETE
/api/chat/sessions/:sessionId
Delete a chat session and all its messages.
Create Session
POST /api/chat/sessions
1
{
2
"title":"Quantum Physics Discussion",
3
"model":"Waymore-A1-Instruct-1011"
4
}
Response 201
1
{
2
"id":"clx...",
3
"title":"Quantum Physics Discussion",
4
"model":"Waymore-A1-Instruct-1011",
5
"messages":[]
6
}
Chat Messages
Create, retrieve, and manage messages within chat sessions. Messages support file attachments and ratings.
GET
/api/chat/sessions/:sessionId/messages
List all messages in a session with attachments.
POST
/api/chat/messages
Create a new message with optional attachments.
PATCH
/api/chat/messages/:messageId
Update a message (e.g. video data).
POST
/api/chat/messages/:messageId/rating
Rate an assistant message (thumbs up/down).
POST
/api/chat/attachments
Upload files for chat messages (max 5 files, 50MB each).
Programmatically create, list, rotate, and revoke API keys. Keys support granular permissions, IP whitelisting, and rate limits. The number of keys allowed depends on your subscription plan.
GET
/api/keys
List all API keys for the current user.
POST
/api/keys
Create a new API key with permissions and limits.
GET
/api/keys/:keyId
Get API key details.
PATCH
/api/keys/:keyId
Update API key metadata, permissions, and limits.
DELETE
/api/keys/:keyId
Delete an API key permanently.
POST
/api/keys/:keyId/regenerate
Regenerate the API key secret. Old key is invalidated.
POST
/api/keys/:keyId/revoke
Revoke an API key with an optional reason.
POST
/api/keys/:keyId/reactivate
Reactivate a previously revoked API key.
GET
/api/keys/:keyId/usage?days=30
Get usage statistics for an API key over a time period.
GET
/api/keys/:keyId/requests?limit=10
Get request history (daily aggregated) for an API key.
Change password. Requires current password and a strong new password (min 12 chars).
Profile Response
GET /api/user/profile — Response 200
1
{
2
"id":"clx...",
3
"name":"John Doe",
4
"email":"john@example.com",
5
"role":"USER",
6
"status":"ACTIVE",
7
"firstName":"John",
8
"lastName":"Doe",
9
"company":"Acme Inc",
10
"timezone":"America/New_York",
11
"twoFactorEnabled":true,
12
"createdAt":"2025-01-01T00:00:00Z"
13
}
Files & Uploads
Upload and manage files. File endpoints proxy to the LLM backend for processing. Supports images, videos, PDFs, documents, and code files up to 50MB.
GET
/api/files
List uploaded files.
POST
/api/files/upload
Upload a file for LLM processing (multipart/form-data).
GET
/api/files/:fileId
Get file metadata.
DELETE
/api/files/:fileId
Delete an uploaded file.
Content Items
Save and organize content items (images, videos, files, code snippets, conversations, notes) in your personal library. Supports tagging, favorites, archiving, and full-text search.
GET
/api/stuff
List content items with filtering, search, and pagination.