OpenAPI & Custom Integrations

Connect LexiChat to any REST API — paste an OpenAPI spec or define your own HTTP endpoint in seconds.

hub Overview

Beyond the built-in tools, LexiChat lets you add arbitrary HTTP endpoints as callable tools. There are two ways to do this:

description
OpenAPI Import

Paste a JSON or YAML OpenAPI 3.x spec and LexiChat automatically generates one tool per API operation. Best for well-documented public or internal APIs.

build
Custom Tools

Define a single HTTP endpoint with a form — name, URL template, method, and parameters. Best for simple webhooks or internal APIs without a full spec.

description OpenAPI Import

LexiChat parses OpenAPI 3.x specifications (JSON or YAML). Each operation (GET /users/{id}, etc.) becomes one tool the AI can call.

How to import a spec
1

Open the Tools panel — click the wrench icon in the toolbar, then Import OpenAPI

2

Paste your OpenAPI JSON or YAML into the text area, then click Parse

3

Review the list of detected tools (operation ID, method, path, description)

4

Click Register All — tools are now available to the AI immediately

What gets extracted
check_circle Operation ID → tool name
check_circle summary / description → tool description
check_circle Path parameters ({id}) → required params
check_circle Query parameters → optional params
check_circle Request body properties → body params
check_circle HTTP method and base URL

Example OpenAPI spec

Here's a minimal spec that exposes a weather lookup endpoint. Paste this to try it out:

{
  "openapi": "3.0.0",
  "info": {
    "title": "Weather API",
    "version": "1.0"
  },
  "servers": [
    { "url": "https://api.open-meteo.com/v1" }
  ],
  "paths": {
    "/forecast": {
      "get": {
        "operationId": "get_weather",
        "summary": "Get weather forecast for a location",
        "parameters": [
          {
            "name": "latitude",
            "in": "query",
            "required": true,
            "schema": { "type": "number" },
            "description": "Latitude of the location"
          },
          {
            "name": "longitude",
            "in": "query",
            "required": true,
            "schema": { "type": "number" },
            "description": "Longitude of the location"
          },
          {
            "name": "current_weather",
            "in": "query",
            "required": false,
            "schema": { "type": "boolean" },
            "description": "Include current conditions"
          }
        ]
      }
    }
  }
}

After importing, the AI can answer questions like "What's the weather in London?" by calling get_weather with the coordinates it looks up.

build Custom Tools

For simple HTTP integrations that don't have an OpenAPI spec, use the Custom Tool builder to define an endpoint by hand.

Custom tool fields
Field Description
Name Tool identifier shown to the model (snake_case, no spaces)
Description Tells the AI what this tool does and when to use it — be specific
URL Full URL with {param} placeholders for path params
Method GET, POST, PUT, DELETE, PATCH
Parameters Add one or more params — each has name, type, location (path/query/body), description, required flag
Parameter locations
path

Substituted directly into the URL. Requires a matching {paramName} in the URL template.

query

Appended to the URL as ?key=value. Works for GET requests and can be used with any method.

body

Sent as a JSON key in the request body. LexiChat sets Content-Type: application/json automatically.

Example: GitHub Repository Info

A custom tool to fetch public GitHub repo metadata:

Name
get_github_repo
Description
Get metadata for a public GitHub repository including stars, forks, and description
URL
https://api.github.com/repos/{owner}/{repo}
Method
GET
Parameters
owner string path The GitHub username or organisation required
repo string path The repository name required

Once registered, you can ask: "How many stars does the ollama/ollama repo have?" and the AI will call the tool automatically.

// AI generates this call
{
  "name": "get_github_repo",
  "arguments": {
    "owner": "ollama",
    "repo": "ollama"
  }
}

// LexiChat makes: GET https://api.github.com/repos/ollama/ollama
// Returns JSON → fed back to model

lock Authentication

When adding an OpenAPI spec or MCP connection, you can configure authentication. LexiChat supports four methods:

key
Bearer token — sends Authorization: Bearer <token> on every request.
vpn_key
API key — a custom header name and value (e.g. X-API-Key: secret).
person
Basic auth — username and password, base64-encoded automatically into the Authorization header.
open_in_browser
OAuth2 — client-credentials or authorization-code flow. For the auth-code flow, LexiChat opens your browser for the consent screen and exchanges the code for tokens automatically.

settings_applications Managing Tools

All tools (built-in and custom) are listed in the Tools panel. From here you can:

toggle_on
Enable / Disable
Toggle individual tools on or off. Disabled tools are hidden from the AI — it won't call them even if relevant. Useful for reducing the schema payload sent to the model.
delete
Remove Custom Tools
Click the delete icon next to any custom or OpenAPI-imported tool to remove it permanently. Built-in tools cannot be removed (only disabled).
source
View Tool Source
Hover over a tool to see its source group (Built-in / OpenAPI: <title> / Custom).

info Current Limitations

schema
OpenAPI 3.x only. Swagger 2.0 specs are not supported. Convert with the Swagger Editor if needed.
data_object
JSON responses only. Tools must return JSON. Non-JSON responses (HTML, plain text) will be returned as raw strings to the model.
token
Context window usage. Each registered tool adds JSON schema to every request. With many tools, consider disabling unused ones to preserve context for the conversation.