|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIO. - OpenRouter AI > AIO.SetReferer |
MiniRobotLanguage (MRL)
AIO.SetReferer|$$URL
Set HTTP Referer Header for App Identification
Purpose
Sets the HTTP Referer header used for app identification when making requests to the OpenRouter API. This header identifies the source application or website making the API request, which helps with analytics and proper attribution.
Syntax
AIO.SetReferer|$$URL
Parameters
$$URL - The URL to set as the HTTP Referer header. This should be a valid URL representing your application or website (e.g., "https://myapp.example.com"). Pass an empty string to clear the referer.
Return Value
None. The referer is stored internally and applied to subsequent API requests.
Example
' Set the referer to identify your application
AIO.SetReferer|https://myrobotapp.com
' Now make API requests with the referer set
AIO.Chat|Hello, how are you?|$$Response
Notes
- The referer header is sent with all subsequent API requests until changed
- OpenRouter uses this for analytics and may prioritize requests with proper identification
- Cleared when AIO.Init is called
Related Commands
AIO.SetTitle - Set X-Title header
AIO.Init - Initialize AIO system
AIO.Chat - Send chat request