This page describes features extending the AI Gateway, which provides a unified API for accessing multiple AI providers. To learn more, see AI Gateway.
Quick Start
Reference pre-created Prompts instead of inline messages.Configuration
| Parameter | Type | Required | Description | 
|---|---|---|---|
| id | string | Yes | Unique prompt identifier from Orq.ai | 
| version | "latest" | Yes | Currently only “latest” supported | 
prompt config and messages in same request.
Workflow
- Create a Prompt in the Orq.ai Studio.
- Copy prompt ID from the Studio..
- Reference in code using prompt config.
- Deploy safely knowing prompts are version-controlled.
Version Control Benefits
Production safety:- Changes to prompts don’t immediately break production
- Test prompt changes before releasing
- Rollback capability if issues arise
Code examples
Error Handling
Best Practices
Prompt management:- Use descriptive names for prompts in the Studio.
- Document prompt purpose and usage
- Test prompt changes in staging first
- Maintain prompt versioning strategy
Troubleshooting
**“Prompt not found” errors- Verify prompt ID is correct
- Check prompt exists in your Orq.ai account
- Ensure prompt is published/active
- Confirm API Key has access to the prompt
- Remember “latest” version may have delays
- Check prompt was saved in dashboard
- Verify you’re using correct environment
- Prompt resolution adds minimal latency (~10ms)
- Cache prompt responses like regular requests
- Consider local caching for frequently used prompts
Monitoring
Track prompt usage:- Which prompts are used most frequently?
- What’s the error rate per prompt?
- How often do we fall back to inline messages?
- What’s the performance impact of prompt resolution?
Advanced Usage
Dynamic prompt selection:Limitations
- Pre-creation required: Prompts must exist in Orq.ai before use
- Version limitations: Only “latest” version currently supported
- Exclusive usage: Cannot mix prompt config with inline messages
- Network dependency: Requires connection to Orq.ai for prompt resolution
- Account scoped: Prompts cannot be shared across different Orq.ai accounts
Migration from Inline Messages
Before (inline messages):Team Collaboration
Roles and responsibilities:- Developers: Implement prompt references in code
- Product managers: Create and refine prompts in dashboard
- QA: Test prompt changes before production
- DevOps: Manage prompt deployments and rollbacks
- Product team updates prompt in dashboard
- Notifies dev team of changes
- Dev team tests with “latest” version
- Deploy to production when ready
- Monitor performance and rollback if needed