Detokenize
POST/detokenize/:reader_id
Detokenize
The detokenization endpoint takes in a list of tokens, and returns the decoded version of the text: the way the text is seen by the model with the path-supplied reader_id.
The reader_id
can be found as the model's key in the live_readers
object, returned by the status endpoint.
It can also be supplied at boot time for each model in the config: see here for more information.
Request​
Path Parameters
reader_id stringrequired
The ID of the reader to use for detokenization.
- application/json
Body
required
- MOD1
- MOD2
Array [
]
Array [
]
skip_special_tokens booleannullable
tokens
object
required
oneOf
string
integer
Responses​
- 200
- 400
- 422
- 503
Takes in a JSON payload and returns the response all at once.
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
Array [
]
skip_special_tokens booleannullable
tokens
object
required
oneOf
string
integer
{
"skip_special_tokens": true,
"tokens": [
null
]
}
Bad request
Malformed request body
The server is not ready to process requests yet.
Loading...