cURL Examples
Quick cURL examples for testing PrompTick API.
Execute Agent
curl -X POST https://api.promptick.ai/api/v1/agents/agent_abc123/execute \
-H "Authorization: Bearer pk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"variables": {
"product_name": "Smart Watch Pro",
"target_audience": "fitness enthusiasts"
}
}'
Response:
{
"jobId": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued",
"agentId": "agent_abc123"
}
Check Execution Status
curl https://api.promptick.ai/api/v1/agents/agent_abc123/executions/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer pk_live_YOUR_API_KEY"
Response (completed):
{
"executionId": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"result": {
"response": "Generated content here..."
}
}
With jq for Pretty Output
curl -X POST https://api.promptick.ai/api/v1/agents/agent_abc123/execute \
-H "Authorization: Bearer pk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"variables": {"product_name": "Test"}}' \
| jq '.'
Save Response to File
curl -X POST https://api.promptick.ai/api/v1/agents/agent_abc123/execute \
-H "Authorization: Bearer pk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d @request.json \
-o response.json
Where request.json:
{
"variables": {
"product_name": "Smart Watch Pro"
}
}