Get remaining credits for your API key
GET
/account/credits
const url = 'https://api.relayxapi.com/account/credits';const options = { method: 'GET', headers: { 'X-API-Key': '<api-key>' },};
try { const res = await fetch(url, options); const data = await res.json(); console.log(data);} catch (err) { console.error(err);}curl --request GET \ --url 'https://api.relayxapi.com/account/credits' \ --header 'X-API-Key: <api-key>'import requests
res = requests.get( "https://api.relayxapi.com/account/credits", headers={"X-API-Key": "<api-key>"},)print(res.json())Return the credits remaining on the API key making the request. Always free.
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters”x-api-key
X-Api-Key
string
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
Example
{ "status": "success", "msg": "", "credits": 94700}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}