POST /v1/tokenize
This endpoint splits input text into smaller units called tokens using byte-pair encoding (BPE). To learn more about tokenization and byte pair encoding, see the tokens page.
Servers
- https://api.cohere.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
X-Client-Name |
String | No |
The name of the project that is making the request. |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
text |
String | Yes |
The string to be tokenized, the minimum text length is 1 character, and the maximum text length is 65536 characters. |
model |
String | Yes |
The input will be tokenized by the tokenizer that is used by this model. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.