Skip to content

Drive

Files, folders and sharing, with storage you can add to.

Open Drive
Checked against the dashboard on November 18, 2026

Everything the Drive screens do with your files can be done from code. Each act has a method whose name ends in _user, which always means your own account's Drive. The same acts exist with _workspace and _studio endings for a workspace's Drive and for Studio's build files: those are other surfaces, and the full list is at the end.

Every call is a POST to /cpi/<method> with a JSON body that carries your API key:

bash
curl -X POST https://xuda.ai/cpi/get_drive_files_user \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_API_KEY","path":"/","sort_by":"date","sort_dir":"desc"}'

The answer is the folders and files of the path you asked for. A file or folder is named by its file_path and its type, which is file or directory.

What each screen does, as a call

Moving to Trash is a soft delete. A file comes back with restore_trashed_files_user until it is purged. delete_drive_files_user deletes for good without going through Trash.

Working inside something shared with you

Most _user methods take an optional share_id. Give the share_id of a Shared with me row and the call works in the sharer's Drive, at the level the share gives you, on the shared item or inside a shared folder only: Read lists and opens, Read and write also renames, uploads and moves inside it, Admin also trashes, deletes and makes it public.

Sharing

Who a file is shared with is not a Drive method. The share window of a file calls create_share and get_shares with access_type set to user_drive and the file's path as share_item_id. share_level is read, readwrite or admin.

Every Drive method

Plans

An upload is not refused for lack of space. See Plans and billing for what counts toward your space and what happens past it.

How is this guide?

Last updated on November 15, 2026