Agent frameworks & integrations

Three ways to put LivePair behind another tool, depending on what the tool speaks:

Your tool speaks…Use this surfaceAuth
OpenAI chat completionsPOST https://livepairai.com/v1/chat/completionsAuthorization: Bearer lp_…
OpenAI-compatible multi-model basehttps://livepairai.com/v1/agent — serves /chat/completions, /models, /images/generations (see OpenAI-compatible apps)lp_ key or x402 USDC
Raw model catalog, non-streamingPOST https://livepairai.com/v1/agent/chat (alias /chat/completions)lp_ key or x402 USDC
MCP toolshttps://livepairai.com/mcpnone — keys/x402 ride the tool calls
HTTP 402 paymentsPOST /v1/agent/generate, POST /v1/agent/chat, POST /v1/agent/images/generationswallet settles per call

Get an lp_ key: sign up, top up at /billing, create the key in Settings → API keys.

OpenAI-compatible chat clients

Anything that takes a base URL + API key works out of the box:

Base URL: https://livepairai.com/v1
API key:  lp_your_key
Model:    joy

That endpoint serves the LivePair copilot brain (labelled joy) — a persistent session agent, not a raw model picker. Replies always stream as SSE (text/event-stream), so clients that require a non-streaming JSON body aren't a fit; token counts arrive in the final chunk's usage for clients that read stream accounting.

For the raw catalog (the model families listed under textModels in GET /v1/agent/models) use POST /v1/agent/chat: same {model, messages, max_tokens} request shape, same {choices, usage} response, billed per token against your prepaid credits. It returns one JSON object, never SSE, and accepts the same lp_ key on Authorization: Bearer or x-api-key.

# OpenAI SDK → LivePair
from openai import OpenAI
client = OpenAI(base_url="https://livepairai.com/v1", api_key="lp_…")
print(client.chat.completions.create(
    model="joy",
    messages=[{"role": "user", "content": "hi"}],
).choices[0].message.content)

Agent frameworks

Coding agents (Claude Code, Cursor, OpenCode, Codex, Kimi Code) — install the CLI and run livepair skill install; it writes a SKILL.md the agent loads on demand, teaching it models → run → download. No MCP server required — the agent drives the CLI with shell commands it already knows.

Hermes Agent / OpenClaw-style self-hosted assistants — point the framework's OpenAI-compatible provider at https://livepairai.com/v1 with your lp_ key for chat. For image/video, call POST /v1/agent/generate directly from the framework's HTTP/tool node — the body is {model, prompt} (see GET /v1/agent/models for ids), the response is {jobId} to poll on GET /v1/agent/jobs/{jobId}.

MCP hosts (Claude Code/Desktop, Cursor, VS Code, Windsurf, Gemini CLI, Cline, or anything MCP-compatible) — add the remote server once:

{ "mcpServers": { "livepair": { "url": "https://livepairai.com/mcp" } } }

Eleven tools appear: prompt library, model catalog + recommender, prompt enhancement, paid image/video generation, and LLM text — details in MCP server. With x-api-key: lp_… on the MCP request, generate_image executes inline; without a key the tool returns the x402 endpoint your wallet settles.

SillyTavern & roleplay frontends

SillyTavern's Chat Completion → Custom (OpenAI-compatible) source takes a base URL and key — point it at the raw catalog:

Custom Endpoint: https://livepairai.com/v1/agent
API key:         lp_your_key
Model:           deepseek/deepseek-v4.1-flash   (type it — see below)

SillyTavern appends /chat/completions itself, which is aliased to our /v1/agent/chat handler. In the character/response settings turn off streaming — the endpoint returns a single JSON object, not SSE — and keep max_tokens tight, since output is billed per token against your prepaid credits.

Model ids are the textModels entries from GET /v1/agent/models — deepseek, kimi, llama, qwen, grok and friends. Pick a different model by typing its id into SillyTavern's model field; nothing needs reinstalling.

Two hard caps to know for long roleplays: 50 messages / 48,000 chars per request. SillyTavern's context management handles trimming, but if you push context depth to the max you'll hit the cap — dial "context size" down until requests stop 413ing. Prompts are screened by the same policy layer as the studio; rejected calls never settle.

n8n / workflow automation

The community node @livepairai/n8n-nodes-livepair wraps all of it — a model dropdown backed by the live catalog and built-in job polling. Details in n8n node. Telegram (or Slack/Discord/email) in, generated media out: Telegram Trigger → LivePair (Generate Media) → Telegram sendPhoto/sendVideo.

On Make/Zapier or a bare n8n HTTP node the manual recipe still works — two endpoints and a JSON body:

  1. HTTP Request → POST https://livepairai.com/v1/agent/generate
    • Headers: x-api-key: lp_…, Content-Type: application/json
    • Body: {"model": "<model id>", "prompt": "{{ $json.message.text }}"}
  2. Wait + HTTP Request → GET /v1/agent/jobs/{{ $json.jobId }} until status === "done" (url is the hosted media URL — files auto-delete, so forward them to storage you control if they must persist).

Agents that pay for themselves (x402)

An agent holding a USDC wallet needs no account and no key: call POST /v1/agent/generate, receive 402 Payment Required with the exact USDC amount on Base, settle, and retry with PAYMENT-SIGNATURE. Any x402 client (@x402/fetch, thirdweb, a wallet layer that answers 402) drives it end-to-end:

import { x402fetch } from "@x402/fetch"; // wallet-aware fetch
const res = await x402fetch("https://livepairai.com/v1/agent/generate", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ model: "<model id>", prompt: "…", payer: myWallet }),
});

Passing a payer wallet address accrues lifetime-volume discounts — see API reference for the tiers. Resale is permitted: agents may sell generated media to their own users.

Limits to know

  • /v1/agent/chat does not stream and has no function calling — it's a completions surface, not a full chat-runtime clone.
  • /v1/chat/completions always streams and serves the single joy copilot model; GET /v1/models requires a browser session, not a key.
  • No embeddings or fine-tuning endpoints — the catalog is generation/chat only.
  • Rate limits: 6 paid generations/min per payer or key; policy rejections and failed calls never settle.

Full endpoint schemas live in /v1/agent/openapi.json and the API reference.