API Compatibility
OpenAI · Files
Lists the caller's files.#
GET
/v1/filesEvery 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
| Name | In | Type | Description |
|---|---|---|---|
purpose | query | string | Only files uploaded with this purpose. |
limit | query | object (int32) | Page size, 1 to 10000. |
order | query | string | 'asc' or 'desc' (default) by creation time. |
after | query | string | The file id to resume after. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK |
curl -X GET "$LMKIT_ONE_URL/v1/files" \
-H "Authorization: Bearer $LMKIT_API_KEY"Uploads a file.#
POST
/v1/filesRequest body
multipart/form-data · object
Responses
| Status | Type | Description |
|---|---|---|
| 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
| Name | In | Type | Description |
|---|---|---|---|
fileIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 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
| Name | In | Type | Description |
|---|---|---|---|
fileIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK |
curl -X DELETE "$LMKIT_ONE_URL/v1/files/$FILEID" \
-H "Authorization: Bearer $LMKIT_API_KEY"