Download file - Writer AI Studio

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

cURL

curl --location --request GET https://api.writer.com/v1/files/{file_id}/download \
 --header "Authorization: Bearer <token>"

Python Example

import os
from writerai import Writer

client = Writer(
    # This is the default and can be omitted
    api_key=os.environ.get("WRITER_API_KEY"),
)
response = client.files.download(
    "file_id",
)
print(response)
content = response.read()
print(content)

JavaScript Example

import Writer from 'writer-sdk';

const client = new Writer({
  apiKey: process.env['WRITER_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const response = await client.files.download('file_id');

console.log(response);

const content = await response.blob();
  console.log(content);
}

main();

Response Example

200

"File contents"

Authorizations

Authorization

Path Parameters

Response

200 - application/octet-stream