Skip to content

feat: add standalone Flow RecaptchaV3TaskProxylessM1 captcha API#2

Open
yubanmayi wants to merge 2 commits intomainfrom
codex/add-flow-recaptcha-v3-task-proxyless-api
Open

feat: add standalone Flow RecaptchaV3TaskProxylessM1 captcha API#2
yubanmayi wants to merge 2 commits intomainfrom
codex/add-flow-recaptcha-v3-task-proxyless-api

Conversation

@yubanmayi
Copy link
Copy Markdown
Owner

Motivation

  • Provide a dedicated, OpenAI-style endpoint to request Flow reCAPTCHA v3 tokens through the browser captcha provider, centralizing Flow browser captcha calls.
  • Ensure operator-configurable upstream service integration (URL, path, API key, timeout) so deployments can point to an internal/third-party Flow captcha service.

Description

  • Added POST /v1/captcha/flow-recaptcha-v3-task-proxyless-m1 handler with request model FlowRecaptchaV3TaskProxylessM1Request that accepts project_id or website_url and page_action (IMAGE_GENERATION or VIDEO_GENERATION).
  • The endpoint calls the configured upstream Flow captcha service (via curl_cffi AsyncSession) using Bearer auth, configurable timeout, and unified success/error response shapes; the success payload includes token, duration_ms, task_type and fixed pricing fields (0.015 per task / 15/1000).
  • Added runtime config accessors in src/core/config.py for flow_captcha_service_base_url, flow_captcha_service_solve_path, flow_captcha_service_api_key, and flow_captcha_service_timeout_seconds with sensible defaults.
  • Updated config/setting_example.toml with the new captcha config keys and extended the README.md with example curl usage and ops notes.

Testing

  • Ran python -m compileall src to verify the project compiles; compilation completed successfully.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant