Download file content
Upload a file first, then replace the example file ID with its returned ID.
GET
/anthropic/v1/files/{file_id}/content● SupportedRequest parameters
file_idstringrequiredpath:
Returns
400
Only files produced by the code execution tool can be downloaded; downloading a file you uploaded yourself (purpose user_data) returns 400 invalid_request_error, the same as Anthropic's own API.
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/content \
-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",
)
content = client.files.download("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 content = await client.files.download("file_123");Response 400
{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "Uploaded user_data files are not downloadable through the Anthropic Files API."
}
}Response
HTTP 200
Binary content
No response body is declared.