Skip to content
lynxby

API

The same product, from your own backend.

The product API runs the same assistants, tasks and triggers the interface shows, from your own backend. Ask a question and stream the answer, run a task with its form, and read the run afterwards. Your backend calls it directly, and every call lands in the same record.

1

a scoped machine token, no second login

Streamed

the same events the chat screen reads

Retry-safe

your own request identifier, reused on every retry

Audited

key, route and actor on every call

Start from code

Three lines to your first run.

The SDK is generated from the same OpenAPI document the API publishes, so it can't describe an endpoint that doesn't exist. There are two clients, TypeScript and Python, and neither has dependencies of its own.

  1. Sign in and open Settings → API tokens.
  2. Create a token with the scopes you need and copy it once.
  3. Set LYNXBY_TOKEN and LYNXBY_BASE_URL on your server, then pick an id from GET /api/v1/tasks.

With an Idempotency-Key, a repeated request returns the first answer instead of starting a second turn. A 429 is retried with jitter and then surfaces as a typed error, and breaking out of a stream closes the request.

Install instructions, client reference and examples: github.com/LynxbyAI/lynxby-sdk.

Copy failed. Select the code and copy it manually.

import { Lynxby } from '@lynxby/sdk'

const lynx = new Lynxby()
const run = await lynx.tasks.run(8, { text: 'A long letter.' })
console.log(run.answer)

The surface

Your systems can do what the interface does.

The API exposes the resources a machine integration needs and nothing more. Every call goes through the permission model.

Assistants and chat

List and read assistants, then send a message with the assistant's own instructions, knowledge and tools. Continue a session by its id, or start one and take the id from the answer.

Sessions and messages

Read the conversations the token started, with their title, message count and last activity, and page through the turns in one session.

Tasks and runs

Read a task's form, run it with the values the form allows, retry a run from its original inputs, and read the run's answer, steps, model, tokens and cost afterwards.

Triggers, approvals, budgets and usage

Start a trigger by hand, decide a parked run or a blocked write, and read the budgets and the spend for any window, in days, weeks or months.

Lists use a cursor and a hard page-size cap. Creating calls need an idempotency key. Every error carries a machine code, a human message and the request id, and every authenticated call is written to the record.

MCP

The agent you already use can query your knowledge.

Your organisation also answers the Model Context Protocol at POST /mcp. Claude Code, Claude Desktop, Copilot, OpenCode or Codex can query your knowledge without any glue code.

One endpoint

JSON-RPC 2.0 over streamable HTTP at https://lynxby.com/mcp. One message per request, bearer token or OAuth. The endpoint is stateless, so a redeploy does not break a client.

You choose the tools

The token's exposure profile decides what tools/list describes. The default is ask_lynxby; switch on search, document reads or read-only connector actions on Settings → MCP exposure.

The same record

Every MCP call is an event: the tool, the status, the duration and the client. Connector output is fenced as untrusted data, never as instructions.

Tool calls only

MCP does not carry model traffic. A harness that keeps its own provider key stays outside the record unless it also uses the model gateway.

Setup for each client: MCP guide.

One product

The API is part of the same product.

The token is the platform's existing machine credential. It uses the same permissions, separation and record as a person's session.

A scoped token

A token from the organisation settings, scoped to what it may do. There's no separate API account or user table, and no way around the groups and roles.

Your organisation only

A record from another organisation answers 404, not 403, because a 403 would confirm it exists. The token's organisation is the only one the call can see.

Every call recorded

Every call is a row with the key, route, actor and status, including the refused ones. A wrong scope leaves a trace.

A generated contract

The OpenAPI 3.1 document is generated from the route table, and the generator fails if a route is missing. So the docs and the JSON always match the routes.

Machine identities

Give each integration its own account.

A service account is a user row with groups like anyone else and its own credentials. It can't open the interface, and your team can see it, audit it and switch it off.

Its own identity

It has a name, a generated address and a description naming the system and its owner. It doesn't borrow a person's account, sign in through the browser or take a user slot.

Groups decide what it may do

Put it in the groups the integration needs; the permissions are the union of their roles, exactly as they are for a person. There is no separate grant model and no per-account exception.

Least privilege, enforced

The token's scopes and the identity's group permissions must both allow a call. Deactivation keeps every row and every token and stops them all on the next request, so one action ends access without losing the history.

Nothing breaks by surprise

Before anyone confirms a delete, it lists the tokens, the triggers that run as it and the integrations it spends. Creating, deactivating and deleting are written to the record.

Put one workflow on the API.

Tell us about the integration you want to build. We'll create a scoped token, run it against your own assistant or task, and show you the stream and the record entry. Which workflow would you start with?

Search all guides