# Alpha Router integration skill

Use Alpha Router when an application needs a finance-task outcome without coupling itself to a
specific model provider.

## Contract

- Base URL: `https://api.router.intelligentalpha.co`
- Endpoint: `POST /v1/responses`
- Authorization: `Bearer $ALPHA_ROUTER_API_KEY`
- Public model identifier: `intelligent-alpha/finance`
- Every request is stateless. Include the full conversation history each time.
- Set `routing.finance_task` to `general_finance`, `earnings_analysis`, `equity_research`, or
  `portfolio_analysis`.
- Never set `store: true` or a non-null `previous_response_id`.
- Never place an API key in client-side browser or mobile code.

## Minimal request

```bash
curl https://api.router.intelligentalpha.co/v1/responses \
  -H "Authorization: Bearer $ALPHA_ROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "intelligent-alpha/finance",
    "input": "Summarize the earnings quality and key risks.",
    "routing": { "finance_task": "earnings_analysis" }
  }'
```

## Implementation guidance

1. Read the live quickstart at `https://router.intelligentalpha.co/docs/quickstart`.
2. Read the generated OpenAPI document before generating client types.
3. Load credentials only from a server-side secret manager or environment variable.
4. Preserve the public Alpha Router model identifier; do not ask a user to choose a provider.
5. Handle the documented public error envelope and retry only retryable failures.
6. Keep full conversation state in the calling application.
7. Add tests for statelessness, task classification, timeouts, and safe error handling.

Provider and final model identity are confidential routing implementation details and are not present
in public responses or account activity.
