SereChat
Apps
← Back to SereChat

Docs

SereChat App API

Connect any application — CLI tools, agents, scripts — to a user's SereChat account. Use an OpenAI-compatible LLM endpoint and a separate async media endpoint, both billed to the user's balance.


How it works

The SereChat App API uses a device-code-style authorization flow. Your app starts an authorization request and receives a request_id. The user opens the SereChat authorization page in their browser, reviews what your app is asking for, and approves it — at which point they receive a short numeric code. They paste that code into your app, and your app exchanges it for a long-lived bearer token. From that point on, every API call is billed against the user's SereChat balance.

There is no app registration, no dashboard, and no client secret to protect. Any app can initiate a request by providing a human-readable app_name. The user sees that name on the approval screen and decides whether to authorize it.

Base URL

plaintext
https://serechat.com

Authentication

Inference endpoints require a Bearer token in the Authorization header:

http
Authorization: Bearer <your_access_token>

Tokens are valid for one year from issuance and can be revoked at any time by the user from their Profile → Connected Applications.

Pricing

LLM usage is charged against the authorized user's SereChat balance at the per-token rates listed in the Models reference. Media generation consumes Sparks and returns an async job to poll.

The App API is designed for programmatic clients. For browser-based integrations, use the standard SereChat UI or contact support.