> ## Documentation Index
> Fetch the complete documentation index at: https://oximy.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Route-only decisions

> Ask Relay to select a model while your application or gateway owns provider execution.

Route-only separates model selection from model execution. Relay evaluates the request and returns a decision; your infrastructure calls the chosen provider.

## Request a decision

```bash theme={null}
curl https://relay.oximy.com/v1/route \
  -H "Authorization: Bearer ox_..." \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "user", "content": "Classify the likely cause of this timeout."}
    ]
  }'
```

The response provides:

* `model`: the provider-prefixed model Relay selected
* `decision_id`: the identifier for this routing decision

## Execute and correlate

<Steps>
  <Step title="Send request context">
    Provide the messages Relay needs to evaluate the workload. Do not include unrelated secrets or application state.
  </Step>

  <Step title="Validate the model">
    Confirm the returned model is allowed by your execution layer and maps to a configured provider.
  </Step>

  <Step title="Execute through your infrastructure">
    Call the selected provider through your application or existing gateway. Your infrastructure owns credentials, retries, timeouts, streaming, and provider errors.
  </Step>

  <Step title="Preserve the decision identifier">
    Attach `decision_id` to the execution telemetry so Relay can connect the recommendation to the outcome.
  </Step>
</Steps>

## Failure behavior

Define an application-side timeout and deterministic fallback for cases where the decision service cannot be reached. Relay's configured fallback informs routing decisions, but route-only does not take over your provider call.

<Warning>
  Do not treat route-only as a provider proxy. A successful decision does not mean the provider execution succeeded.
</Warning>

<Card title="Configure candidate models" icon="route" href="/docs/relay/routing-fallbacks">
  Control which models Relay may return and how it balances cost, quality, and latency.
</Card>
