Earn 1,800 ($18.00)
API integration to relevance.ai
Bounty Description
Problem Description
We're experiencing issues integrating with the Relevance.AI API in our Sales Agent AI Assistant Platform. After multiple implementation attempts, we're receiving a "Resource not found (404): The API endpoint or project does not exist" error. Our application currently has multiple implementation files (relevanceai.ts
, relevanceAICall.ts
, relevanceAICall.new.ts
, and relevanceAICall.fixed.ts
) with inconsistent approaches to URL formatting, authentication, and endpoint structures. We initially tried using https://api.relevance.ai
as the base URL, but documentation indicates we should be using https://api-{region-id}.stack.tryrelevance.com/latest
with region-specific authentication.
Acceptance Criteria
-
A consolidated implementation that correctly integrates with Relevance.AI's API using:
- The proper URL format:
https://api-{region-id}.stack.tryrelevance.com/latest
- Correct authentication header:
{ProjectID}:{APIKey}
without Bearer prefix - Proper request body structures for different endpoints
- The proper URL format:
-
The implementation should support:
- Synchronous and asynchronous agent operations
- Tool execution
- Proper error handling with descriptive messages
- Fallback to Anthropic when Relevance.AI is unavailable
-
A diagnostic utility function that can verify:
- Authentication is working
- Region and project ID are valid
- Agent/tool IDs exist
-
Documentation on the correct parameter formats and required fields for different endpoint types
-
Removal of outdated/incorrect implementations to prevent future confusion