# TRAE

Use Felo API Platform from TRAE through compatible model provider settings.

Use this guide when TRAE lets you configure a custom OpenAI-compatible or Anthropic-compatible model provider.

## Before You Start

You need one Felo API Platform key. The same key works across model protocols, agent clients, Search, Web Fetch, PPT, Mindmap, LiveDocs, X Search, YouTube Subtitling, Landing Page, and SuperAgent APIs.

```bash
export FELO_API_KEY="YOUR_API_KEY"
```

## Recommended Setup

| Item | Value |
|------|-------|
| Best for | AI IDE workflows, code generation, repo Q&A, and assisted editing |
| Protocol | OpenAI-compatible endpoint by default |
| Base URL | `https://openapi.felo.ai/api/v1` |
| Model example | `claude-sonnet-4-6` |
| API key | Your `FELO_API_KEY` |

## Configure TRAE

Set the environment variables first:

```bash
export FELO_API_KEY="YOUR_API_KEY"
export OPENAI_API_KEY="$FELO_API_KEY"
export OPENAI_BASE_URL="https://openapi.felo.ai/api/v1"
```

### Client fields

| Field | Value |
|-------|-------|
| Provider type | OpenAI-compatible |
| API key | Your `FELO_API_KEY` |
| Base URL | `https://openapi.felo.ai/api/v1` |
| Model | `claude-sonnet-4-6` |

If TRAE provides an Anthropic-compatible mode, use `https://openapi.felo.ai/api` as the base URL and keep the same API key.

## Verify the Setup

Run a small task after saving the configuration:

```bash
Open TRAE, choose the custom provider, and start a chat or coding task.
```

If the tool starts and answers with the selected model, the provider setup is ready.

## Troubleshooting

| Issue | What to check |
|-------|---------------|
| Authentication fails | Confirm the key is copied correctly and exported as `FELO_API_KEY` |
| Tool calls the wrong provider | Check that the Felo provider is selected for the current workspace or session |
| Base URL error | Use `https://openapi.felo.ai/api/v1` for OpenAI-compatible clients and `https://openapi.felo.ai/api` for Anthropic-compatible clients |
| Model not found | Choose a model that appears in your Felo model list |
| The tool ignores local config | Move provider settings to the user-level config if the client requires it |

## Next Steps

- [Getting Started](https://openapi.felo.ai/docs/getting-started.md)
- [LLM API Reference](https://openapi.felo.ai/docs/guides/protocols.md)
- [Chat API Reference](https://openapi.felo.ai/docs/api-reference/chat.md)
- [SuperAgent API Reference](https://openapi.felo.ai/docs/api-reference/superagent.md)
