Skip to content

Use Potato API in Trae

Trae supports custom OpenAI-compatible model services. After configuring the Potato API endpoint and API key, you can route Trae chat and coding assistant requests through the same Potato API quota.

Configuration Goal

Add Potato API as a custom OpenAI-compatible provider in Trae, then test it with a short message before using it for coding tasks.

Before You Configure

Prepare these values first:

ItemWhere to Find It
Base URLCopy from this page: https://www.potatoai.cc/v1
API keyCreate it in the Potato API console.
Model nameCopy the full model name from the Potato API console.
QuotaConfirm the account or token has enough quota.

Configuration Steps

1. Open the Model Provider Settings

Open Trae settings, then go to AI / Models / Model Provider or the custom model configuration area.

2. Add a Custom Provider

Choose OpenAI Compatible or Custom OpenAI Endpoint as the provider type.

3. Fill In the Endpoint

Use the Base URL by default. If Trae asks for the full chat endpoint, use the second value.

text
https://www.potatoai.cc/v1
text
https://www.potatoai.cc/v1/chat/completions

4. Enter the API Key

Paste the dedicated API key created in the Potato API console. Make sure there are no leading or trailing spaces.

5. Enter the Model Name

The model name must be exactly the same as the model list in the Potato API console. Letter case, hyphens, dots, and version suffixes all matter.

Model Names Must Match

If the model name is even slightly different, Trae may report that the model does not exist.

6. Save and Test

After saving the configuration, open the chat panel or coding assistant and send a short test message to verify connectivity.

Parameter Reference

FieldValue
API formatOpenAI Compatible
Base URLhttps://www.potatoai.cc/v1
API keyYour Potato API key
Model nameThe full model name shown in the Potato API console

Usage Recommendations

If you enable both Trae built-in models and Potato API custom models, give relay models distinctive display names:

  • PotatoAPI GPT-4o
  • PotatoAPI Claude 3.5 Sonnet

This helps avoid selecting the wrong provider when switching models.

Troubleshooting

Request Returns 401
  • Check whether the API key was copied completely.
  • Remove extra spaces before or after the key.
  • Confirm the key is enabled and the quota is not exhausted.
Model Does Not Exist
  • Copy the model name exactly as shown in the Potato API console.
  • Check whether the current token group has permission to access the model.
  • Confirm you did not paste the display name instead of the actual model name.
Connection Failed
  • Confirm the Base URL is https://www.potatoai.cc/v1.
  • Make sure /v1 is not missing.
  • Save the settings, restart Trae, and try again.