SDK reference

REST API

The hosted gateway at https://api.trycaspianai.com. Prefer Caspian(api_key=…) / cx.run() / caspian call. This page is the wire the hosted client already speaks.

Bearer auth. JSON. Errors: 401/403 auth, 402 credit, 429 rate limit.

Identity

POST /v1/connections/{channel}Hosted add. Some channels use /install instead.
POST /v1/connections/{provider}/installOAuth / shared-app install URL.
GET /v1/connectionsJSON array.
GET /v1/channelsWhat this gateway can actually speak.

Inbound

GET /v1/eventsWhat cx.run() polls. Cursor in query params.

Outbound (gateway outbox)

The hosted adapter maps core commands to these — you do not call them from a handler:

Account

Agent-readable guide: GET /SKILL.md and GET /llms.txt on the gateway.