AIU. - Artificial Intelligence Utility

<< Click to Display Table of Contents >>

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

AIU. - Artificial Intelligence Utility

AIU. - OpenAI API

Previous Top Next


MiniRobotLanguage (MRL)

 

AIU. - OpenAI API
Artificial Intelligence Utility Overview

 

Intention

 

AIU. - OpenAI API: Harnessing AI Capabilities
 
This section introduces the Artificial Intelligence Utility (AIU) system, a collection of commands designed to interact with the OpenAI API for various AI tasks.

It provides a comprehensive framework for chat completions, image generation, embeddings, and more, accessible through MiniRobotLanguage (MRL).

 

What is the AIU. - OpenAI API?

 

The AIU system is a set of tools that leverage the OpenAI API to perform advanced AI functions, including conversational tasks, visual content creation, and data embeddings.

It requires an API key for authentication and involves costs based on usage, with commands organized into specialized categories for ease of use.

 

Using the AIU.-Command you should be able to call any "OpenAI compatible Endpoint" aside of Open AI, here is an Example.

 

Use LM-Studio with the AIU.-Command:

 

' use any API-Key for LM-Studio its not approved, however the command will expect an API-Key

AIU.Set Key|Any

' construct LM-Studio Endpoint

$$LMS=http://192.168.178.99:1234

$$ENP=/v1/chat/completions

$$GES=$$LMS$$ENP

AIU.Set Chat Endpoint|$$GES

 

'Chooose local Model

AIU.SetModel|deepseek/deepseek-r1-0528-qwen3-8b

 

AIU.Chat|Tell me a joke use EMojis|$$RES|1

DBP.Joke: $$RES

ENR.

 

How and Where to Get the API Key

 

To use the AIU system, you need an API key from OpenAI. Follow these steps:

Visit the OpenAI website at https://platform.openai.com/signup and sign up for an account if you don’t have one.

Log in and navigate to the API section at https://platform.openai.com/api-keys.

Click 'Create API Key', give it a name for reference, and copy the generated key. Store it securely, as it will not be shown again.

Use the AIU.SetKey command in your MRL script to configure the key.

 

Costs and Pricing

 

Using the OpenAI API through the AIU system incurs costs based on the models and features you use. As of March 18, 2025, the pricing (per 1 million tokens) includes:

gpt-4o: $5.00 (input), $15.00 (output) - Multimodal, 128K context.

gpt-4o-mini: $0.15 (input), $0.60 (output) - Cost-effective, 128K context.

gpt-4-turbo: $10.00 (input), $30.00 (output) - High performance, 128K context.

gpt-3.5-turbo: $0.50 (input), $1.50 (output) - Dialog-optimized, 16K context.

o1-preview: $15.00 (input), $60.00 (output) - Advanced reasoning, 128K context.

o1-mini: $3.00 (input), $12.00 (output) - Reasoning, cost-effective, 128K context.

Image generation costs are typically charged per image, with rates starting at $0.018 per image for standard resolutions (e.g., 1024x1024) and varying based on size and quality. Check the OpenAI Pricing Page for the latest details and to monitor your usage.

 

Categories in This Section

 

The AIU system is organized into the following categories:

!Folder Management - Managing file storage locations.

!Setup and Configuration - Initializing the AIU system.

!Model and Endpoint Configuration - Defining AI models and connections.

!Tool and Function Management - Integrating custom tools.

!Image Generation Settings - Configuring image creation parameters.

!Core Operations - Executing primary AI tasks.

!Image Generation - Creating visual content.

!Response Analysis - Evaluating AI outputs.

!Response Behavior Settings - Tuning AI response characteristics.

!Output Formatting and Delivery - Controlling response presentation.

!Session and Storage Management - Managing session continuity.