TokenByteTokenByte Docs

Trae

Use TokenByte from Trae IDE

Trae is ByteDance's AI-native IDE, with built-in Chat, Builder, and Agent modes. Trae doesn't ship a generic "OpenAI-compatible" provider, but its OpenAI and Anthropic providers both accept a Custom Request URL, so either one can be pointed at TokenByte.

Prerequisites

  • Trae IDE desktop app installed (IDE mode or SOLO mode)
  • A TokenByte API key from the console

Configuration

Open model settings

Click the Settings icon in the top-right of the Trae window (in SOLO mode, the same icon lives in the top-right of the chat panel). In the left navigation, pick Models, then click + Add Model — the Add Model dialog opens.

Pick a provider and set the custom URL

Either of the two paths below works — pick one:

  • Provider: OpenAI
  • Model: click Other Models and enter the model ID manually, e.g. gpt-5.4, claude-sonnet-4-5, gpt-5-codex
  • API Key: paste your TokenByte key (starts with sk-tb-)
  • Custom Request URL: https://api.tokenbyte.ai/v1/chat/completions

Trae expects the full request path here, not a base URL. This path can reach every model family behind TokenByte (Claude, Gemini, and more) — just use the TokenByte-side model ID.

  • Provider: Anthropic
  • Model: click Other Models and enter a Claude model ID, e.g. claude-sonnet-4-5, claude-opus-4-6
  • API Key: paste your TokenByte key
  • Custom Request URL: https://api.tokenbyte.ai/v1/messages

This path only reaches Claude-family models. For mixed-provider routing, use OpenAI.

Click Add Model. Trae validates by calling the provider immediately — a bad key, URL, or model ID surfaces in the dialog's error log.

Select it in a conversation

In Chat / Builder / Agent, open the model dropdown at the top — the TokenByte model you just added is now listed. When building a custom agent, the Use custom models section under the agent config references the same list.

Verify

Open Chat and ask something small, e.g. "Summarize this project in three sentences." A coherent reply means you're set.

Settings → Models lets you Enable / Disable or delete custom models at any time. A disabled model stays in the list but is hidden from the chat model picker — handy for toggling without re-entering credentials.

Trae's inline autocomplete (Tab-key) is powered by a separate engine called Tab-Cue, which cannot be pointed at a custom provider — the TokenByte setup only applies to Chat / Builder / Agent. If you want routing for completions too, use a third-party completion extension or another IDE.

Stuck? See the FAQ.

On this page