@orchesty/connector-open-ai
v2.0.0
Published
[](https://www.npmjs.com/package/@orchesty/connector-open-ai) [](https://github.com/Orchesty/orchesty-nodejs-co
Downloads
336
Readme
OpenAI Connector
An Orchesty connector for OpenAI, enabling you to get answers, find inspiration, and build more productive workflows using the OpenAI API.
Application Type
Basic
This connector authenticates using an API key sent as a Bearer token in the Authorization header. Optionally, an Organization ID and Project ID can be specified to route requests to a specific organization or project.
| Field | Description |
|---|---|
| api_key | Your OpenAI API key (required) |
| organization_id | OpenAI Organization ID — routes usage to a specific org (optional) |
| project_id | OpenAI Project ID — routes usage to a specific project (optional) |
Components
| Class | Type | Description |
|---|---|---|
| OpenAIPostResponseConnector | Connector | Sends a request to the OpenAI Responses API via POST /v1/responses and returns the generated response |
Setup
Credentials
- Log in to platform.openai.com.
- Navigate to Settings → API keys and create a new secret key.
- Copy the key immediately — it will not be shown again.
- Optionally, find your Organization ID under Settings → Organization → General and your Project ID under Settings → Projects.
- In Orchesty, open the OpenAI application settings and fill in the Api key field (and optionally the other two fields).
API Documentation
OpenAI API Reference: https://platform.openai.com/docs/api-reference/
Installation & Usage
Install the package:
npm install @orchesty/connector-open-ai @orchesty/nodejs-sdk
# or
pnpm add @orchesty/connector-open-ai @orchesty/nodejs-sdkRegister the application and nodes in your Orchesty DI container:
import { container } from '@orchesty/nodejs-sdk';
import OpenAIApplication from '@orchesty/connector-open-ai/dist/OpenAIApplication';
import OpenAIPostResponseConnector from '@orchesty/connector-open-ai/dist/Connector/OpenAIPostResponseConnector';
const app = new OpenAIApplication();
container.setApplication(app);
container.setNode(new OpenAIPostResponseConnector(), app);License
This connector is released under the Apache License 2.0. See the LICENSE file for the full license text.
Contributing
Contributions are welcome! This connector is part of the open-source Orchesty Node.js Connectors monorepo.
For guidelines on how to create or update connectors — including project setup, coding conventions, and how to write tests — please refer to the Contributing to Connectors guide.
All contributions should include:
- Source code in
src/following the existing connector structure - Tests in
src/**/__tests__/withinput.json,mock.json, andoutput.jsonfixtures - An updated
CHANGELOG.mdentry
