Files

Get File Information

Retrieves metadata for a specific uploaded file.

get/v1/files/{file_id}

Request

  • Base URL: https://api.moonshot.ai
  • URL: https://api.moonshot.ai/v1/files/{file_id}
  • Auth: HTTP bearer

Path parameters

file_idstring required

The file identifier

Response

File metadata

idstring required

Unique file identifier

objectstring required

Object type

bytesinteger required

File size in bytes

created_atinteger required

Unix timestamp when the file was created

filenamestring required

Original file name

purpose'file-extract' | 'image' | 'video' | 'batch' required

Purpose used when uploading the file. file-extract: extract content from text-based files (such as pdf, doc, txt); images are not supported; image: upload images for vision understanding; video: upload videos for video understanding; batch: upload JSONL files for batch processing

statusstring required

Processing status of the file

status_detailsstring

Additional status details when processing fails or returns warnings

Example response

{
  "object": "file",
  "status": "ready"
}

Changes

No recorded changes to this operation across all 1 revision of this API.