Skip to content
中文

Retrieve file content

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

GET/openai/v1/files/{file_id}/content● Supported

Official OpenAI docs ↗

Request parameters

  • file_idstringrequired

    path: The ID of the file to use for this request.

Returns

200

Errors follow the OpenAI 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/openai/v1/files/file_123/content \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
Python
# Upload a file first, then replace the example file ID with its returned ID.
from openai import OpenAI

client = OpenAI(
    base_url="https://api.deepraxis.com/openai/v1",
    api_key="$PRAXIS_API_KEY",
)

content = client.files.content("file_123")
TypeScript
// Upload a file first, then replace the example file ID with its returned ID.
import OpenAI from "openai";

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

const content = await client.files.content("file_123");

Response 200

Original 70-byte PNG (base64):
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==

Response

HTTP 200

OK

application/octet-stream

Name Type Description
$ string (binary)