When run as a webserver, xtas exposes a simple REST API to its tasks. To tokenize a string using this API, you need to make two HTTP requests, one to start a task and one to wait until it has completed. Assuming default settings for the webserver, you can try:

$ curl -H "Content-type: text/plain" -X POST -d 'Hello, world!' \

The last line shows an id for the job that you submitted. Since tokenization is very fast, you can immediately query the REST endpoint again to get the results from the tokenization:

$ curl
["Hello", ",", "world", "!"]

Passing arguments to the task is also possible. To do so, you have to send the API request as JSON, as follows:

$ curl -H "Content-type: application/json" -X POST -d \
    '{"data": "Hello, world!", "arguments": {"output": "rank"}}'

All single-document tasks can be called in this way. The arguments should be JSON-wrapped versions of the arguments ordinarily passed to the Python functions (see API reference).