# Use MandAPI for chat in Cursor

Set the OpenAI-compatible endpoint in Cursor and start with a supported chat model.

## Choose a supported chat model

Cursor's own-key integration is intended for chat models. Tab completion continues using Cursor's built-in service, and a working chat connection does not establish support for every Agent feature. Team policies can restrict personal keys. Cursor's own plan charges may also apply; your MandAPI balance covers the model requests sent to MandAPI.

Select an exact MandAPI model ID that works with OpenAI-compatible Chat Completions and your installed Cursor build. Use that value wherever this guide says `MODEL_ID`.

## Set the endpoint through Cursor's interface

Open **Cursor Settings → Models**, expand **API Keys**, and find **OpenAI API Key**. Enter your MandAPI key privately, enable use of that key, then enable **Override OpenAI Base URL**.

```text
OpenAI API Key: your private MandAPI key
Override OpenAI Base URL: https://api.mandapi.com/v1
Custom model ID: MODEL_ID
```

Save the settings. Add the exact model ID to Cursor's model list if your version provides an Add model control. These are application settings; editing a project's VS Code JSON is not a documented substitute for the credential interface.

## Start a small chat

Restart Cursor, open a new chat and select the configured model rather than Auto. Ask it to explain a short function without editing files. Check the corresponding request in your MandAPI usage dashboard. Then try the particular coding actions you need.

## Resolve model and credential errors

If the API Keys section is hidden or requests are rejected by team policy, check with the team administrator. If a request reaches the wrong provider, inspect which credential slot Cursor selects: model-name prefixes can affect that choice. Do not rename a model only in Cursor when MandAPI expects a different exact ID; choose another supported real ID or use the Claude Code recipe for Anthropic routing.

If the custom connection fails, verify the override, key switch and model selection. To return to your previous setup, disable the override and restore the previous selected provider.

## References

- [https://cursor.com/help/models-and-usage/api-keys](https://cursor.com/help/models-and-usage/api-keys)
- [https://forum.cursor.com/t/how-to-adjust-settings-for-custom-added-models/173253](https://forum.cursor.com/t/how-to-adjust-settings-for-custom-added-models/173253)
- [https://forum.cursor.com/t/openai-api-and-override-base-url-values/148140](https://forum.cursor.com/t/openai-api-and-override-base-url-values/148140)
- [https://openrouter.ai/docs/cookbook/coding-agents/cursor-integration](https://openrouter.ai/docs/cookbook/coding-agents/cursor-integration)
