← All platforms

AI

OpenAI

target_app: "openai" · endpoint /v1/messaging/execute · Bring your own credentials

Setup

Create an API key at platform.openai.com/api-keys. Note this requires billing set up on your OpenAI account — free trial credits may not be available depending on when you sign up.

Credentials needed on your Connections page

api_keyAPI Key. Find it: platform.openai.com/api-keys

Actions

chat_completion

Get a chat completion. Pass either prompt (single message) or your own messages array.

Request body:

{
  "user_id": "...",
  "action": "chat_completion",
  "payload": { "prompt": "Summarize this in one sentence: ...", "model": "gpt-4o-mini" },
  "target_app": "openai"
}

provider_response.result shape:

{ "choices": [{"message":{"content":"..."}}] }

generate_image

Generate an image (DALL-E).

Request body:

{
  "user_id": "...",
  "action": "generate_image",
  "payload": { "prompt": "A cat wearing a hat", "size": "1024x1024" },
  "target_app": "openai"
}

provider_response.result shape:

{ "data": [{"url":"https://..."}] }

create_embedding

Get a vector embedding for text.

Request body:

{
  "user_id": "...",
  "action": "create_embedding",
  "payload": { "input": "Text to embed" },
  "target_app": "openai"
}

provider_response.result shape:

{ "data": [{"embedding":[0.1,-0.2,...]}] }

text_to_speech

Convert text to spoken audio.

Request body:

{
  "user_id": "...",
  "action": "text_to_speech",
  "payload": { "text": "Hello world", "voice": "alloy" },
  "target_app": "openai"
}

provider_response.result shape:

{ "audio_base64": "...", "content_type": "audio/mpeg" }

Anticipated errors & fixes

401 "Incorrect API key provided"

Cause: Key is wrong or was revoked.

Fix: Generate a new key at platform.openai.com/api-keys.

429 "You exceeded your current quota"

Cause: No billing set up, or you've hit your OpenAI account's own spending limit — separate from eConnect's rate limits.

Fix: Add a payment method / raise your limit in your OpenAI account billing settings.

401 "Unauthorized: Invalid API key."

Cause: Your eConnect Authorization header is missing, malformed, or the key was regenerated/revoked.

Fix: Copy your api_key fresh from the eConnect dashboard and confirm the header reads exactly "Authorization: Bearer <key>".

429 "Too many requests"

Cause: You've exceeded your plan's per-minute rate limit.

Fix: Wait a minute and retry, or upgrade your plan for a higher per-minute limit.

429 "Monthly API limit exceeded"

Cause: You've used your plan's full monthly request allowance.

Fix: Wait for your next billing cycle reset, or upgrade to a plan with a higher monthly limit.

← Back to all platforms