# SillyTavern: API returned an error (Bad Request)

> SillyTavern says API returned an error: Bad Request? Check the endpoint, the exact model ID and the context size. Causes and fix steps.

In SillyTavern, "API returned an error: Bad Request" usually means the request itself was rejected: a model ID that does not exist, an endpoint with /chat/completions added, or a prompt plus response length larger than the model allows. Check the Custom endpoint, copy the exact model ID and lower the context or response length.

## What causes it?

- The model field holds a display name or route label instead of the model ID.
- The Custom endpoint has /chat/completions added after /v1.
- Context size plus response length is larger than the model's context window.
- A sampler setting the model does not accept.

## How do I fix it?

In this order. [The SillyTavern setup guide](https://outrun.to/docs/setup/sillytavern) has the full setup.

- Set API type Chat Completion and source Custom (OpenAI-compatible).
- Set the Custom endpoint to https://api.outrun.to/v1, with nothing after /v1.
- Copy the exact model ID from the price list, for example glm-5.3-flash-uncensored.
- Lower the context size or the response length and try again.

**SillyTavern connection settings**

```
API type: Chat Completion
Chat Completion Source: Custom (OpenAI-compatible)
Custom endpoint: https://api.outrun.to/v1
API key: your Outrun key
Model ID: glm-5.3-flash-uncensored
```

## Questions

### Why does SillyTavern say Bad Request but other apps work?

SillyTavern sends its own context and sampler settings. A context or response length above the model's limit, or a wrong model ID, is rejected as a bad request.

### Is a model name the same as a model ID?

No. A model name or route label is not an API model ID. Copy the ID, for example claude-sonnet-5-5.

### Does Outrun keep my prompts or outputs?

Outrun does not store your prompts, images or outputs unless you choose to save them.

## Related pages

- [Model not found (404)](https://outrun.to/fix/model-not-found-404)
- [Context length exceeded](https://outrun.to/fix/context-length-exceeded)
- [SillyTavern setup guide](https://outrun.to/docs/setup/sillytavern)
- [API for SillyTavern](https://outrun.to/api-for-sillytavern)
- [All error fixes](https://outrun.to/fix)
- [Get your API key](https://outrun.to/overview)

[Get your API key](https://outrun.to/key) [See all models and prices](https://outrun.to/pricing)
