Skip to main content

OpenAI

Status: ✅ Supported

Official OpenAI API integration for GPT models.

Supported Models​

Model IDNameContext
gpt-3.5-turboGPT-3.5-turbo16K
gpt-4GPT-48K
gpt-4-turboGPT-4 Turbo128K
gpt-4.1GPT-4.11M
gpt-4.1-miniGPT-4.1 mini1M
gpt-4.1-nanoGPT-4.1 nano1M
gpt-4oGPT-4o128K
gpt-4o-2024-05-13GPT-4o (2024-05-13)128K
gpt-4o-2024-08-06GPT-4o (2024-08-06)128K
gpt-4o-2024-11-20GPT-4o (2024-11-20)128K
gpt-4o-miniGPT-4o mini128K
gpt-5GPT-5400K
gpt-5-chat-latestGPT-5 Chat (latest)400K
gpt-5-miniGPT-5 Mini400K
gpt-5-nanoGPT-5 Nano400K
gpt-5-proGPT-5 Pro400K
gpt-5-codexGPT-5-Codex400K
gpt-5.1GPT-5.1400K
gpt-5.1-chat-latestGPT-5.1 Chat128K
gpt-5.1-codexGPT-5.1 Codex400K
gpt-5.1-codex-maxGPT-5.1 Codex Max400K
gpt-5.1-codex-miniGPT-5.1 Codex mini400K
gpt-5.2GPT-5.2400K
gpt-5.2-chat-latestGPT-5.2 Chat128K
gpt-5.2-codexGPT-5.2 Codex400K
gpt-5.2-proGPT-5.2 Pro400K
gpt-5.3-chat-latestGPT-5.3 Chat (latest)128K
gpt-5.3-codexGPT-5.3 Codex400K
gpt-5.3-codex-sparkGPT-5.3 Codex Spark128K
gpt-5.4GPT-5.41M
gpt-5.4-proGPT-5.4 Pro1M
gpt-5.4-miniGPT-5.4 mini400K
gpt-5.4-nanoGPT-5.4 nano400K
gpt-5.5GPT-5.51M
gpt-5.5-proGPT-5.5 Pro1M
chatgpt-image-latestchatgpt-image-latest-
gpt-image-1gpt-image-1-
gpt-image-1-minigpt-image-1-mini-
gpt-image-1.5gpt-image-1.5-
o1o1200K
o1-minio1-mini128K
o1-previewo1-preview128K
o1-proo1-pro200K
o3o3200K
o3-deep-researcho3-deep-research200K
o3-minio3-mini200K
o3-proo3-pro200K
o4-minio4-mini200K
o4-mini-deep-researcho4-mini-deep-research200K
text-embedding-3-largetext-embedding-3-large8K
text-embedding-3-smalltext-embedding-3-small8K
text-embedding-ada-002text-embedding-ada-0028K

Setup​

1. Get API Key​

  1. Visit OpenAI Platform
  2. Create or log in to your account
  3. Go to API keys → Create new secret key
  4. Copy the key (starts with sk-)

2. Add to Clawrium​

clawctl provider registry create my-openai --type openai

You will be prompted to enter your API key securely.

3. Select Model​

Choose a default model during setup:

  • gpt-4o (recommended for most use cases)
  • gpt-4o-mini (faster, cheaper)
  • gpt-4-turbo (if you need specific features)

Configuration​

# View provider details
clawctl provider registry get

# Change default model
clawctl provider registry edit my-openai --model gpt-4o-mini

# Update API key
clawctl provider registry edit my-openai --update-key

# Remove provider
clawctl provider registry delete my-openai

Pricing Considerations​

ModelInput (per 1M tokens)Output (per 1M tokens)
gpt-4o$5.00$15.00
gpt-4o-mini$0.15$0.60
gpt-4-turbo$10.00$30.00
gpt-3.5-turbo$0.50$1.50

Prices subject to change. Check OpenAI pricing for current rates.

Usage in Agents​

During agent onboarding:

clawctl agent configure my-agent
# Select my-openai when prompted for provider

Or change later:

clawctl agent configure my-agent --stage providers

Troubleshooting​

"Invalid API key"

  • Verify the key starts with sk-
  • Ensure the key hasn't been revoked
  • Check your OpenAI account has available credits

"Rate limit exceeded"

  • Check your OpenAI usage dashboard
  • Consider upgrading your account tier
  • Implement retry logic in your agent

"Model not found"


Back to Providers