Skip to main content

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

EndpointMethodDescription
/agents/{agentId}/executePOSTExecute an agent
/agents/{agentId}/executions/{executionId}GETGet 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

CodeStatusDescription
400Bad RequestInvalid request body or missing required fields
401UnauthorizedInvalid or missing API key
403ForbiddenAgent not active or API access disabled
404Not FoundAgent does not exist
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error
503Service UnavailableBackground 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 429 with retryAfter seconds

Learn more about rate limits →

Best Practices

  1. Handle Errors Gracefully - Implement retry logic with exponential backoff
  2. Monitor Rate Limits - Check response headers
  3. Use HTTPS - All requests must use HTTPS
  4. Secure API Keys - Store in environment variables
  5. 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?


Ready to integrate? View authentication guide →