Reference

Insomnia REST Client for CaptchaAI API Development

Insomnia provides a clean interface for testing API endpoints without writing code. Setting up a CaptchaAI workspace in Insomnia lets you test task submission, poll for results, check balances, and debug issues — all before writing your integration code.

Setting Up the Workspace

Create a CaptchaAI Workspace

  1. Open Insomnia
  2. Click CreateDesign Document or Request Collection
  3. Name it "CaptchaAI API"

Configure Environment Variables

Use Insomnia's environment system to avoid hardcoding values:

  1. Click the environment dropdown (top-left)
  2. Select Manage Environments
  3. Add a Base Environment with shared values:
{
  "base_url": "https://ocr.captchaai.com",
  "api_key": "YOUR_API_KEY"
}
  1. Create Sub Environments for different configurations:

Development:

{
  "test_sitekey": "6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI",
  "test_pageurl": "https://www.google.com/recaptcha/api2/demo"
}

Production:

{
  "test_sitekey": "YOUR_PRODUCTION_SITEKEY",
  "test_pageurl": "https://your-target-site.com"
}

Reference variables with {{ base_url }} and {{ api_key }} in your requests.

Core API Requests

1. Check Balance

Field Value
Method GET
URL {{ base_url }}/res.php

Query Parameters:

Key Value
key {{ api_key }}
action getbalance
json 1

Expected Response:

{
  "status": 1,
  "request": "12.3456"
}

2. Submit reCAPTCHA v2 Task

Field Value
Method POST
URL {{ base_url }}/in.php
Body Form URL Encoded

Form Parameters:

Key Value
key {{ api_key }}
method userrecaptcha
googlekey {{ test_sitekey }}
pageurl {{ test_pageurl }}
json 1

Expected Response:

{
  "status": 1,
  "request": "TASK_ID_HERE"
}

3. Poll for Result

Field Value
Method GET
URL {{ base_url }}/res.php

Query Parameters:

Key Value
key {{ api_key }}
action get
id (paste task ID from step 2)
json 1

Expected Responses:

Processing:

{
  "status": 0,
  "request": "CAPCHA_NOT_READY"
}

Complete:

{
  "status": 1,
  "request": "03AGdBq24PBCb..."
}

4. Submit Cloudflare Turnstile Task

Key Value
key {{ api_key }}
method turnstile
sitekey TURNSTILE_SITEKEY
pageurl https://target-site.com
json 1

5. Submit Image CAPTCHA Task

Field Value
Method POST
URL {{ base_url }}/in.php
Body Form URL Encoded
Key Value
key {{ api_key }}
method base64
body (base64 encoded image)
json 1

Request Chaining

Insomnia supports response references, letting you chain the submit → poll workflow:

Step 1: Tag the Submit Response

After sending the submit request, note the response. You can reference it in subsequent requests.

Step 2: Use Response Reference in Poll

In the poll request's id parameter:

  1. Press Ctrl+Space in the value field
  2. Select Response → Body Attribute
  3. Configure: - Request: Select the submit request - Filter: $.request (JSONPath to extract the task ID) - Trigger Behavior: "When Expired" or "Always"

Now sending the poll request automatically uses the task ID from the most recent submit response.

Request Folders

Organize your workspace with folders:

CaptchaAI API/
├── Account/
│   └── Check Balance
├── reCAPTCHA/
│   ├── Submit v2 Task
│   ├── Submit v3 Task
│   ├── Submit Enterprise Task
│   └── Poll Result
├── Cloudflare/
│   ├── Submit Turnstile Task
│   └── Poll Result
├── Image/
│   ├── Submit Base64 Image
│   └── Poll Result
└── hCaptcha/
    ├── Submit hCaptcha Task
    └── Poll Result

Testing Different CAPTCHA Types

Request Template for Each Type

CAPTCHA Type method Value Key Parameter Extra Parameters
reCAPTCHA v2 userrecaptcha googlekey
reCAPTCHA v3 userrecaptcha googlekey version=v3, action=verify, min_score=0.3
reCAPTCHA Enterprise userrecaptcha googlekey enterprise=1
Cloudflare Turnstile turnstile sitekey
hCaptcha hcaptcha sitekey
Image/OCR base64 body

Response Validation

Insomnia doesn't have built-in test assertions, but you can validate responses visually:

Success Indicators

Response Field Success Value Error Indicator
HTTP Status 200 403, 429, 500
status 1 0
request (submit) Numeric task ID ERROR_* string
request (poll) Token string CAPCHA_NOT_READY or ERROR_*

Common Error Responses

Error Meaning Fix in Insomnia
ERROR_WRONG_USER_KEY Invalid API key Check {{ api_key }} in environment
ERROR_KEY_DOES_NOT_EXIST API key not found Verify key in environment settings
ERROR_ZERO_BALANCE No funds Top up account
ERROR_NO_SLOT_AVAILABLE Server busy Resend request after a few seconds
ERROR_CAPTCHA_UNSOLVABLE Challenge couldn't be solved Check parameters — wrong sitekey or pageurl
ERROR_WRONG_CAPTCHA_ID Invalid task ID Resubmit the task and use the new ID

Sharing with Your Team

Export the Collection

  1. Right-click the workspace
  2. Select Export Data
  3. Choose format: Insomnia v4 (JSON) or HAR
  4. Remove API keys from the exported file before sharing

Using Git Sync

Insomnia supports Git integration:

  1. Open workspace settings
  2. Configure Git repository
  3. Commit and push your request collection
  4. Team members clone and use their own environment variables (with their own API keys)

Security note: Never commit environment files containing real API keys to shared repositories. Use Insomnia's private environments or .gitignore the environment file.

Insomnia vs Postman for CaptchaAI

Feature Insomnia Postman
Interface Minimal, focused Feature-rich, more complex
Response chaining Response references Collection variables + scripts
Environment variables Sub-environments Environments + globals
Test scripts Plugin-based Built-in JavaScript test runner
Team sharing Git sync or export Cloud workspaces
Price Free (core features) Free (limited), paid for teams
Offline use Full functionality Limited without cloud sync

Troubleshooting

Issue Cause Fix
Environment variable not resolving Variable name mismatch Check spelling — variables are case-sensitive
Request chaining returns old task ID Cached response reference Set trigger behavior to "Always" instead of "When Expired"
SSL Error when connecting Corporate proxy or firewall Settings → toggle "Validate certificates" off (dev only)
POST body not sending correctly Wrong body type selected Ensure "Form URL Encoded" is selected, not "JSON"
Base64 image too large for form field Image exceeds URL-encoded body limits Use multipart form data for large images

FAQ

Can I automate Insomnia to run CaptchaAI tests on a schedule?

Not directly. Insomnia is primarily an interactive tool. For automated testing, export your requests as cURL commands and run them in a CI/CD pipeline, or use a dedicated test framework with CaptchaAI's API.

Does Insomnia support WebSocket connections for CaptchaAI?

CaptchaAI uses standard HTTP REST endpoints (not WebSockets), so Insomnia's HTTP client covers all CaptchaAI API interactions. No WebSocket support is needed.

How do I handle the polling delay in Insomnia?

Manually — send the poll request, check if it returns CAPCHA_NOT_READY, wait a few seconds, then send again. For automated polling, use code instead of Insomnia.

Next Steps

Set up your Insomnia workspace to test the CaptchaAI API before building your integration — get your API key to start.

Related guides:

Discussions (0)

No comments yet.

Related Posts

DevOps & Scaling Ansible Playbooks for CaptchaAI Worker Deployment
Deploy and manage Captcha AI workers with Ansible — playbooks for provisioning, configuration, rolling updates, and health checks across your server fleet.

Deploy and manage Captcha AI workers with Ansible — playbooks for provisioning, configuration, rolling updates...

Automation Python All CAPTCHA Types
Apr 07, 2026
DevOps & Scaling Blue-Green Deployment for CAPTCHA Solving Infrastructure
Implement blue-green deployments for CAPTCHA solving infrastructure — zero-downtime upgrades, traffic switching, and rollback strategies with Captcha AI.

Implement blue-green deployments for CAPTCHA solving infrastructure — zero-downtime upgrades, traffic switchin...

Automation Python All CAPTCHA Types
Apr 07, 2026
Troubleshooting CaptchaAI API Error Handling: Complete Decision Tree
Complete decision tree for every Captcha AI API error.

Complete decision tree for every Captcha AI API error. Learn which errors are retryable, which need parameter...

Automation Python All CAPTCHA Types
Mar 17, 2026
Tutorials Using Fiddler to Inspect CaptchaAI API Traffic
How to use Fiddler Everywhere and Fiddler Classic to capture, inspect, and debug Captcha AI API requests and responses — filters, breakpoints, and replay for tr...

How to use Fiddler Everywhere and Fiddler Classic to capture, inspect, and debug Captcha AI API requests and r...

Automation Python All CAPTCHA Types
Mar 05, 2026
Tutorials CAPTCHA Handling in Mobile Apps with Appium
Handle CAPTCHAs in mobile app automation using Appium and Captcha AI — extract Web sitekeys, solve, and inject tokens on Android and i OS.

Handle CAPTCHAs in mobile app automation using Appium and Captcha AI — extract Web View sitekeys, solve, and i...

Automation Python All CAPTCHA Types
Feb 13, 2026
Tutorials Streaming Batch Results: Processing CAPTCHA Solutions as They Arrive
Process CAPTCHA solutions the moment they arrive instead of waiting for tasks to complete — use async generators, event emitters, and callback patterns for stre...

Process CAPTCHA solutions the moment they arrive instead of waiting for all tasks to complete — use async gene...

Automation Python All CAPTCHA Types
Apr 07, 2026
Reference CaptchaAI CLI Tool: Command-Line CAPTCHA Solving and Testing
A reference for building and using a Captcha AI command-line tool — solve CAPTCHAs, check balance, test parameters, and integrate with shell scripts and CI/CD p...

A reference for building and using a Captcha AI command-line tool — solve CAPTCHAs, check balance, test parame...

Automation Python All CAPTCHA Types
Feb 26, 2026
DevOps & Scaling Auto-Scaling CAPTCHA Solving Workers
Build auto-scaling CAPTCHA solving workers that adjust capacity based on queue depth, balance, and solve rates.

Build auto-scaling CAPTCHA solving workers that adjust capacity based on queue depth, balance, and solve rates...

Automation Python All CAPTCHA Types
Mar 23, 2026
DevOps & Scaling CaptchaAI Monitoring with Datadog: Metrics and Alerts
Monitor Captcha AI performance with Datadog — custom metrics, dashboards, anomaly detection alerts, and solve rate tracking for CAPTCHA solving pipelines.

Monitor Captcha AI performance with Datadog — custom metrics, dashboards, anomaly detection alerts, and solve...

Automation Python All CAPTCHA Types
Feb 19, 2026
Reference CAPTCHA Token Injection Methods Reference
Complete reference for injecting solved CAPTCHA tokens into web pages.

Complete reference for injecting solved CAPTCHA tokens into web pages. Covers re CAPTCHA, Turnstile, and Cloud...

Automation Python reCAPTCHA v2
Apr 08, 2026
Reference API Endpoint Mapping: CaptchaAI vs Competitors
Side-by-side API endpoint comparison between Captcha AI, 2 Captcha, Anti-Captcha, and Cap Monster — endpoints, parameters, and response formats.

Side-by-side API endpoint comparison between Captcha AI, 2 Captcha, Anti-Captcha, and Cap Monster — endpoints,...

All CAPTCHA Types Migration
Feb 05, 2026
Reference Browser Session Persistence for CAPTCHA Workflows
Manage browser sessions, cookies, and storage across CAPTCHA-solving runs to reduce repeat challenges and maintain authenticated state.

Manage browser sessions, cookies, and storage across CAPTCHA-solving runs to reduce repeat challenges and main...

Automation Python reCAPTCHA v2
Feb 24, 2026