Documentation

Filament routes prompts to any supported model via a single endpoint.
OpenAI-compatible. No SDK required.

Quickstart

Get an API key from /app/keys. All requests require:

Authorization: Bearer fl-...
Content-Type: application/json

POST /api/route

Route a prompt to any model.

Request body:
{
  "prompt": "string",         // required
  "model": "auto|claude|gpt|gemini",  // default: auto
  "system": "string",         // optional system prompt
  "tools": [],                // wired tools to expose
  "session_id": "string"      // optional session context
}

Response: OpenAI-compatible chat completion object
+ filament.model_used, filament.latency_ms, filament.status

GET /api/observe

Retrieve trace logs.

Query params:
  session_id  — filter by session
  limit       — records per page (default: 50)
  offset      — pagination offset

Response: { traces: TraceLog[], total: number }

POST /api/wire

Register an HTTP endpoint as a tool.

{
  "name": "string",
  "endpoint": "https://...",
  "schema": {},
  "auth_header": "Bearer ..."  // optional, encrypted at rest
}

Response: { tool_id, status: "wired" }

PATCH /api/session/:id

Hot-swap the active model for a session.

{ "model": "claude|gpt|gemini" }

Swaps without breaking session context or tool bindings.

skill.md

Machine-readable capability spec available at:
GET /skill.md

Returns plain text. Paste into any agent that supports skill discovery.