Getting started
Authentication & keys
Live and test keys, scopes, IP allow-lists, Domain lock, spend caps and key rotation.
Bearer keys
Send your API key in the Authorization header on every request. Live keys start with rp_live_ and spend credits; test keys start with rp_test_ and never charge (see Test mode). A missing key returns 401 unauthorized; a wrong, revoked or expired key returns 401 invalid_api_key.
curl https://api.relaypoints.online/v1/balance \
-H "Authorization: Bearer $RELAYPOINT_API_KEY"Keys are created, edited and revoked in Dashboard → API keys. RelayPoint stores only a hash of each key: the full key is shown once when it is created. Keep keys on your servers; never ship them in a browser or mobile app.
Scopes
A key either has Everything (*) or a list of scopes. Each endpoint needs one scope; a key without it gets 403 missing_scope. GET /v1/models and GET /v1/balance work with any key.
| Scope | Endpoints | Explicit |
|---|---|---|
chat | POST /v1/chat/completions | |
embeddings | POST /v1/embeddings | |
images | POST /v1/images/generations | |
audio | POST /v1/audio/speech, POST /v1/audio/transcriptions | |
jobs | /v1/jobs | |
usage | GET /v1/usage | |
sub_accounts | /v1/sub_accounts | |
connections | /v1/catalog, /v1/connections, /v1/connect_links | |
webhooks | /v1/webhook_endpoints | |
connections:request | POST /v1/connections/{id}/request | yes |
connections:credentials | GET /v1/connections/{id}/credentials | yes |
IP allow-lists
You can restrict a key, or your whole account, to IP addresses and CIDR ranges (IPv4 and IPv6). Requests from any other address get 403 ip_not_allowed. Set the account-wide list in Settings and per-key lists on the keys page.
Domain lock
Domain lock makes your keys work only from your own websites and servers. RelayPoint sets it up for you: send your website domains (for example blueoceanrealty.co.za) and your servers' outgoing IP addresses to support. Subdomains such as www. and app. can be included. You can see the status and your allowed domains in Dashboard → API keys; only RelayPoint can change them. Look-alikes such as blueoceanrealty.co.za.evil.com never match. Ports don't matter.
- Browser calls: RelayPoint reads the
Originheader (or theRefererwhen there is no Origin). A site that isn't on the list gets403 domain_not_allowed. Allowed sites get CORS headers for their own origin only, never*. - Server calls: a website's backend, a WordPress plugin or a cron job sends no Origin, and anyone holding a key could fake one. These calls are allowed only from the server IP addresses you list (single IPs or CIDR ranges, IPv4 or IPv6). Any other server gets
403 ip_not_allowed. - Adding a server IP: send it to support. Use the server's outgoing IP: sites behind Cloudflare, or on shared hosting, often call out from a different IP than the one their domain points to, so ask your host.
- Per key: on request, RelayPoint can give one key its own domain and server lists.
- Refused calls are never charged, and the error never shows your lists. Recent refusals are listed on the keys page.
Spend caps
Each live key can have a monthly spend cap in USD, and the account can have one too. A call that would go over a cap is refused with 402 spend_cap_reached before anything is charged.
Rotating and expiring keys
- Create the new key, deploy it, then revoke the old one: both work in between.
- Keys can expire automatically after 30, 90 or 365 days.
- Revoked and expired keys are refused on the very next request.
Acting for a sub-account
Reseller keys can act for one of their sub-accounts by sending RelayPoint-Account: org_…. See Reselling & sub-accounts.