POST
/
generate
curl --request POST \
  --url https://api.contextual.ai/v1/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "<string>",
  "messages": [
    {
      "content": "<string>",
      "role": "user"
    }
  ],
  "knowledge": [
    "<string>"
  ],
  "system_prompt": "<string>",
  "avoid_commentary": false,
  "temperature": 0,
  "top_p": 0.9,
  "max_new_tokens": 1024
}'
{
  "response": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

/generate input request object.

Response

200
application/json
Successful Response

/generate result object.