Overview
One endpoint, one response envelope, and the 337 methods an API key can reach.
Every screen in the Xuda dashboard, every Studio program, and every third-party integration calls
the same HTTP surface: CPI, short for the platform's method dispatcher. There is one endpoint
shape, /cpi/<method>, and one response envelope. Learning it once covers all 337 methods an
account API key can reach today.
The endpoint
<method> is a method name such as get_account_projects or dbs_read, never a resource path
with an id in it. Every input, including an id, is a parameter: on POST it is a field in a JSON
body, on GET it is a query string parameter (see Calling a method for
the body-versus-query rules and worked examples in cURL, JavaScript and Python).
The docs are served at xuda.ai/docs, so the sandbox on this site calls /cpi/<method>
same-origin. Your own code, running anywhere, calls https://xuda.ai/cpi/<method> directly.
The envelope
Every method, success or failure, answers the same shape:
code > 0is success. The number itself carries no meaning beyond being positive, readdata.code < 0is an error.datais usually a message string; a validation failure also adds amessagefield derived from it. See Errors for the codes worth branching on and the ones you should just log and surface.- A method that returns a file or a custom content type (a CSV export, an image) skips the JSON envelope and sets its own headers and body instead. That is the exception, not the rule.
- A successful response carries an
xu-regionheader naming the Xuda region that handled the call. An error response does not carry it.
Clearance and the private wall
Every method carries a clearance: public, user, user_access, developer or admin. This
is who may reach it over a signed-in dashboard session: a public method needs nothing, the
rest need a session at or above that level.
An API key is a separate wall, not another clearance. A method also carries a private flag.
private: true is absolute: no API key can call it, not even one with full access, regardless of
its clearance. Roughly a quarter of the catalog is public in that sense: 337 methods across 24
microservices, spanning everything from Voice and Domains to Drive and the Studio authoring API.
The rest, including every method on api_module itself (the methods that create and manage API
keys), stay session-only. Authentication covers full versus custom key
access, and each module guide below ends with the live table of what its microservice exposes.
Finding a method
The interactive API reference lists all 337 methods with their fields, and lets you run one against your own account right from the browser.