Saltar al contenido principal
GET
/
api
/
v1
/
llm
/
files
/
{file_id}
Python (SDK)
from openapi import SDK


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

    res = sdk.llm.files.get(file_id="file-abc123")

    # Handle response
    print(res)
{
  "id": "file-abc123",
  "object": "file",
  "bytes": 125000,
  "created_at": 1704067200,
  "filename": "product-manual.pdf",
  "purpose": "assistants",
  "status": "processed"
}

Autorizaciones

Authorization
string
header
requerido

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 ruta

file_id
string
requerido

Respuesta

200 - application/json

Está bien

id
string
requerido

El identificador del archivo

bytes
integer
requerido

El tamaño del archivo en bytes

Rango requerido: -9007199254740991 <= x <= 9007199254740991
created_at
integer
requerido

Marca de tiempo Unix cuando se creó el archivo

Rango requerido: -9007199254740991 <= x <= 9007199254740991
filename
string
requerido

El nombre del archivo

purpose
enum<string>
requerido

El propósito previsto del archivo

Opciones disponibles:
assistants,
batch,
fine-tune,
vision,
user_data,
evals
object
any
predeterminado:file
expires_at
integer | null

Sello de tiempo Unix cuando el archivo expira

Rango requerido: -9007199254740991 <= x <= 9007199254740991
status
enum<string>

OBSOLETO: Estado del procesamiento de archivos

Opciones disponibles:
uploaded,
processed,
error
status_details
string

DESACONSEJADO: Detalles sobre el estado del archivo