# Playground

Canonical HTML: https://anchorshell.com/docs/playground

Send a test request, inspect the response, and copy a curl command for your application.

Last updated: 2026-09-17

Playground sends the same inference payload your application would send and shows the route Relay actually selected. Check a configured model or Group before integrating a client.

## Dashboard

1. Open **Playground**.
2. Choose a group or `provider/model` in **Target**.
3. Edit **Request body**.
4. Click **Send Request**.
5. Inspect the response, selected model, wait time, and usage.
6. Click **Copy** beside the curl command.

Hosted requests can use your signed-in browser session when the key field is empty. To test a particular User API key, enter that key first. A copied curl command does not include your login cookie.

The shared UI calls the field **Relay API Key**. Hosted users must enter a User API key from **Account → API keys**. Self-hosted Relay users enter their deployment's inference token.

## API

Use an appropriately scoped [API key](https://anchorshell.com/docs/api) for these requests.

### Send a request

```bash
curl -X POST 'https://api.anchorshell.com/v1/chat/completions' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "agentic",
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ]
}'
```

**Response — 200 OK**

Example non-streaming response (selected fields). Content, model, and usage depend on the selected provider.

```json
{
  "id": "<COMPLETION_ID>",
  "object": "chat.completion",
  "model": "gpt-5-mini",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Relay waits for the preferred model before considering fallback."
      },
      "finish_reason": "stop"
    }
  ]
}
```

Use a Group you configured. A copied command containing a key is a secret: keep it private. See [Self-hosted](https://anchorshell.com/docs/self-hosting) for local URLs and tokens.

## Next

[Settings](https://anchorshell.com/docs/settings).
