List files - 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 \
 --header "Authorization: Bearer <token>"
import os
from writerai import Writer

client = Writer(
    # This is the default and can be omitted
    api_key=os.environ.get("WRITER_API_KEY"),
)
page = client.files.list()
page = page.data[0]
print(page.id)
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() {
  // Automatically fetches more pages as needed.
  for await (const file of client.files.list()) {
    console.log(file.id);
  }
}

main();

Response Example

200

{
  "data": [
    {
      "id": "7c36a365-392f-43ba-840d-8f3103b42572",
      "name": "example.pdf",
      "created_at": "2024-07-10T12:00:00Z",
      "graph_ids": [
        "31a8b75a-9a90-432f-8861-942229125333"
      ],
      "status": "in_progress"
    },
    {
      "id": "4bbe6207-737e-486f-a287-c5e95536984a",
      "name": "image.jpg",
      "created_at": "2024-07-09T15:30:00Z",
      "graph_ids": [
        "31a8b75a-9a90-432f-8861-942229125333"
      ],
      "status": "completed"
    },
    {
      "id": "efc86bb4-30a4-40c9-a52a-ecee0d7e071f",
      "name": "document.txt",
      "created_at": "2024-07-08T16:00:00Z",
      "graph_ids": [
        "31a8b75a-9a90-432f-8861-942229125333"
      ],
      "status": "failed"
    }
  ],
  "has_more": false,
  "first_id": "7c36a365-392f-43ba-840d-8f3103b42572",
  "last_id": "efc86bb4-30a4-40c9-a52a-ecee0d7e071f"
}

Query Parameters