LM-Kit OneDocs2026.9.7lm-kit.comEULA
API Compatibility

OpenAI · Files

Lists the caller's files.#

GET/v1/files

Every file in the caller's bucket, newest first (pass order=asc for oldest first). 'purpose' keeps only files uploaded for that purpose, 'after' resumes past a file id, and 'limit' caps the page; has_more says whether a further page exists.

Parameters

NameInTypeDescription
purposequerystring

Only files uploaded with this purpose.

limitqueryobject (int32)

Page size, 1 to 10000.

orderquerystring

'asc' or 'desc' (default) by creation time.

afterquerystring

The file id to resume after.

Responses

StatusTypeDescription
200

OK

curl -X GET "$LMKIT_ONE_URL/v1/files" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Uploads a file.#

POST/v1/files

Request body

multipart/form-data · object

Responses

StatusTypeDescription
200

OK

curl -X POST "$LMKIT_ONE_URL/v1/files" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: multipart/form-data"

Retrieves a file's metadata.#

GET/v1/files/{fileId}

Parameters

NameInTypeDescription
fileIdrequiredpathstring

Responses

StatusTypeDescription
200

OK

curl -X GET "$LMKIT_ONE_URL/v1/files/$FILEID" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Deletes a file.#

DELETE/v1/files/{fileId}

Removes the file from the caller's bucket. Documents already indexed from it stay indexed: a vector store keeps its own copy of the text.

Parameters

NameInTypeDescription
fileIdrequiredpathstring

Responses

StatusTypeDescription
200

OK

curl -X DELETE "$LMKIT_ONE_URL/v1/files/$FILEID" \
  -H "Authorization: Bearer $LMKIT_API_KEY"