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?"}'
Copy
{ "question": "What is the generic name for the drug Bavencio?", "answer": "avelumab", "sources": [ { "file_id": "1234", "snippet": "Bavencio is the brand name for avelumab." } ]}
Knowledge Graphs API
Question
Ask a question to specified Knowledge Graphs.
POST
/
v1
/
graphs
/
question
cURL
Copy
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?"}'
Copy
{ "question": "What is the generic name for the drug Bavencio?", "answer": "avelumab", "sources": [ { "file_id": "1234", "snippet": "Bavencio is the brand name for avelumab." } ]}