## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://dev.writer.com/llms.txt)

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

### cURL

```
curl --location --request GET https://api.writer.com/v1/models \
 --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"),
)
model = client.models.list()
print(model.models)
```

### 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 model = await client.models.list();

console.log(model.models);
}

main();
```

### Response Example

200
```
{
  "models": [
    {
      "name": "Palmyra X 003 Instruct",
      "id": "palmyra-x-003-instruct"
    },
    {
      "name": "Palmyra Med",
      "id": "palmyra-med"
    },
    {
      "name": "Palmyra Financial",
      "id": "palmyra-fin"
    },
    {
      "name": "Palmyra X4",
      "id": "palmyra-x4"
    },
    {
      "name": "Palmyra X5",
      "id": "palmyra-x5"
    },
    {
      "name": "Palmyra Creative",
      "id": "palmyra-creative"
    }
  ]
}
```

### Authorizations

Authorization

- **Type:** string
- **Location:** header
- **Required:** Yes

Bearer authentication header of the form `Bearer <token>`, where `<token>` is your [Writer API key](https://dev.writer.com/api-reference/api-keys).

### Response

**200** - application/json

Successful response includes:
- **models:** object[] (required)

The [ID of the model](https://dev.writer.com/home/models) to use for processing the request.
