Create a new loop to route human review requests. When you create a loop, you automatically become a member and receive an invite code with QR code for sharing with other reviewers.
Authentication
Your API key for authentication
Body
Name of the loop (1-100 characters)
Description of the loop’s purpose (max 500 characters)
Icon identifier for the loop (e.g., “shield-check”, “eye”, “thumbs-up”)
Response
Whether an error occurred
The created loop object with member counts Unique identifier for the loop
Number of pending invitations
ISO timestamp of creation
ISO timestamp of last update
Generated invite code for joining the loop
Base64 encoded QR code image
URL to access the QR code image
Direct URL for joining the loop
curl -X POST https://api.hitl.sh/v1/api/loops \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Content Moderation Review",
"description": "Review user-generated content for community guidelines compliance",
"icon": "shield-check"
}'
{
"error" : false ,
"msg" : "Loop created successfully with QR code" ,
"data" : {
"loop" : {
"id" : "65f1234567890abcdef12345" ,
"name" : "Content Moderation Review" ,
"description" : "Review user-generated content for community guidelines compliance" ,
"icon" : "shield-check" ,
"creator_id" : "65f1234567890abcdef12346" ,
"members" : [
{
"user_id" : "65f1234567890abcdef12346" ,
"email" : "creator@example.com" ,
"status" : "active" ,
"joined_at" : "2024-03-15T10:30:00Z"
}
],
"member_count" : 1 ,
"pending_count" : 0 ,
"created_at" : "2024-03-15T10:30:00Z" ,
"updated_at" : "2024-03-15T10:30:00Z"
},
"invite_code" : "ABC123DEF" ,
"qr_code_base64" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..." ,
"qr_code_url" : "https://api.hitl.sh/qr/ABC123DEF.png" ,
"join_url" : "https://my.hitl.sh/join/ABC123DEF"
}
}
Use Cases
Content Moderation
Create a loop for reviewing flagged user content:
{
"name" : "Content Moderation" ,
"description" : "Review flagged posts and comments for policy violations" ,
"icon" : "shield-exclamation"
}
Document Approval
Create a loop for business document approvals:
{
"name" : "Contract Review" ,
"description" : "Legal review of customer contracts and agreements" ,
"icon" : "document-check"
}
Quality Assurance
Create a loop for AI output validation:
{
"name" : "AI Content QA" ,
"description" : "Quality assurance for AI-generated content and responses" ,
"icon" : "beaker"
}
Next Steps
After creating a loop:
Share the invite code or QR code with your team members
Create your first request using the Create Request endpoint
Set up webhooks to receive notifications when requests are completed
Create Your First Request Learn how to create requests within your newly created loop.