# OpenAgents Khala — skill setup

Add Khala as an OpenAI-compatible inference tool in your agent.

- Base URL: https://openagents.com/api/v1 (legacy https://openagents.com/v1 still works as an alias)
- Chat Completions: https://openagents.com/api/v1/chat/completions
- Models endpoint: https://openagents.com/api/v1/models
- Models: `openagents/khala`
- Auth: `Authorization: Bearer <openagents-agent-key>`

## OpenAI client config

```json
{
  "baseURL": "https://openagents.com/api/v1",
  "apiKey": "<your-openagents-agent-key>",
  "model": "openagents/khala"
}
```

## Pay-per-call (machine payments)

If your agent pays per request instead of holding a key, use the machine-payment
endpoint (MPP / x402): https://openagents.com/api/mpp/v1/chat/completions. A request without a payment credential
returns `402 Payment Required` with a payment challenge; your payment tool pays
and retries. Accepted rails: Lightning, USDC, and card. The default MPP model is
`openagents/khala`.

See https://openagents.com/agents.md for the full flow.
