POST
/
v1
/
completions
curl --location --request POST https://api.writer.com/v1/completions \
 --header "Authorization: Bearer <token>" \
 --header "Content-Type: application/json" \
--data-raw '{"model":"palmyra-x-003-instruct","prompt":"Write me a short SEO article about camping gear","max_tokens":150,"temperature":0.7,"top_p":0.9,"stop":["."],"best_of":1,"random_seed":42,"stream":false}'
{
  "choices": [
    {
      "text": "Sure! Here's a search engine optimized article about...",
      "log_probs": null
    }
  ],
  "model": "palmyra-x-003-instruct"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your Writer API key.

Body

application/json

Response

200
application/json
Successful response

The response is of type object.