v22

latestOpenAPI 3.1.0raw.githubusercontent.com2025-10-15361989.5 KB

Get a file

Get the details of a file.

Example cURL request:

curl -s \
  -H "Authorization: Token $REPLICATE_API_TOKEN" \
  https://api.replicate.com/v1/files/cneqzikepnug6xezperrr4z55o
get/files/{file_id}

Path parameters

file_idstring required

The ID of the file to get

Response

Success

content_typestring required

The content / MIME type of the file

created_atstring date-time required

When the file was created

expires_atstring date-time required

When the file expires

idstring required

A unique, randomly-generated identifier for the file resource

metadataobject required

Metadata provided by user when the file was created

sizeinteger required

The length of the file in bytes

Example response

{
  "checksums": {
    "sha256": "f047f8e745f9996c6e386064e06cb2007b8e6bc0a968a334fc0d2b2d64012066"
  },
  "content_type": "application/zip",
  "created_at": "2024-02-21T12:54:18.578761Z",
  "expires_at": "2024-02-21T13:54:18.578761Z",
  "id": "cneqzikepnug6xezperrr4z55o",
  "metadata": {
    "customer_reference_id": 123
  },
  "size": 69420,
  "urls": {
    "get": "https://api.replicate.com/v1/files/cneqzikepnug6xezperrr4z55o"
  }
}