Dedicated.Token

Tokenization

By giving a text input, generate a tokenized output of token IDs.

post/dedicated/v1/tokenize

Request

Headers

X-Friendli-Teamstring nullable

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

Request body

modelstring 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.

promptstring required

Input text prompt to tokenize.

Example request

{
  "model": "(endpoint-id)",
  "prompt": "What is generative AI?"
}

Response

Successfully tokenized the text.

tokensinteger[] required

A list of token IDs.

Changes

No recorded changes to this operation across all 1 revision of this API.