← All docs

cURL

Raw HTTP examples with cURL — no SDK required.

List models

curl {API}/v1/models \ -H "Authorization: Bearer nxr_live_YOUR_API_KEY"

Chat completion

curl {API}/v1/chat/completions \ -H "Authorization: Bearer nxr_live_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "provider/model-id", "messages": [{"role": "user", "content": "Hello!"}] }'

Check usage

curl {API}/v1/usage \ -H "Authorization: Bearer nxr_live_YOUR_API_KEY"