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}/install | OAuth / shared-app install URL. |
GET /v1/connections | JSON array. |
GET /v1/channels | What this gateway can actually speak. |
Inbound
GET /v1/events | What 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:
POST /v1/conversations/{id}/messagesPOST /v1/messages/{id}/reply·/edit·/react·/typingPOST /v1/connections/{id}/initiate
Account
POST /v1/auth/device/start+/token— CLIcaspian loginGET /v1/billing·POST /v1/billing/topupGET /v1/domains— hosted email domains
Agent-readable guide: GET /SKILL.md and GET /llms.txt on the gateway.