Pular para o conteúdo principal
GET
/
api
/
v1
/
llm
/
files
Python (SDK)
from openapi import SDK


with SDK(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:

    res = sdk.llm.files.list(after="file-abc123", limit=100, order="desc", purpose="assistants")

    # Handle response
    print(res)
{
  "object": "list",
  "data": [
    {
      "id": "file-abc123",
      "object": "file",
      "bytes": 125000,
      "created_at": 1704067200,
      "filename": "product-manual.pdf",
      "purpose": "assistants",
      "status": "processed"
    }
  ],
  "first_id": "file-abc123",
  "last_id": "file-abc123",
  "has_more": false
}

Autorizações

Authorization
string
header
obrigatório

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Parâmetros de consulta

after
string
Exemplo:

"file-abc123"

limit
integer
padrão:10000
Intervalo obrigatório: 1 <= x <= 10000
Exemplo:

100

order
enum<string>
padrão:desc
Opções disponíveis:
asc,
desc
Exemplo:

"desc"

purpose
enum<string>
Opções disponíveis:
assistants,
batch,
fine-tune,
vision,
user_data,
evals
Exemplo:

"assistants"

Resposta

200 - application/json

OK

object
any
obrigatório
data
object[]
obrigatório
has_more
boolean
obrigatório
first_id
string
last_id
string