OhMyCaptcha

repository·main·Indexed 21 days ago

https://github.com/shenhao-stu/ohmycaptcha

A captcha solving and image task automation service providing reusable skill sets for AI agent environments like Cursor, Claude Code, and OpenCode. It supports 19 task types, including reCAPTCHA v2/v3, hCaptcha, and Cloudflare Turnstile, as well as image recognition and classification. The system utilizes a hybrid architecture of local models (via SGLang or vLLM) for image tasks and cloud models for audio transcription and reasoning. It can be deployed locally, on Render, or via Docker on Hugging Face Spaces.

Tokens
24.7K
Snippets
62
Records
110
Agent score
73%

What's inside ohmycaptcha

  1. What is OhMyCaptcha and when to use it

    main

    OhMyCaptcha is a self-hostable captcha solving service designed to mimic the createTask / getTaskResult workflow used by managed services like YesCaptcha.

    Use OhMyCaptcha if you require:

    • Self-hosting: Complete control over the infrastructure.
    • Workflow Compatibility: Integration with systems expecting a YesCaptcha-style API (e.g., flow2api).
    • Customization: Control over browser automation settings and model prompts.
    • Backend Flexibility: The ability to use any OpenAI-compatible multimodal provider, including local model-serving stacks or internal gateways.
  2. Overview of OhMyCaptcha skill capabilities

    main

    The ohmycaptcha skill is designed to deploy, validate, and integrate OhMyCaptcha capabilities into agentic workflows. It supports:

    • Local model deployment: Setting up SGLang or vLLM to serve Qwen3.5-2B for image-based tasks.
    • Cloud model configuration: Configuring remote APIs (e.g., gpt-5.4) for audio transcription tasks.
    • 19 task types: Including reCAPTCHA v2/v3, hCaptcha, Turnstile, and various image classification/recognition tasks.
    • Deployment targets: Support for local environments, Render, and Hugging Face Spaces.
  3. Overview of OhMyCaptcha

    main

    OhMyCaptcha is a self-hostable captcha solving service that provides a clean, YesCaptcha-style API. It is designed for integrations like flow2api and combines FastAPI, Playwright, and OpenAI-compatible multimodal models to solve various captcha types.

    Key Features

    • YesCaptcha-style API: Uses familiar async createTask and getTaskResult semantics.
    • Browser-based solving: Uses Playwright and Chromium to automate token generation for reCAPTCHA (v2/v3), hCaptcha, and Cloudflare Turnstile.
    • Multimodal image recognition: Routes image analysis through OpenAI-compatible vision models for HCaptcha, reCAPTCHA, FunCaptcha, and AWS classification.
    • Self-hosted deployment: Can be run locally or deployed to platforms like Render and Hugging Face Spaces.
  4. Use local or self-hosted models with ohmycaptcha

    main
    The image recognition functionality is designed to work with any OpenAI-compatible API. You can use a hosted provider or a self-hosted/local multimodal gateway by pointing the CAPTCHA_BASE_URL to your endpoint. The endpoint must support chat-completions semantics and accept image inputs.
  5. Important Operational Constraints and Limitations

    main

    When using OhMyCaptcha, be aware of the following technical constraints:

    • Task Storage: Tasks are stored in-memory and have a 10-minute TTL (Time To Live).
    • reCAPTCHA v2 / hCaptcha: In headless environments, these tasks may require an image classification fallback to succeed.
    • minScore: The minScore parameter is for compatibility purposes only.
  6. Use the OhMyCaptcha operational skill

    main

    The skills/ohmycaptcha/ skill is designed for service management and integration. It automates or assists with:

    • Local Setup: Local startup and environment configuration.
    • API Integration: Using YesCaptcha-style APIs and flow2api integration.
    • Deployment: Deploying Render or Hugging Face Spaces.
    • Maintenance: Task validation and troubleshooting.

    Note: These skills use placeholder credentials and do not embed secrets or private endpoints.

  7. Understand the Local vs Cloud model architecture

    main

    OhMyCaptcha utilizes two distinct model backends to handle different task types. Understanding the distinction is crucial for configuring the system correctly:

    1. Local Model: Used for high-throughput image recognition and classification tasks. This is intended to be self-hosted using an OpenAI-compatible inference server like SGLang or vLLM.
    2. Cloud Model: Used for audio transcription and complex reasoning tasks. This typically connects to a powerful remote API (e.g., GPT-based endpoints).

    By separating these, you can run heavy image processing locally on your own hardware while offloading complex reasoning to a cloud provider.

  8. Use the ohmycaptcha-image skill for documentation visuals

    main
    The ohmycaptcha-image skill is a specialized skill used to generate public-safe visuals for README files and project documentation. It provides specific prompting guidance to ensure generated repository art and documentation visuals are appropriate and high-quality.
  9. Handling hCaptcha in Headless Environments

    main

    When using headless browsers, hCaptcha may detect the environment and present an image challenge even when using test keys.

    If HCaptchaTaskProxyless is insufficient due to aggressive bot detection or image challenges, use the HCaptchaClassification task type to solve the image grid challenge programmatically, then manually inject the resulting token into the target site.

  10. Backend compatibility for Image CAPTCHA solving

    main
    The image recognition backend is designed to be compatible with OpenAI-compatible APIs. This allows you to use either hosted providers or self-hosted backends, provided they support image-capable chat completion (multimodal capabilities). Accuracy is dependent on the specific model and provider used.
  11. Configure multimodal model backends via OpenAI-compatible APIs

    main

    OhMyCaptcha supports multimodal recognition by connecting to backends that expose OpenAI-compatible chat-completion semantics. This allows you to use various model providers by pointing the service to their endpoints.

    Supported backend types include:

    • Hosted providers (e.g., OpenAI, Anthropic via compatible gateways).
    • Internal gateways within your own network.
    • Self-hosted multimodal services.
    • Local model-serving stacks (e.g., SGLang or other local inference engines).

    Note: Compatibility is determined by whether the backend supports image input and maintains consistent chat-completions behavior.