Authentication
Required: API Key authentication via X-API-Key header
Overview
This endpoint initiates an event-driven evaluation flow:
- API creates evaluation job record with status
awaiting_upload
- API generates pre-signed GCS upload URL
- Client uploads content directly to GCS using PUT request
- Evaluation triggered on upload completion
- Webhook notification sent to client
Request Body
The ID of the judge to use for evaluation
The type of content being uploadedAllowed values: video, image, audio
The original filename of the content. Must be between 1-255 characters.
The size of the file in bytes.
Optional title for the content
Optional description for the content
Optional webhook URL to override your organization’s default webhook.If provided, this URL will receive notifications for this batch. The webhook will still use your organization’s webhook secret for request signing.
Request Example
cURL
curl -X POST "https://api.getpique.ai/v1/evaluations/presigned-upload" \
-H "X-API-Key: pk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"judge_id": "judge_abc123",
"content_type": "video",
"filename": "safety_test_video.mp4",
"file_size_bytes": 52428800,
"title": "Product Demo Video",
"description": "Marketing video for new product launch"
}'
JSON Body
{
"judge_id": "judge_abc123",
"content_type": "video",
"filename": "safety_test_video.mp4",
"file_size_bytes": 52428800,
"title": "Product Demo Video",
"description": "Marketing video for new product launch"
}
Response
Unique identifier for the evaluation job. Use this to track the evaluation status.
Pre-signed GCS upload URL. Use this URL with a PUT request to upload your content.Important: This URL expires after the time specified in expires_at
Headers that must be included when uploading to the upload_urlTypically includes:
- Content-Type headers
- Any required authentication headers
ISO 8601 timestamp indicating when the upload URL expires (typically 1 hour from creation)
Response Example
{
"job_id": "job_xKt9mNp2qRs3vWy7",
"upload_url": "https://storage.googleapis.com/judge-content/org_123/pending/job_xKt9mNp2qRs3vWy7/safety_test_video.mp4?X-Goog-Algorithm=GOOG4-RSA-SHA256&...",
"upload_headers": {
"Content-Type": "video/mp4"
},
"expires_at": "2024-01-15T11:30:00Z"
}
Uploading Content
After receiving the response, upload your file using the provided URL:
curl -X PUT "<UPLOAD_URL_FROM_RESPONSE>"\
-H "Content-Type: video/mp4" \
--data-binary @your-video.mp4 \
Webhook Notifications
If your organization has configured a webhook (contact Pique to set a default webhook for your organization), you’ll receive a notification when the evaluation completes. The webhook payload will include:
- Job ID
- Evaluation status
- Results (if successful)
- Error message (if failed)
Error Responses
400 Bad Request
- Invalid content type (must be video, image, or audio)
- Invalid request parameters
401 Unauthorized
Missing or invalid API key
404 Not Found
Judge not found or not accessible by your organization
500 Internal Server Error
Failed to create upload URL due to server error