AIO.SetTitle

<< Click to Display Table of Contents >>

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

AIO.SetTitle

AIO.SetTitle

Previous Top Next


MiniRobotLanguage (MRL)

 

AIO.SetTitle|$$TITLE
Set X-Title Header for App Name on OpenRouter

 

Purpose

 

Sets the X-Title HTTP header that identifies your application name when making requests to OpenRouter. This header allows OpenRouter to display your app name in their dashboard and analytics, providing proper attribution for API usage.

 

Syntax

 

AIO.SetTitle|$$TITLE

 

Parameters

 

$$TITLE - The application name to set as the X-Title header. This should be a short, descriptive name for your application (e.g., "MyRobotApp"). Pass an empty string to clear the title.

 

Return Value

 

None. The title is stored internally and applied to subsequent API requests.

 

Example

 

' Set the app title for identification

AIO.SetTitle|MyRobotAssistant

 

' Also set the referer URL

AIO.SetReferer|https://robotassistant.app

 

' Make API requests with proper identification

AIO.Chat|What can you help me with?|$$Response

 

Notes

 

- The X-Title header appears in OpenRouter's dashboard for analytics

- Keep the title short and descriptive (recommended: under 50 characters)

- Works together with AIO.SetReferer for complete app identification

- Cleared when AIO.Init is called

 

Related Commands

 

AIO.SetReferer - Set HTTP referer header

AIO.Init - Initialize AIO system

AIO.Chat - Send chat request