Skip to content

General Configuration Tutorial

OpenAI Compatible Protocol

The OpenAI compatible protocol is the most widely used interface standard in the LLM field. Most AI software and plugins support this protocol. This means you only need to obtain an API key from TokenHub to access almost all mainstream AI tools, including code editors, chat clients, note-taking software, translation plugins, etc.

Configuration Prerequisites

Please ensure the software/plugin meets the following requirements:

    1. Supports OpenAI compatible protocol
    1. Updated to the latest version

General Configuration Process

  1. Open the software/plugin you want to configure
  2. Find the Settings/Preferences page
  3. Locate the AI/Model/API related tab in settings
  4. Find and enable the Custom Model/OpenAI Compatible/Third-party API option
  5. Paste the API key you copied from TokenHub in the API Key input box
  6. Paste the corresponding address in the Base URL/Endpoint address input box (choose one based on the following scenarios)
Endpoint TypeAddressUse Case
Base URLhttps://ai-tokenhub.com/api/v1Base address to fill when developing with OpenAI compatible SDK, SDK will automatically complete the endpoint path
Chat Completionhttps://ai-tokenhub.com/api/v1/chat/completionsUse when sending HTTP requests directly to call chat conversation interface
Responseshttps://ai-tokenhub.com/api/v1/responsesUse when sending HTTP requests directly to call async task result query interface
  1. Enter the model name/model ID you want to use in the model name input box (must be a model allowed by your token and the name must match exactly)

Example: doubao-seed-2-0-lite-260215

  1. Click Save/Verify/Add button to complete the configuration

Parameter Details

Parameter NameDescriptionNotes
API KeyYour authentication tokenThe key corresponding to your token, do not include extra spaces or line breaks when copying
Base URLInterface root addressFill according to the applicable address
Model NameThe LLM ID you want to callMust match exactly with the platform model list, case-sensitive