Skip to content

OpenAI Connection ​

The OpenAI Connection stores an OpenAI API key for supported server-side use. Its primary Project interface is an authenticated OpenAI SDK object in Cloud Flow custom code.

This Connection is separate from model configuration that may appear in other ioLoop features. Creating it does not automatically attach it to an AI Agent or make an OpenAI command available in Page Flow.

Capabilities ​

CapabilityAvailability
Connection service identifieropenai
Page Flow commandNot available
Cloud Flow commandNot available
Connection Function Call methodsNot exposed
Authenticated SDK objectSupported through service name openai

Profile Settings ​

The Profile requires an OpenAI API Key. The Connection has no additional service settings beyond its name and selected Profile.

Use a Project-specific or environment-specific key where possible. Apply provider-side restrictions, budgets, and rotation practices appropriate to the application.

Using the Connection ​

Cloud Flow custom code can obtain the authenticated SDK object with:

js
const openai = $io.system.sdkLibraryObjectFromConnection(
  'openai',
  'MyOpenAIConnection'
);

Use the SDK version and interfaces available in the Cloud Flow runtime. For the supported helper and runtime boundaries, see $io.system and Node.js Runtime and SDK Libraries.

Do not return the SDK object or API key to Page Flow. If a Page needs an AI-backed operation, expose a controlled Cloud Flow Web Hook that validates the request and returns only the required result.

Security and Cost ​

Before publishing:

  • Validate and limit user-controlled prompts and tool inputs.
  • Set application-level limits appropriate to the workflow.
  • Avoid logging prompts or responses that contain sensitive information.
  • Handle provider errors, rate limits, and timeouts.
  • Review what response data is returned to the browser.
  • Monitor provider usage and billing independently of the Project.

Preview and Cloud Flow tests use the configured API key and can incur real provider usage.