Overview
OpenAI provides language models for agents, automation actions, and other AI-driven features. This guide walks you through setting up OpenAI as an AI Provider in Elementum. For the models currently available and when to use them, see AI Models.Prerequisites: You’ll need an OpenAI account with API access. Individual accounts and organization accounts are both supported.
Step 1: Get Your OpenAI API Key
Create an OpenAI Account
-
Visit OpenAI Platform
- Go to platform.openai.com
- Sign up for an account or log in to your existing account
-
Set Up Billing
- Navigate to Settings → Billing
- Add a payment method to enable API access
- Consider setting up usage limits to control costs
Generate Your API Key
1
Access API Keys
In your OpenAI dashboard, navigate to API Keys in the left sidebar
2
Create New Key
Click Create new secret keyGive your key a descriptive name like “Elementum Integration”
3
Copy and Store
Critical: Copy the API key immediately and store it securelyYou won’t be able to view it again after closing the dialog
4
Set Permissions (Optional)
If using an organization account, you can set specific permissions for the keyEnsure the key has access to the models you plan to use
Step 2: Configure OpenAI in Elementum
Add the Provider
- In Elementum, go to Organization Settings and select the Providers tab
- Click + Provider and select OpenAI from the provider options
-
Configure the provider settings:
- Provider Name: Enter a descriptive name (e.g., “OpenAI Production”)
- API Key: Paste your OpenAI API key
- Endpoint URL (Optional): Custom endpoint URL for Azure OpenAI or other OpenAI-compatible APIs. Leave blank to use the default OpenAI API endpoint.
- CloudLink: Select which CloudLinks can access models from this provider. Leave as “All CloudLinks” unless you need to restrict access.
AI services do not support CloudLinks configured with API as the connection type. Only CloudLinks connected to a supported data warehouse (Snowflake, BigQuery, or Databricks) can be associated with this provider.OpenAI handles rate limiting automatically. - Click Save to create the provider. Elementum will automatically validate your API key — look for a green checkmark indicating a successful connection.
Step 3: Create your first AI service
With your OpenAI provider configured, create an AI Service that uses an OpenAI model. See AI Services for the full walkthrough, including LLM service configuration, assignment, and failover. For the OpenAI models currently available in Elementum, see AI Models.Note: Embeddings for AI Search are handled exclusively through Snowflake Cortex. OpenAI models are used for LLM services only.
Usage Guidelines
Cost Management
OpenAI charges based on token usage. To manage costs:- Monitor Usage
- Optimize Usage
- Monitor usage in the OpenAI dashboard
- Set up billing alerts
- Review token consumption regularly
Best Practices
Model Selection
Model Selection
See AI Models for current recommendations by use case.
Prompt Engineering
Prompt Engineering
- Be specific and clear in your prompts
- Use system messages for consistent behavior
- Provide examples for better results
- For complex reasoning models, structure problems step-by-step
Performance Optimization
Performance Optimization
- Choose a model that fits the latency and quality you need. See AI Models for current recommendations.
- Implement caching for repeated queries
- Consider request queuing for high-volume usage
Troubleshooting
Authentication Errors
Authentication Errors
Symptoms: API key rejected or unauthorized errorsCommon Causes:
- Invalid or expired API key
- Insufficient permissions
- Billing issues
- Verify API key is correct and active
- Check billing status and payment methods
- Ensure key has proper permissions
- Regenerate API key if needed
Model Not Available
Model Not Available
Symptoms: Desired model doesn’t appear in service creationCommon Causes:
- Account doesn’t have access to specific models
- Regional restrictions
- Model deprecation
- Check OpenAI account tier and access levels
- Review model availability in your region
- Contact OpenAI support for access issues
- Consider alternative models
Rate Limit Issues
Rate Limit Issues
Symptoms: Requests being throttled or rejectedCommon Causes:
- Exceeding rate limits
- High concurrent usage
- Account tier limitations
- Implement exponential backoff
- Reduce request frequency
- Upgrade account tier if needed
- Distribute load across multiple keys
Security Considerations
- API Key Security
- Data Privacy
- Never expose API keys in client-side code
- Rotate keys regularly
- Use environment variables for storage
- Monitor key usage for anomalies
Advanced Configuration
Organization Accounts
If you’re using an OpenAI organization account, you can centralize API access, billing, and team permissions under a single organization:- Member Management: Control team access through OpenAI dashboard
- Usage Tracking: Monitor usage across team members
- Billing Management: Centralized billing for the organization
Custom Endpoints
If you use Azure OpenAI or another OpenAI-compatible API, you can point your provider at a custom endpoint instead of the default OpenAI API:- Endpoint URL: Enter your custom endpoint (e.g.,
https://your-resource.openai.azure.com/) - Authentication: May require additional authentication headers depending on the endpoint
- Model Names: Custom model names may be required for non-standard endpoints
- Rate Limits: May differ from standard OpenAI limits
Next Steps
With OpenAI configured as your AI Provider:Create AI Services
Set up specific LLM and embedding services for your workflows
Configure Snowflake Cortex
Set up Snowflake Cortex for AI Search and embeddings
Build Agents
Create conversational AI assistants using OpenAI models
Use AI Actions
Add AI capabilities to your automation workflows