POST
/
v1
/
graphs
/
question
curl --location --request POST https://api.writer.com/v1/graphs/question \
 --header "Authorization: Bearer <token>" \
 --header "Content-Type: application/json" \
--data-raw '{"graph_ids":[{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}],"question":"What is the generic name for the drug Bavencio?"}'
{
  "question": "What is the generic name for the drug Bavencio?",
  "answer": "avelumab",
  "sources": [
    {
      "file_id": "1234",
      "snippet": "Bavencio is the brand name for avelumab."
    }
  ]
}

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

The response is of type object.