Client API Reference
This is the operational, endpoint-by-endpoint reference for OMNI Client API. For schema-level request/response definitions (and interactive “try it” functionality), use:Client API (Generated)in the left navigation/sources/client-api-openapi
Base URL
Production:Authentication and global headers
All endpoints require an OMNI API key:| Header | Required | Used for |
|---|---|---|
Authorization: Bearer ... | Yes | Auth to Client API and hosted MCP transport. |
Omni-Version: YYYY-MM-DD | No | Behavior pinning during beta. Recommended for production integrations. |
X-Request-Id: req_... | No | End-to-end trace correlation (echoed back and included in errors). |
Idempotency-Key: idem_... | Conditional | Required for POST /v1/mcp/invoke and hosted MCP tools/call over POST /mcp. |
Content-Type: application/json | Conditional | Required when sending JSON bodies. |
Endpoint contract matrix
| Endpoint | Method | Required scopes | Billable units | Idempotency-Key | Status | Common error codes |
|---|---|---|---|---|---|---|
/v1/openapi.json | GET | auth only | 1 on success | No | Stable | missing_api_key, invalid_api_key, auth_rejected, rate_limit_exceeded, service_disabled |
/v1/health | GET | auth only | 1 on success | No | Stable | missing_api_key, invalid_api_key, auth_rejected, rate_limit_exceeded, service_disabled |
/v1/fred/search | GET | fred.read | 1 on success | No | Stable | missing_q, invalid_parameter, insufficient_scope, auth/rate-limit codes |
/v1/fred/series/{series_id} | GET | fred.read | 1 on success | No | Stable | missing_series_id, invalid_parameter, insufficient_scope, auth/rate-limit codes |
/v1/mcp/tools | GET | mcp.tools.read | 1 on success | No | Deprecated compatibility route | insufficient_scope, auth/rate-limit codes |
/v1/mcp/invoke | POST | mcp.invoke + tool scope | 1 on first success | Yes | Deprecated compatibility route | missing_idempotency_key, invalid_json, invalid_payload, unknown_tool, idempotency_conflict, mcp_invocation_failed |
/mcp | POST | method-dependent | 1 for tools/list/tools/call success | Required for tools/call | Canonical hosted MCP route | JSON-RPC errors -32700, -32600, -32601, -32602, -32001, -32002, -32603 |
/mcp | GET | auth only | 0 | No | Hosted stream transport | auth/rate-limit codes |
/mcp | DELETE | auth only | 0 | No | Session close | auth/rate-limit codes |
/sse | GET | auth only | 0 | No | Compatibility transport | auth/rate-limit codes |
Endpoint-by-endpoint playbooks
GET /v1/openapi.json
Purpose:
- Canonical source of contract truth for generated references, SDK generation, and CI contract diffing.
- Treat OpenAPI diffs as release-gating input.
- Pin
Omni-Versionwhen validating contract upgrades.
GET /v1/health
Purpose:
- Fast auth sanity check and request-id plumbing validation.
GET /v1/fred/search
Query parameters:
qrequired stringlimitoptional integer (1-50, default10)
- normalize + cache by
(q, limit) - fail fast on invalid local inputs to reduce avoidable
400s
GET /v1/fred/series/{series_id}
Path/query parameters:
series_idrequired path string- optional
observation_start,observation_end(YYYY-MM-DD) limitoptional integer (default1000)
- cache by
(series_id, observation_start, observation_end, limit) - handle sparse/empty datasets without assuming row presence
GET /v1/mcp/tools (legacy compatibility)
Migration target:
- replace with hosted MCP
tools/listoverPOST /mcp
POST /v1/mcp/invoke (legacy compatibility)
Required headers:
- replace with hosted MCP
tools/calloverPOST /mcp
Hosted MCP (/mcp, /sse)
Hosted MCP is the canonical MCP integration surface.
Method-level scope rules for POST /mcp:
| JSON-RPC method | Required scopes |
|---|---|
initialize | auth only |
notifications/initialized | auth only |
ping | auth only |
tools/list | mcp.tools.read |
tools/call | mcp.invoke + tool scope(s) |
tools/call safety rules:
Idempotency-Keyis required.- On replay, OMNI returns
Idempotency-Replayed: true. - Replays do not double bill.
POST /mcp initialize sequence
- send
initialize - send
notifications/initialized(notification; noid) - then call
tools/listandtools/call
GET /mcp
Returns stream transport metadata (text/event-stream).
DELETE /mcp
Best-effort session close (204 on success).
GET /sse
SSE compatibility bootstrap route. Prefer /mcp for net-new integrations.
Global billing semantics
- only successful calls (
2xx/3xx) are billable - failed calls (
4xx/5xx) are non-billable - idempotency replays are non-billable
- transport-only MCP calls (
GET /mcp,DELETE /mcp,GET /sse) are zero-unit
Global integration checklist
- pin
Omni-Versionin production - send/log
X-Request-Idon every call - enforce scoped keys and least privilege
- use idempotency for write-like methods
- implement retry policy from
/sources/client-api-retries - branch on machine fields only (
error.type,error.code, JSON-RPC codes)
Related docs
/sources/client-api-endpoints/sources/client-api-openapi/sources/client-api-errors/sources/client-api-migrations/sources/client-api-retries