POST
/
v1
/
tools
/
text-to-graph
cURL
curl --location --request POST https://api.writer.com/v1/tools/text-to-graph \
 --header "Authorization: Bearer <token>" \
 --header "Content-Type: application/json" \
--data-raw '{"text":"A racecar has very powerful brakes that can decelerate from 200 km/h to 0 km/h in a few seconds"}'
{
  "graph": [
    [
      "racecar [RACECAR]",
      "has_component",
      "brakes [COMPONENT]"
    ],
    [
      "racecar [RACECAR]",
      "can_perform",
      "decelerate [ACTION]"
    ],
    [
      "racecar [RACECAR]",
      "has_property",
      "powerful [PROPERTY]"
    ],
    [
      "200 km/h [VELOCITY]",
      "decreased_to",
      "0 km/h [VELOCITY]"
    ],
    [
      "decelerate [ACTION]",
      "performed_by",
      "racecar [RACECAR]"
    ]
  ]
}

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.