Install the SDK
The TypeScript SDK wraps the public /v1 API. It ships dual ESM + CJS with bundled types and runs on Node 18+, Bun, Deno, or any runtime with a global fetch.
npm install @seachat/platform-sdk
# or: bun add @seachat/platform-sdk
AI agents: prefer the Markdown version of this page at /docs/index.md. For the full corpus, read /docs/llms-full.txt.
Agent-native API documentation
Build on the SeaChat Platform API: a single Bearer key over the stable /v1 facade for chat, multimodal, threads, tools, files, documents, and usage, with a typed TypeScript SDK.
10 minute path
The TypeScript SDK wraps the public /v1 API. It ships dual ESM + CJS with bundled types and runs on Node 18+, Bun, Deno, or any runtime with a global fetch.
npm install @seachat/platform-sdk
# or: bun add @seachat/platform-sdk
Every request carries a SINGLE credential: Authorization: Bearer <apiKey>. The SDK never also sends x-api-key. The base URL defaults to https://seachat.ai; all paths live under /v1.
import { SeaChat } from "@seachat/platform-sdk";
const client = new SeaChat({ apiKey: process.env.SEACHAT_API_KEY! });
client.chat.completions.create posts to /v1/chat/completions (OpenAI-compatible). Pass stream: true to get an AsyncIterable of chunks instead of one result.
const completion = await client.chat.completions.create({
model: "claude-opus-4-8",
messages: [{ role: "user", content: "Greet the ocean in one short line." }],
max_tokens: 64,
});
console.log(completion.choices[0].message.content);
Every SDK method maps to a plain HTTP route. The same first call over curl, using the same single Bearer credential:
curl https://seachat.ai/v1/chat/completions \
-H "Authorization: Bearer $SEACHAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-8",
"messages": [{"role":"user","content":"Greet the ocean in one short line."}],
"max_tokens": 64
}'
Machine-readable
Compact page index and decision rules for language-model agents.
llms-full.txtFull Markdown corpus for offline indexing and large-context agents.
OpenAPIPublic developer API surface for clients, code generators, and tool planners.
CapabilitiesRoute catalog with access, scopes, schemas, examples, and runtime-safety metadata.
Capability-first APIs
SeaChat publishes a gateway capability catalog so agents can reason from declared capability ids, required scopes, stability, schemas, examples, and runtime safety before choosing a route.
/v1/docs/{path}
/v1/docs/{path}
/v1/docs/{path}
/v1/docs/{path}
/v1/files/{fileId}/content
/v1/files/{fileId}
/v1/files/{fileId}
/v1/files
/v1/auth/keys
/v1/auth/keys