Waymore Docs

Guides

Step-by-step tutorials to help you get the most out of LLM Portal.

Quick Start

5 min

Create your account and start chatting with AI in under 5 minutes.

1

Sign Up

Go to https://chat.waymore.ai/register and create your account using email, Google, or GitHub.

2

Verify Your Email

Check your inbox for a verification email and click the link to activate your account. If you signed up with Google or GitHub, this step is automatic.

3

Start a Conversation

After signing in, you will see the chat interface. Type a message in the input box and press Enter. The AI will respond in real-time with streaming text.

4

Explore Features

Try attaching a file to your message, creating a new chat session from the sidebar, or enabling two-factor authentication in your profile settings.

Making Your First API Call

10 min

Generate an API key and send your first chat completion request programmatically.

1

Generate an API Key

Navigate to your API Keys page in the dashboard. Click "Create New Key", give it a descriptive name, and select the permissions it needs. Keys are created and managed in the dashboard with your signed-in session — the key-management endpoints are not accessible with API keys.

Important: Copy the API key immediately. It will only be shown once.

2

Send a Chat Request

Use cURL or any HTTP client to send a chat completion request:

cURL
1curl https://chat.waymore.ai/v1/chat/completions \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "Waymore-A1-Instruct-1011",
6 "messages": [
7 {"role": "system", "content": "You are a helpful assistant."},
8 {"role": "user", "content": "What is machine learning?"}
9 ]
10 }'
3

Parse the Response

The response follows the OpenAI-compatible format. The assistant's message is in choices[0].message.content:

Response
1{
2 "id": "chatcmpl-abc123",
3 "model": "Waymore-A1-Instruct-1011",
4 "choices": [
5 {
6 "message": {
7 "role": "assistant",
8 "content": "Machine learning is a subset of artificial intelligence..."
9 },
10 "finish_reason": "stop"
11 }
12 ],
13 "usage": {
14 "prompt_tokens": 25,
15 "completion_tokens": 150,
16 "total_tokens": 175
17 }
18}
4

Track Your Usage

The usage field in the response shows token consumption for each request. For an overall view, use the Usage page in the dashboard, or query GET /api/usage/summary with your API key as a Bearer token.

Migrate from OpenAI

5 min

LLM Portal provides an OpenAI-compatible API. If you are using the OpenAI SDK or REST API, you can switch with minimal code changes.

1

What Stays the Same

The following are fully compatible — no code changes needed for these:

  • Request format: messages, model, stream, temperature
  • Response format: choices, usage, finish_reason
  • Streaming via Server-Sent Events (SSE)
  • Function calling / Tools (tools, tool_choice, parallel tool calls)
  • Message roles: system, user, assistant, tool
  • Bearer token authentication
2

Change the Base URL

Replace the OpenAI base URL with the LLM Portal endpoint:

Before (OpenAI)
1curl https://api.openai.com/v1/chat/completions \
2 -H "Authorization: Bearer sk-openai-key..." \
3 -H "Content-Type: application/json" \
4 -d '{"model": "gpt-4o", "messages": [{"role": "user", "content": "Hello"}]}'
After (LLM Portal)
1curl https://chat.waymore.ai/v1/chat/completions \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{"model": "Waymore-A1-Instruct-1011", "messages": [{"role": "user", "content": "Hello"}]}'
3

Update the OpenAI SDK Configuration

If you use the OpenAI Python or Node.js SDK, override the base_url and api_key:

Python SDK
1from openai import OpenAI
2 
3client = OpenAI(
4 base_url="https://chat.waymore.ai/v1",
5 api_key="YOUR_API_KEY"
6)
7 
8response = client.chat.completions.create(
9 model="Waymore-A1-Instruct-1011",
10 messages=[{"role": "user", "content": "Hello"}]
11)
Node.js SDK
1import OpenAI from "openai";
2 
3const client = new OpenAI({
4 baseURL: "https://chat.waymore.ai/v1",
5 apiKey: "YOUR_API_KEY"
6});
7 
8const response = await client.chat.completions.create({
9 model: "Waymore-A1-Instruct-1011",
10 messages: [{ role: "user", content: "Hello" }]
11});
4

Update the Model Name

Replace OpenAI model names (gpt-4o, gpt-4-turbo, gpt-3.5-turbo) with Waymore-A1-Instruct-1011. Use the GET /v1/models endpoint (or client.models.list() in the SDK) to list all available models.

Migration Checklist
  • ☐ Base URL: https://chat.waymore.ai/v1
  • ☐ API key: Generate from LLM Portal dashboard
  • ☐ Model name: Waymore-A1-Instruct-1011
  • ☐ Remove any OpenAI-specific parameters not listed in our API Reference

Migrate from Claude (Anthropic)

5 min

LLM Portal provides a native Anthropic-compatible Messages endpoint at POST https://chat.waymore.ai/v1/messages, alongside the OpenAI-compatible /v1/chat/completions. The two formats live on separate endpoints — Anthropic-style requests go to /v1/messages. Migrating from Claude usually means changing only the base URL, API key, and model name.

1

Point the Anthropic SDK at LLM Portal

The official Anthropic SDKs work out of the box — set the base URL to https://chat.waymore.ai (the SDK appends /v1/messages) and use your LLM Portal API key. The SDK's x-api-key header is accepted, as is Authorization: Bearer:

Python SDK
1import anthropic
2 
3client = anthropic.Anthropic(
4 base_url="https://chat.waymore.ai",
5 api_key="YOUR_API_KEY"
6)
7 
8response = client.messages.create(
9 model="Waymore-A1-Instruct-1011",
10 max_tokens=1024,
11 system="You are a helpful assistant.",
12 messages=[{"role": "user", "content": "Hello"}]
13)
14 
15print(response.content[0].text)
TypeScript SDK
1import Anthropic from "@anthropic-ai/sdk";
2 
3const client = new Anthropic({
4 baseURL: "https://chat.waymore.ai",
5 apiKey: "YOUR_API_KEY"
6});
7 
8const response = await client.messages.create({
9 model: "Waymore-A1-Instruct-1011",
10 max_tokens: 1024,
11 system: "You are a helpful assistant.",
12 messages: [{ role: "user", content: "Hello" }]
13});
2

Or Call /v1/messages Directly

Raw HTTP requests only need a new URL, key, and model name. As with the Anthropic API, model, messages, and max_tokens are required:

cURL
1curl https://chat.waymore.ai/v1/messages \
2 -H "x-api-key: YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "Waymore-A1-Instruct-1011",
6 "max_tokens": 1024,
7 "system": "You are a helpful assistant.",
8 "messages": [{"role": "user", "content": "Hello"}]
9 }'
3

What Works Without Changes

/v1/messages accepts Anthropic-format requests and responds in the Anthropic format:

  • Top-level system field for system prompts
  • Content blocks ([{"type": "text", ...}]) as well as plain string content
  • Tool definitions with input_schema; tool calls via tool_use and results via tool_result content blocks
  • Anthropic response shape (content[], stop_reason, usage.input_tokens/output_tokens)
  • Streaming with Anthropic SSE events (message_start, content_block_delta, message_delta, message_stop)

Authenticate with x-api-key or Authorization: Bearer. The anthropic-version header is not required.

4

Alternative: Convert to the OpenAI Format

If you would rather standardize on the OpenAI-compatible POST /v1/chat/completions endpoint instead, convert your requests: move the top-level system field into a {"role": "system"} message, wrap tools in {"type": "function", "function": {...}} (renaming input_schema to parameters), send tool results as {"role": "tool"} messages, and read choices[0].message.content / finish_reason instead of content[] / stop_reason. See the Migrate from OpenAI and Function Calling guides.

Migration Checklist
  • ☐ Base URL: https://chat.waymore.ai (endpoint: POST /v1/messages)
  • ☐ Auth: x-api-key: YOUR_API_KEY or Authorization: Bearer YOUR_API_KEY
  • ☐ Model name: Waymore-A1-Instruct-1011
  • anthropic-version header — optional, not required
  • ☑ Message format — no changes needed
  • ☑ Tool definitions and results — no changes needed
  • ☑ Streaming events — no changes needed

Streaming Responses

10 min

Enable real-time streaming to receive tokens as they are generated, reducing perceived latency.

1

Enable Streaming

Set stream: true in your request body:

cURL
1curl https://chat.waymore.ai/v1/chat/completions \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "Waymore-A1-Instruct-1011",
6 "messages": [{"role": "user", "content": "Write a poem about coding."}],
7 "stream": true
8 }'
2

Process the Event Stream

The response is a Server-Sent Events (SSE) stream. Each event contains a JSON chunk with the next token:

Event Stream
1data: {"id":"chatcmpl-abc123","choices":[{"delta":{"role":"assistant"},"index":0}]}
2 
3data: {"id":"chatcmpl-abc123","choices":[{"delta":{"content":"In"},"index":0}]}
4 
5data: {"id":"chatcmpl-abc123","choices":[{"delta":{"content":" lines"},"index":0}]}
6 
7data: {"id":"chatcmpl-abc123","choices":[{"delta":{"content":" of"},"index":0}]}
8 
9data: {"id":"chatcmpl-abc123","choices":[{"delta":{"content":" code"},"index":0}]}
10 
11data: [DONE]
3

Concatenate Tokens

Each delta.content field contains a text fragment. Concatenate all fragments to build the complete response. The stream ends with data: [DONE].

Function Calling (Tools)

12 min

Give the model the ability to call custom functions, enabling it to fetch real-time data, interact with external services, or perform calculations. This guide uses the OpenAI tool-calling format on /v1/chat/completions.

1

Define Your Tools

Create a tool definition describing your function's name, purpose, and parameters using JSON Schema:

Tool Definition
1{
2 "type": "function",
3 "function": {
4 "name": "get_weather",
5 "description": "Get the current weather for a given location",
6 "parameters": {
7 "type": "object",
8 "properties": {
9 "location": {
10 "type": "string",
11 "description": "The city and country, e.g. Athens, Greece"
12 },
13 "unit": {
14 "type": "string",
15 "enum": ["celsius", "fahrenheit"],
16 "description": "Temperature unit"
17 }
18 },
19 "required": ["location"]
20 }
21 }
22}

Tip: Write clear descriptions for both the function and each parameter. This helps the model decide when and how to use the tool.

2

Send a Request with Tools

Include the tools array and set tool_choice in your completion request:

cURL
1curl https://chat.waymore.ai/v1/chat/completions \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "Waymore-A1-Instruct-1011",
6 "messages": [
7 {"role": "user", "content": "What is the weather in Athens, Greece?"}
8 ],
9 "tools": [
10 {
11 "type": "function",
12 "function": {
13 "name": "get_weather",
14 "description": "Get the current weather for a given location",
15 "parameters": {
16 "type": "object",
17 "properties": {
18 "location": {"type": "string"},
19 "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}
20 },
21 "required": ["location"]
22 }
23 }
24 }
25 ],
26 "tool_choice": "auto"
27 }'
3

Handle the Tool Call Response

When the model wants to use a tool, the response has finish_reason: "tool_calls" and includes a tool_calls array:

Response
1{
2 "choices": [
3 {
4 "message": {
5 "role": "assistant",
6 "content": "I'll check the current weather in Athens, Greece for you.",
7 "tool_calls": [
8 {
9 "id": "functions.get_weather:0",
10 "type": "function",
11 "function": {
12 "name": "get_weather",
13 "arguments": "{"location": "Athens, Greece"}"
14 }
15 }
16 ]
17 },
18 "finish_reason": "tool_calls"
19 }
20 ]
21}

Parse the arguments field (it's a JSON string) and execute your function with those parameters.

4

Execute the Function

Run your function using the arguments the model provided. In this example, you would call your weather API with location: "Athens, Greece" and get back the current conditions.

5

Submit the Tool Result

Send the function result back to the model in a follow-up request. Include the full conversation history plus a tool role message with the matching tool_call_id:

POST /v1/chat/completions
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.",
8 "tool_calls": [{
9 "id": "functions.get_weather:0",
10 "type": "function",
11 "function": {
12 "name": "get_weather",
13 "arguments": "{"location": "Athens, Greece"}"
14 }
15 }]
16 },
17 {
18 "role": "tool",
19 "tool_call_id": "functions.get_weather:0",
20 "content": "{"temperature": 18, "unit": "celsius", "condition": "Partly cloudy"}"
21 }
22 ],
23 "tools": [...]
24}
6

Receive the Final Response

The model uses the tool result to generate a natural language answer:

Response
1{
2 "choices": [
3 {
4 "message": {
5 "role": "assistant",
6 "content": "In Athens, Greece it's currently partly cloudy with a temperature of 18°C — quite pleasant conditions overall."
7 },
8 "finish_reason": "stop"
9 }
10 ]
11}
Parallel Tool Calls

The model can call multiple tools in one response (e.g., fetching weather for two cities at once). Each call has a unique id. Execute all functions and submit all results as separate tool messages before making the next request.

tool_choice Options

"auto" (default) — model decides. "none" — never call tools. "required" — must call at least one tool.

Managing Chat Sessions

8 min

Organize conversations into sessions to maintain context and history. Sessions are a feature of the web chat interface: the /api/chat/sessions endpoints authenticate with your signed-in browser session (cookie) and are not accessible with API keys.

1

Create a Session

Click "New Chat" in the sidebar to start a named session that groups related messages. Under the hood, the web app calls POST /api/chat/sessions with your browser session:

POST /api/chat/sessions (browser session auth)
1{
2 "title": "Project Research",
3 "model": "Waymore-A1-Instruct-1011"
4}
Response 201
1{
2 "id": "clx_session_abc123",
3 "title": "Project Research",
4 "model": "Waymore-A1-Instruct-1011",
5 "messages": []
6}
2

Send Messages in a Session

When you chat inside a session, the web app associates each completion request with the session via session_id on the web-app endpoint /api/chat/completions:

POST /api/chat/completions
1{
2 "model": "Waymore-A1-Instruct-1011",
3 "messages": [
4 {"role": "user", "content": "Summarize the latest trends in AI."}
5 ],
6 "session_id": "clx_session_abc123"
7}
3

Retrieve Session History

Open a session from the sidebar to review the full conversation history. The web app loads it via the session-cookie-authenticated endpoint:

Endpoint (browser session auth)
1GET /api/chat/sessions/clx_session_abc123/messages
4

Update or Delete Sessions

Rename a session from its context menu in the sidebar, or delete it entirely — deleting a session removes all its messages. The corresponding endpoints (also browser-session authenticated):

Endpoints (browser session auth)
1# Rename a session
2PATCH /api/chat/sessions/clx_session_abc123
3{"title": "AI Research 2025"}
4 
5# Delete a session
6DELETE /api/chat/sessions/clx_session_abc123

API Key Best Practices

8 min

Secure your API keys and follow best practices for production deployments.

1

Use Separate Keys per Environment

Create separate API keys for development, staging, and production. This limits the blast radius if a key is compromised and makes it easy to revoke access for a single environment.

2

Set Appropriate Permissions

Only grant the permissions each key actually needs. A key used only for chat completions should not have image or vision permissions:

Minimal Permissions
1{
2 "name": "Chat Only Key",
3 "permissions": ["chat"],
4 "rpmLimit": 30
5}
3

Enable IP Whitelisting

For production keys, restrict access to your server's IP addresses:

IP Restricted Key
1{
2 "name": "Production Server",
3 "permissions": ["chat", "vision"],
4 "ipWhitelist": ["203.0.113.10", "203.0.113.11"],
5 "monthlyLimit": 500000
6}
4

Set Rate Limits and Expiration

Configure rate limits to prevent runaway costs and set expiration dates for temporary access. Use rpmLimit for requests per minute, dailyLimit and monthlyLimit for token caps, and expiresInDays for auto-expiration.

5

Rotate Keys Regularly

Regenerate API key secrets periodically using the "Regenerate" action on the key's detail page in the dashboard. You get a new secret while keeping the same configuration. Key management endpoints (/api/keys/*) use your signed-in browser session and are not accessible with API keys.

Note: The old key secret is immediately invalidated. Update your applications before or immediately after regenerating.

6

Monitor Key Usage

Regularly review each key's usage to detect anomalies. Per-key usage is readable with an API key:

cURL
1# Usage for a specific key
2curl "https://chat.waymore.ai/api/keys/YOUR_KEY_ID/usage?days=7" \
3 -H "Authorization: Bearer YOUR_API_KEY"

Request history (GET /api/keys/YOUR_KEY_ID/requests) is available on the key's detail page in the dashboard; that endpoint uses your signed-in browser session only.

Working with File Attachments

8 min

Attach files to your chat messages for the AI to analyze, summarize, or extract information from. Attachments are a feature of the web chat interface: the endpoints below authenticate with your signed-in browser session and are not accessible with API keys.

1

Upload a File

Click the paperclip button in the chat input (or drag and drop) to attach a file. The web app uploads it via POST /api/chat/attachments (multipart form, browser session auth) and gets back a file URL to reference in the message.

2

Create a Message with Attachments

The web app then creates the message with the attachment metadata included:

POST /api/chat/messages (browser session auth)
1{
2 "sessionId": "clx_session_abc123",
3 "role": "user",
4 "content": "Summarize the key points from this report.",
5 "model": "Waymore-A1-Instruct-1011",
6 "attachments": [
7 {
8 "name": "report.pdf",
9 "type": "application/pdf",
10 "size": 245000,
11 "url": "/uploads/abc123/report.pdf"
12 }
13 ]
14}
3

File Size and Format Limits

Each file can be up to 50MB. You can attach up to 5 files per message. Supported formats include images (PNG, JPG, GIF, WebP), documents (PDF, DOC, DOCX, TXT), data files (CSV, JSON, XML), and code files.

Organizing Content with Collections

10 min

Save content from conversations and organize it into collections for easy retrieval. Saving items and managing collections happens in the web dashboard (those write endpoints use your signed-in browser session), while reading your library is also available programmatically: GET /api/stuff and GET /api/stuff/stats accept Authorization: Bearer with an API key.

1

Save Content to Your Library

Save images, code snippets, notes, or any valuable content from your conversations. The web app stores each item via:

POST /api/stuff (browser session auth)
1{
2 "title": "Python Data Processing Script",
3 "type": "CODE",
4 "content": "import pandas as pd\n\ndf = pd.read_csv('data.csv')\nresult = df.groupby('category').sum()",
5 "description": "Pandas script for aggregating data by category",
6 "tags": ["python", "pandas", "data"]
7}
2

Create a Collection

Group related items into a collection with a custom name and color:

POST /api/collections (browser session auth)
1{
2 "name": "Data Science",
3 "description": "Code snippets and notes for data analysis",
4 "color": "#8B5CF6",
5 "icon": "database"
6}
3

Add Items to the Collection

Add content items to your new collection:

POST /api/collections/COLLECTION_ID/items (browser session auth)
1{"itemId": "CONTENT_ITEM_ID"}
4

Search and Filter Your Library

Use the search box and filters on the My Stuff page — or query your library programmatically. GET /api/stuff and GET /api/stuff/stats accept your API key as a Bearer token:

cURL
1# Search by keyword
2curl "https://chat.waymore.ai/api/stuff?search=pandas&type=CODE" \
3 -H "Authorization: Bearer YOUR_API_KEY"
4 
5# Filter by collection
6curl "https://chat.waymore.ai/api/stuff?collectionId=COLLECTION_ID&sortBy=newest" \
7 -H "Authorization: Bearer YOUR_API_KEY"
8 
9# Get only favorites
10curl "https://chat.waymore.ai/api/stuff?favorite=true&limit=10" \
11 -H "Authorization: Bearer YOUR_API_KEY"
12 
13# Library statistics
14curl "https://chat.waymore.ai/api/stuff/stats" \
15 -H "Authorization: Bearer YOUR_API_KEY"

Monitoring Your Usage

5 min

Track your API consumption, costs, and performance to stay within budget. Use the dashboard's Usage page, or query programmatically: GET /api/usage/summary and GET /api/keys/{keyId}/usage accept Authorization: Bearer with an API key. Each /v1/chat/completions response also includes a per-request usage field.

1

Check Overall Usage

Query the usage summary endpoint for an overview of your consumption:

cURL
1curl "https://chat.waymore.ai/api/usage/summary?period=30d" \
2 -H "Authorization: Bearer YOUR_API_KEY"
Response
1{
2 "stats": {
3 "totalRequests": 1250,
4 "totalTokens": 320000,
5 "inputTokens": 120000,
6 "outputTokens": 200000,
7 "totalCost": 4.85,
8 "avgResponseTime": 920,
9 "errorRate": 0.8
10 }
11}
2

Filter by Model or API Key

Narrow down usage data using query parameters on the summary endpoint:

cURL
1# Filter by model
2curl "https://chat.waymore.ai/api/usage/summary?period=7d&model=Waymore-A1-Instruct-1011" \
3 -H "Authorization: Bearer YOUR_API_KEY"

The available filter options (models, keys, date presets) are listed in the dashboard's Usage page filter controls; the GET /api/usage/filters endpoint behind them uses your signed-in browser session only.

3

Review Cost Breakdown

The usage summary includes a cost breakdown by token type (input vs output) and by model. Use this to understand where your budget is going and optimize your prompts for cost efficiency.

4

Set Up Key-Level Monitoring

Monitor individual API keys to track which integrations consume the most tokens:

cURL
1# Per-key usage
2curl "https://chat.waymore.ai/api/keys/KEY_ID/usage?days=7" \
3 -H "Authorization: Bearer YOUR_API_KEY"

Per-key request history (GET /api/keys/KEY_ID/requests) is available on the key's detail page in the dashboard; that endpoint uses your signed-in browser session only.

Updated February 2026