Skip to documentation

Send your first managed request

Send your first managed request

Create a User API key and send one request through the managed AnchorShell Relay API.

Purpose

Create one user-owned API key. Use it to send a request through hosted AnchorShell Relay.

Prerequisites

You need access to an organization with Relay enabled. You also need permission to create your own User API key, one accessible Model or Group, and curl or another HTTP client.

Steps

  1. Sign in to AnchorShell.
  2. Open Account → API Keys.
  3. Create a key for Relay.
  4. Use a workload-specific name, such as support-agent-production.
  5. Keep the relay:request scope.
  6. Copy the complete as_live_ secret. AnchorShell shows it once.
  7. Store the secret in a secret manager or local environment variable.
  8. Open Relay → Providers or Relay → Groups.
  9. Copy one Model, Standard Group, or Smart Group call name that the key owner can use.
  10. Replace YOUR_MODEL_OR_GROUP in the request.
curl https://api.anchorshell.com/v1/chat/completions \
  -H 'Authorization: Bearer <API_KEY>' \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_MODEL_OR_GROUP",
    "messages": [
      {"role": "user", "content": "Return the word ready."}
    ]
  }'

Response — 200 OK

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

{
  "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"
    }
  ]
}

Expected result

The API returns a successful Chat Completions response. AnchorShell attributes the request to the User API key, its owner, and the organization.

Verification

Open Relay → Logs. Find the request under the User API-key identity. Confirm the selected Group, provider, Model, token use, timing, and final status.

Recovery

If authentication fails, confirm that the key is active and that you copied the complete secret. If routing fails, confirm that the Model is enabled, the key owner has provider access, and no applicable limit is exhausted. Create a replacement key if the secret is lost.

Next

Create and call a Smart Group.