openapi: 3.1.0 info: title: Friendli Suite API Reference Container.Audio Container.Token API description: This is an OpenAPI reference of Friendli Suite API. termsOfService: https://friendli.ai/terms-of-service contact: name: FriendliAI Support Team email: support@friendli.ai version: 0.1.0 servers: - url: https://api.friendli.ai tags: - name: Container.Token paths: /v1/tokenize: servers: - url: http://localhost:8000 post: tags: - Container.Token summary: Tokenization description: Convert text input into token IDs. operationId: containerTokenization requestBody: content: application/json: schema: $ref: '#/components/schemas/ContainerTokenizationBody' required: true responses: '200': description: Successfully tokenized the text. content: application/json: schema: $ref: '#/components/schemas/ContainerTokenizationSuccess' examples: Example: value: tokens: - 128000 - 3923 - 374 - 1803 - 1413 - 15592 - 30 '422': description: Unprocessable Entity x-speakeasy-name-override: tokenize x-mint: metadata: title: Container Tokenization sidebarTitle: Tokenization og:title: Container Tokenization description: Convert text input into token IDs. og:description: Convert text input into token IDs. href: /openapi/container/tokenization content: Convert text input into token IDs. /v1/detokenize: servers: - url: http://localhost:8000 post: tags: - Container.Token summary: Detokenization description: Convert a list of token IDs back into text. operationId: containerDetokenization requestBody: content: application/json: schema: $ref: '#/components/schemas/ContainerDetokenizationBody' required: true responses: '200': description: Successfully detokenized the tokens. content: application/json: schema: $ref: '#/components/schemas/ContainerDetokenizationSuccess' examples: Example: value: text: What is generative AI? '422': description: Unprocessable Entity x-speakeasy-name-override: detokenize x-mint: metadata: title: Container Detokenization sidebarTitle: Detokenization og:title: Container Detokenization description: Convert a list of token IDs back into text. og:description: Convert a list of token IDs back into text. href: /openapi/container/detokenization content: Convert a list of token IDs back into text. components: schemas: ContainerTokenizationBody: properties: model: anyOf: - type: string - type: 'null' title: Model description: Routes the request to a specific adapter. examples: - (adapter-route) prompt: type: string title: Prompt description: Input text prompt to tokenize. examples: - What is generative AI? type: object required: - prompt title: ContainerTokenizationBody example: prompt: What is generative AI? ContainerDetokenizationSuccess: properties: text: type: string title: Text description: Detokenized text output. type: object required: - text title: ContainerDetokenizationSuccess ContainerTokenizationSuccess: properties: tokens: items: type: integer type: array title: Tokens description: A list of token IDs. type: object required: - tokens title: ContainerTokenizationSuccess ContainerDetokenizationBody: properties: model: anyOf: - type: string - type: 'null' title: Model description: Routes the request to a specific adapter. examples: - (adapter-route) tokens: items: type: integer type: array title: Tokens description: A token sequence to detokenize. examples: - - 128000 - 3923 - 374 - 1803 - 1413 - 15592 - 30 type: object required: - tokens title: ContainerDetokenizationBody example: tokens: - 128000 - 3923 - 374 - 1803 - 1413 - 15592 - 30 securitySchemes: token: type: http description: '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](https://friendli.ai/docs/openapi/introduction#authentication).' scheme: bearer x-speakeasy-retries: strategy: backoff backoff: initialInterval: 500 maxInterval: 60000 maxElapsedTime: 3600000 exponent: 1.5 statusCodes: - 429 - 500 - 502 - 503 - 504 retryConnectionErrors: true