Skip to main content
GET
List files in the Session filesystem

Headers

kimi-api-version
enum<string>

API version for this request, in YYYY-MM-DD form. Send 2026-09-01-beta for the version documented here. Required outside /v1/files*: a missing header there is rejected with 400 invalid_request_error; on /v1/files* its absence selects the compatibility behavior. An unknown value is rejected with 400 invalid_request_error on every endpoint. API versions served by the platform. New dated versions are added as they ship; a version is removed after its announced Sunset date.

Available options:
2026-09-01-beta

Path Parameters

id
string
required

Session ID.

Query Parameters

prefix
string

Directory to list, relative to the Session file root. Omit it to list the root.

Response

The directory's direct contents, directories first.

The direct contents of a directory in a Session filesystem.

items
object[]
required

Files and directories in the requested directory.

Example: