OpenAI Integration
Omdaa API integration with OpenAI allows you to create intelligent chat bots that use ChatGPT to process incoming messages and respond intelligently. Supports all OpenAI models including GPT-4, GPT-3.5, and more.
Create OpenAI Bot
To create a new bot using OpenAI:
"function">curl "keyword">-X POST https://omdaa.com/api/v1/integrations/openai/create \
"keyword">-H "Authorization: Bearer YOUR_JWT_TOKEN" \
"keyword">-H "Content"keyword">-Type: application/json" \
"keyword">-d '{
"sessionId": "my"keyword">-instance",
"name": "My ChatGPT Bot",
"openaiApiKey": "sk-...",
"model": "gpt-4",
"systemPrompt": "You are a helpful assistant",
"temperature": 0.7,
"maxTokens": 1000
}'Required Parameters
| Parameter | Type | Description |
|---|---|---|
| sessionId | string | Session identifier |
| name | string | Bot name |
| openaiApiKey | string | OpenAI API key |
| model | string | Model (gpt-4, gpt-3.5-turbo, etc.) |
| systemPrompt | string (optional) | Default system message |
| temperature | number (optional) | Creativity level (0-2) |
| maxTokens | number (optional) | Maximum tokens |
Get OpenAI Bots
To get a list of all OpenAI bots:
"function">curl "keyword">-X GET "https://omdaa.com/api/v1/integrations/openai?sessionId=my class="keyword">-instance" \
"keyword">-H "Authorization: Bearer YOUR_JWT_TOKEN"Supported Models
gpt-4
Most powerful OpenAI model
gpt-4-turbo
Enhanced version of GPT-4
gpt-3.5-turbo
Fast and economical model
gpt-4o
Optimized multi-task model
💡 Tips
- Use systemPrompt to define bot personality and behavior
- Low temperature (0.2-0.5) for accurate responses, high (0.7-1.0) for creativity
- Store OpenAI API key securely and never share it
- Monitor your usage to avoid exceeding limits