Skip to main content
Technical Preview

Overview

A client-mode connector for a curated slice of the OpenAI API focused on IIoT / edge alarm text into LLMs: Default BASE_ADDRESS is https://api.openai.com (no trailing slash). Topics use ai/openai/<object>/<verb>. See the base guide: REST API Connectors.
Auth: Authorization: Bearer &lt;OpenAI API key&gt;. Prefer Hub secrets (GET SECRET "OPENAI_API_KEY") mapped into MQTT api_token. Never commit real sk-... keys.
Factory live smoke is blocked until an OpenAI API key is supplied. Point secrets / MQTT JSON at your project before production use.

Basic Syntax

Full deployable file: OpenAiRestApi.lot in the factory package (no ADD METADATA).

Topics

Configuration

  1. Set BASE_ADDRESS to https://api.openai.com.
  2. Store an OpenAI API key in Hub secrets (OPENAI_API_KEY); map into MQTT api_token.
  3. For alarm classification: publish to ai/openai/responses/post with a Responses body using text.format JSON schema (or use Chat Completions with response_format).
  4. For semantic search / similarity: publish to ai/openai/embeddings/post with a tiny input string and an embeddings model.
  5. Use GetModels as a cheap auth smoke before production workloads.

References

Last modified on October 21, 2026