API Key (Bearer)

OpenAI Integration

Connect your AI agent to the OpenAI API. Access GPT models, DALL-E image generation, embeddings, and the Assistants API directly from your agent's conversations.

What your agent can do

With OpenAI credentials, your agent can call any endpoint on the OpenAI API.

GPT model access

Send prompts to GPT-4o, GPT-4, and other OpenAI models. Your agent can use these for reasoning, summarization, and content generation.

Image generation (DALL-E)

Generate images from text descriptions using DALL-E 3. Your agent can create visuals for social media, presentations, and marketing materials.

Embeddings

Create vector embeddings for semantic search, document similarity, and retrieval-augmented generation workflows.

Fine-tuning

Manage fine-tuning jobs to customize models on your data. Your agent can upload training files and monitor training progress.

Assistants API

Create and manage persistent assistants with file search, code interpreter, and function calling capabilities.

Prerequisites

Before you connect, make sure you have the following.

  • An OpenAI account with a payment method on file
  • An API key from platform.openai.com/api-keys
  • A ClawTrust agent on any plan (Starter, Pro, or Enterprise)

Step-by-step setup

Generate an API key from OpenAI and add it to your agent.

1

Log in to the OpenAI platform

Go to platform.openai.com and sign in to your OpenAI account. If you do not have one, create an account and add a payment method.

2

Navigate to API keys

Go to platform.openai.com/api-keys. Click "Create new secret key." Give it a descriptive name like "ClawTrust Agent" and select the permissions your agent needs.

3

Copy your API key

Copy the generated key immediately. OpenAI only shows it once. This is a Bearer token that authenticates all API requests.

4

Add to ClawTrust

In your agent's dashboard, go to Credentials > Add Credential. Select "API Key (Bearer)", paste your key, and set the allowed domain to *.openai.com.

Credential details

Enter these values when adding the credential in ClawTrust.

FieldValue
Credential TypeAPI Key (Bearer)
API KeyYour OpenAI secret key (sk-...)
Header FormatAuthorization: Bearer sk-...
Allowed Domains*.openai.com

Credentials are encrypted with AES-256-GCM and stored on your agent's dedicated server. They never leave your infrastructure. The allowed domains restriction ensures your agent can only use these credentials with OpenAI endpoints.

Example actions

Here is what your agent can do once the integration is live.

Generate a product description

Your agent sends a prompt to GPT-4o with product details and tone guidelines, then returns polished copy ready for your website or listing.

Create a social media image

Your agent uses DALL-E 3 to generate a branded visual based on your description, downloads it, and attaches it to your next post draft.

Summarize a long document

Your agent reads the document, sends it to GPT-4o with summarization instructions, and returns a concise brief with key takeaways.

Build a semantic search index

Your agent processes your knowledge base through the embeddings API, creating vectors that power fast, relevant search across all your documents.

Ready to connect your agent to OpenAI?

Add your API key and your agent starts calling OpenAI models immediately.