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:
| Item | Where to Find It |
|---|---|
| Base URL | Copy from this page: https://www.potatoai.cc/v1 |
| API key | Create it in the Potato API console. |
| Model name | Copy the full model name from the Potato API console. |
| Quota | Confirm 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.
https://www.potatoai.cc/v1https://www.potatoai.cc/v1/chat/completions4. 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
| Field | Value |
|---|---|
| API format | OpenAI Compatible |
| Base URL | https://www.potatoai.cc/v1 |
| API key | Your Potato API key |
| Model name | The 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
/v1is not missing. - Save the settings, restart Trae, and try again.
