API Overview
The PrompTick API provides programmatic access to execute your deployed agents from any application.
Base URL
https://api.promptick.ai/api/v1
Authentication
All API requests require an API key in the Authorization header:
Authorization: Bearer pk_live_YOUR_API_KEY
Learn more about authentication →
Quick Example
Execute an agent:
curl -X POST https://api.promptick.ai/api/v1/agents/{agentId}/execute \
-H "Authorization: Bearer pk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"variables": {"product_name": "Smart Watch"}}'
Response:
{
"jobId": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued",
"agentId": "agent_123",
"message": "Agent execution queued successfully"
}
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/agents/{agentId}/execute | POST | Execute an agent |
/agents/{agentId}/executions/{executionId} | GET | Get execution status |
Response Format
All responses are JSON with this structure:
Success (200):
{
"jobId": "string",
"status": "queued" | "processing" | "completed" | "failed",
"agentId": "string"
}
Error (4xx/5xx):
{
"error": "string",
"message": "string",
"code": "string"
}
Error Codes
| Code | Status | Description |
|---|---|---|
| 400 | Bad Request | Invalid request body or missing required fields |
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Forbidden | Agent not active or API access disabled |
| 404 | Not Found | Agent does not exist |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error |
| 503 | Service Unavailable | Background job system unavailable |
Rate Limiting
- Limits are configured per API key
- Headers include rate limit info:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 47
X-RateLimit-Reset: 1638360000 - When exceeded, returns
429withretryAfterseconds
Learn more about rate limits →
Best Practices
- Handle Errors Gracefully - Implement retry logic with exponential backoff
- Monitor Rate Limits - Check response headers
- Use HTTPS - All requests must use HTTPS
- Secure API Keys - Store in environment variables
- Implement Timeouts - Set reasonable request timeouts
SDKs & Libraries
Official SDKs coming soon! Currently use standard HTTP clients:
- Node.js:
axios,fetch,node-fetch - Python:
requests,httpx - PHP:
guzzle,curl - Ruby:
faraday,httparty - Go:
net/http
Need Help?
- API Reference - Detailed endpoint documentation
- Code Examples - Working samples
- Troubleshooting - Common issues
- Support - Get help
Ready to integrate? View authentication guide →