Skip to content
中文

Get file metadata

Upload a file first, then replace the example file ID with its returned ID.

GET/anthropic/v1/files/{file_id}● Supported

Official Anthropic docs ↗

Request parameters

  • file_idstringrequired

    path:

Returns

200

Errors follow the Anthropic format — see error codes

Request

curl
# Upload a file first, then replace the example file ID with its returned ID.
curl https://api.deepraxis.com/anthropic/v1/files/file_123 \
  -H "x-api-key: $PRAXIS_API_KEY" \
  -H "anthropic-version: 2023-06-01"
Python
# Upload a file first, then replace the example file ID with its returned ID.
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.deepraxis.com/anthropic",
    api_key="$PRAXIS_API_KEY",
)

file = client.files.retrieve_metadata("file_123")
TypeScript
// Upload a file first, then replace the example file ID with its returned ID.
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://api.deepraxis.com/anthropic",
  apiKey: "$PRAXIS_API_KEY",
});

const file = await client.files.retrieveMetadata("file_123");

Response 200

{
  "id": "file_dp_01M42FVDJD8QGPRQ0059E7V056",
  "type": "file",
  "filename": "pixel.png",
  "mime_type": "image/png",
  "size_bytes": 70,
  "created_at": "2026-10-04T03:38:18.651Z",
  "expires_at": null,
  "downloadable": false
}

Response

HTTP 200

Metadata

application/json

Name Type Description
id string Unique object identifier. The format and length of IDs may change over time.
created_at string RFC 3339 datetime string representing when the file was created.
filename string Original filename of the uploaded file.
mime_type string MIME type of the file.
size_bytes number Size of the file in bytes.
type string Object type. For files, this is always "file".
downloadable boolean Whether the file can be downloaded.
expires_at null | string RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with expires_in_seconds, this is the upload time plus that value.
scope null | object The scope of this file, indicating the context in which it was created (e.g., a session).
scope.id string The ID of the scoping resource (e.g., the session ID).
scope.type string The type of scope (e.g., "session").