AIC. - Artificial Intelligence Command

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIC. - Artificial Intelligence Command >

AIC. - Artificial Intelligence Command

AIC.SetKey

Top


MiniRobotLanguage (MRL)

 

AIC.SetKey

Set the OpenAI API Key

 

Intention

 

The AIC.SetKey command sets your OpenAI API key, which is required for all OpenAI API calls (ChatGPT, GPT-4, DALL-E, Whisper, TTS, etc.).

 

Get your API key from:

 

Syntax

 

AIC.SetKey|$$Key[|$$Path]

 

P1 - $$Key - API key or: File, Text, Any

P2 - $$Path (optional) - Path to key file

 

Example

 

' Set key directly

AIC.SetKey|sk-your-openai-api-key

 

' Load from file

AIC.SetKey|File|C:\Keys\OpenAI.txt

 

Related Commands

 

- AIC.SaveKey - Save API key to file

- AIC.Ask - Main chat command