AIO Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIO. - OpenRouter AI >

AIO Commands

AIO.GetKeyLimits

Previous Top Next


MiniRobotLanguage (MRL)

 

AIO.GetKeyLimits

 

Description

 

Queries rate limits and credits remaining for your API key.

This command retrieves information about your current API usage, including remaining credits, rate limits, and usage statistics from the AIO service.

 

Syntax

 

AIO.GetKeyLimits[|$$RET]

 

Parameters

 

Parameter

Type

Description

$$RET

Optional

Variable to store the JSON response containing credits and rate limit information.

 

Return Value

 

Returns a JSON object containing the following information:

credits_remaining - The number of API credits remaining on your account

rate_limits - Current rate limit settings (requests per minute/hour/day)

usage_stats - Statistics about your API usage

plan_type - Your current subscription plan

reset_time - When the rate limits will reset

 

Example

 

'AIO.GetKeyLimits|$$Limits

DBP.My limits: $$Limits

 

This example queries the API key limits and stores the JSON response in the variable $$Limits, then displays the result using DBP.

 

Remarks

 

• This command requires a valid API key to be set using AIO.SetKey before calling.

• Rate limits may vary based on your subscription plan type.

• The returned JSON format may be extended with additional fields in future versions.

 

See Also

 

AIO.GetStatus, AIO.GetBalance, AIO.SetKey, AIO.ValidateKey