Skip to main content
POST
Tokenization

Authorizations

Authorization
string
header
required

When using Friendli Suite API for inference requests, you need to provide a Friendli Token for authentication and authorization purposes.

For more detailed information, please refer here.

Headers

X-Friendli-Team
string | null

ID of team to run requests as (optional parameter).

Body

application/json
model
string
required

ID of target endpoint. If you want to send request to specific adapter, use the format "YOUR_ENDPOINT_ID:YOUR_ADAPTER_ROUTE". Otherwise, you can just use "YOUR_ENDPOINT_ID" alone.

Example:

"(endpoint-id)"

prompt
string
required

Input text prompt to tokenize.

Example:

"What is generative AI?"

Response

Successfully tokenized the text.

tokens
integer[]
required

A list of token IDs.

Last modified on June 9, 2026