cURL
curl --location --request GET https://api.writer.com/v1/models \
--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"),
)
model = client.models.list()
print(model.models)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();{
"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"
}
]
}Completions API
List models
Retrieve a list of available models that can be used for text generation, chat completions, and other AI tasks.
GET
/
v1
/
models
cURL
curl --location --request GET https://api.writer.com/v1/models \
--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"),
)
model = client.models.list()
print(model.models)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();{
"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"
}
]
}Deprecation notice: Palmyra X4 (
palmyra-x4) will be deprecated on November 18, 2026.Migration path: Use Palmyra X5 (palmyra-x5) or Palmyra X6 (palmyra-x6) instead. Palmyra X5 and X6 have a 1M token context window (Palmyra X4 is 128k). On Amazon Bedrock, use us.writer.palmyra-x5-v1:0. See pricing for cost details and the deprecation policy for more information.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your Writer API key.
Response
200 - application/json
Successful response
The ID of the model to use for processing the request.
Show child attributes
Show child attributes
Was this page helpful?