Credits in practice
RelayX is prepaid: you hold credits on an API key and each call spends some. The current rates are on the pricing table; this page explains how a charge is worked out.
How a call is charged
Section titled “How a call is charged”- Per item returned. List endpoints charge per tweet, user or follower actually returned; deeper,
fuller pages cost less per item. Single lookups (for example
user/info) are a fixed price per call. - A per-call minimum applies to every call, including one that returns nothing — the page was still fetched. It’s waived automatically on bulk responses, where the per-item total is already higher.
- Failures are free. Any response with an HTTP status of 400 or above is not charged.
- Checking your balance is free:
GET /account/credits.
Reading the cost of a call
Section titled “Reading the cost of a call”Every charged response carries two headers:
X-Credits-Cost— what this call cost.X-Credits-Remaining— your balance afterwards.
import requests
r = requests.get("https://api.relayxapi.com/twitter/user/followers", params={"userName": "NASA"}, headers={"X-API-Key": "YOUR_KEY"})print(r.headers["X-Credits-Cost"], r.headers["X-Credits-Remaining"])Throughput scales with your balance
Section titled “Throughput scales with your balance”Requests per second depend on the credits you keep on the key:
| Credit balance | Requests / second |
|---|---|
| Free / trial | 1 |
| ≥ 1,000 | 3 |
| ≥ 5,000 | 6 |
| ≥ 10,000 | 10 |
| ≥ 50,000 | 20 |
Errors you may see
Section titled “Errors you may see”| Status | Meaning | What to do |
|---|---|---|
401 |
Missing, wrong or revoked key | Check the X-API-Key header |
402 |
Not enough credits for this call | Top up in the dashboard |
429 |
Over your requests-per-second limit | Wait for the Retry-After seconds, then retry |
None of these are charged.