MCPcopy Create free account

hub / github.com/TheSmallHanCat/flow2api / functions

Functions1,214 in github.com/TheSmallHanCat/flow2api

↓ 3 callersFunctionretrieve_image_data
Read image bytes from local /tmp cache or remote URL.
src/api/routes.py:171
↓ 3 callersMethodselect_token
Select a token using load-aware balancing Args: for_image_generation: If True, only select tokens with image_enabled=Tru
src/services/load_balancer.py:140
↓ 3 callersMethodsubmit_flow_request
在同一浏览器上下文中完成打码并直接提交 Flow 请求。
src/services/browser_captcha.py:2159
↓ 3 callersFunctionsupports_model_for_tier
Check whether the current account tier can use the given model.
src/core/account_tiers.py:54
↓ 3 callersMethodupdate_admin_config
Update admin configuration
src/core/database.py:1347
↓ 3 callersMethodupdate_cache_config
Update cache configuration
src/core/database.py:1749
↓ 3 callersMethodupdate_generation_config
Update generation configuration
src/core/database.py:1427
↓ 3 callersMethodupdate_token
Update token fields
src/core/database.py:1090
↓ 3 callersMethodverify_api_key
Verify API key
src/core/auth.py:16
↓ 2 callersMethod_apply_browser_instance_identity
(self, browser_instance_id: int)
src/services/browser_captcha_personal.py:1557
↓ 2 callersMethod_apply_configured_browser_startup_cookie
( self, *, label: str, browser_context_id: Any = None, tab=None, )
src/services/browser_captcha_personal.py:6861
↓ 2 callersFunction_apply_image_config
(image_config: Any, aspect_ratio: Optional[str], image_size: Optional[str])
src/core/model_resolver.py:517
↓ 2 callersMethod_apply_runtime_profile_permissions
( self, *, label: str, browser_context_id: Any = None, target_url: Opt
src/services/browser_captcha_personal.py:2908
↓ 2 callersFunction_aspect_from_dimensions
(width: int, height: int, *, video_mode: bool = False)
src/core/model_resolver.py:123
↓ 2 callersMethod_browser_get
( self, url: str, label: str, new_tab: bool = False, new_window: bool
src/services/browser_captcha_personal.py:2716
↓ 2 callersMethod_build_current_flow_media_headers
( self, *, content_type: str = "application/json", )
src/services/flow_client.py:286
↓ 2 callersFunction_build_gemini_model_resource
Build a Gemini-compatible model resource payload.
src/api/routes.py:131
↓ 2 callersFunction_build_gemini_parts_from_output
(output: str)
src/api/routes.py:636
↓ 2 callersMethod_build_labs_request_context_headers
(self, project_id: Optional[str])
src/services/flow_client.py:310
↓ 2 callersFunction_build_model_description
Build a human-readable description for model listing endpoints.
src/api/routes.py:97
↓ 2 callersMethod_build_proxy_config_signature
基于当前数据库配置构建稳定签名,用于判断是否需要重启浏览器 runtime。
src/services/browser_captcha_personal.py:1953
↓ 2 callersFunction_build_proxy_map
(proxy_url: str)
src/api/admin.py:240
↓ 2 callersMethod_build_tab_fingerprint_spoof_source
(self, tab)
src/services/browser_captcha_personal.py:3615
↓ 2 callersMethod_capture_page_fingerprint
从浏览器页面提取 UA 与客户端提示头,确保与打码浏览器一致。
src/services/browser_captcha.py:1476
↓ 2 callersMethod_check_extension_route
Ensure extension captcha requests are routed to the selected account.
src/services/load_balancer.py:120
↓ 2 callersMethod_cleanup_proxy_extension
Remove temporary proxy auth extension directory.
src/services/browser_captcha_personal.py:8539
↓ 2 callersMethod_clear_resident_storage_and_reload
清理常驻标签页的站点数据并刷新,尝试原地自愈。
src/services/browser_captcha_personal.py:9722
↓ 2 callersFunction_collect_non_stream_result
( model: str, prompt: str, images: List[bytes], base_url_override: Optional[str] = None, v
src/api/routes.py:487
↓ 2 callersMethod_collect_runtime_profile_cleanup_targets
(self)
src/services/browser_captcha_personal.py:1628
↓ 2 callersMethod_configure_connection
Apply SQLite runtime settings for better concurrent behavior.
src/core/database.py:31
↓ 2 callersFunction_convert_openai_stream_chunk_to_gemini_event
( payload: Dict[str, Any], response_model: str, )
src/api/routes.py:688
↓ 2 callersMethod_create_isolated_context_tab
通过 CDP 手动创建独立 browser context 与 target,绕过 nodriver.create_context 的 StopIteration 缺陷。
src/services/browser_captcha_personal.py:6074
↓ 2 callersMethod_create_project_for_token
Create a new pooled project for a token and persist it.
src/services/token_manager.py:176
↓ 2 callersFunction_decode_data_url
(data_url: str)
src/api/routes.py:147
↓ 2 callersMethod_describe_routes
(self)
src/services/browser_captcha_extension.py:85
↓ 2 callersMethod_do_refresh_at
执行 AT 刷新的核心逻辑 Args: token_id: Token ID st: Session Token Returns: True if refresh successful AND
src/services/token_manager.py:612
↓ 2 callersFunction_ensure_admin_page_session
(request: Request)
src/main.py:341
↓ 2 callersMethod_ensure_idle_reaper
(self)
src/services/browser_captcha.py:2573
↓ 2 callersMethod_ensure_resident_token_binding
( self, resident_info: Optional[ResidentTabInfo], token_id: Optional[int], *,
src/services/browser_captcha_personal.py:7351
↓ 2 callersMethod_ensure_shared_keepalive_page
Ensure the shared browser always keeps one keepalive page alive.
src/services/browser_captcha.py:1005
↓ 2 callersMethod_ensure_shared_token_binding
(self, context, token_id: Optional[int])
src/services/browser_captcha.py:1081
↓ 2 callersMethod_ensure_token_pool_maintainer
(self)
src/services/browser_captcha_personal.py:12887
↓ 2 callersFunction_env_truthy
(name: str)
src/services/browser_captcha_personal.py:594
↓ 2 callersMethod_execute_custom_captcha
在任意站点执行 reCAPTCHA,用于分数测试等非 Flow 场景。
src/services/browser_captcha.py:1873
↓ 2 callersMethod_extract_agent_session_id
(self, sessions_payload: Dict[str, Any])
src/services/flow_client.py:2502
↓ 2 callersMethod_extract_cookie_name_domain
兼容 nodriver cookie 对象与 dict 结构,提取 name/domain 用于日志。
src/services/browser_captcha_personal.py:6344
↓ 2 callersMethod_extract_cookie_scope_host
(cookie: Dict[str, Any])
src/services/browser_captcha_personal.py:6357
↓ 2 callersFunction_extract_error_summary
从响应体里提取用户可读的错误摘要。
src/api/admin.py:68
↓ 2 callersMethod_extract_generate_video_with_references_result
( self, events: List[Dict[str, Any]], )
src/services/flow_client.py:2559
↓ 2 callersFunction_extract_generation_params
从请求中提取 aspectRatio 和 imageSize 参数。 优先级: 1. request.generationConfig.imageConfig (顶层 Gemini 参数) 2. extra fields 中的 generationConfig (extra
src/core/model_resolver.py:406
↓ 2 callersFunction_extract_openai_message_content
(payload: Dict[str, Any])
src/api/routes.py:555
↓ 2 callersMethod_extract_project_id_from_request_payload
(payload: Optional[Dict[str, Any]])
src/services/flow_client.py:320
↓ 2 callersFunction_extract_remote_urls_from_css
Extract absolute asset URLs referenced from a CSS source.
src/services/browser_captcha_personal.py:1172
↓ 2 callersFunction_extract_remote_urls_from_text
Extract absolute remote URLs from JavaScript/CSS text.
src/services/browser_captcha_personal.py:1159
↓ 2 callersFunction_extract_session_token
(headers: Any)
src/services/protocol_login.py:100
↓ 2 callersMethod_extract_tab_fingerprint
从 nodriver 标签页提取浏览器指纹信息。
src/services/browser_captcha_personal.py:10517
↓ 2 callersMethod_flow_call_for_token
(self, token: Token, call)
src/services/token_manager.py:117
↓ 2 callersMethod_format_runtime_client_hint_brands
(items: Iterable[Dict[str, Any]])
src/services/browser_captcha_personal.py:2807
↓ 2 callersMethod_format_status_timestamp
(timestamp_value: float)
src/services/browser_captcha_personal.py:12328
↓ 2 callersMethod_get_api_captcha_token
通用API打码服务 Args: method: 打码服务类型 project_id: 项目ID action: reCAPTCHA action类型 (IMAGE_GENERATION 或 VIDEO_GENE
src/services/flow_client.py:4738
↓ 2 callersMethod_get_browser_process_pid
(self, browser_instance)
src/services/browser_captcha_personal.py:8133
↓ 2 callersMethod_get_effective_request_user_agent
(self, account_id: Optional[str] = None)
src/services/flow_client.py:231
↓ 2 callersFunction_get_gemini_model_catalog
Collect Gemini-compatible model metadata for /models endpoints.
src/api/routes.py:118
↓ 2 callersMethod_get_pending_count
(self, token_id: int, for_image_generation: bool, for_video_generation: bool)
src/services/load_balancer.py:29
↓ 2 callersMethod_get_recaptcha_bootstrap_candidate_urls
Build the candidate bootstrap URLs for the requested reCAPTCHA script.
src/services/browser_captcha_personal.py:8548
↓ 2 callersFunction_get_recaptcha_script_cache_path
Map a bootstrap script URL to a stable local cache path.
src/services/browser_captcha_personal.py:1093
↓ 2 callersMethod_get_retry_delay_seconds
(self, error_str: str, retry_attempt: int)
src/services/flow_client.py:4130
↓ 2 callersFunction_get_set_cookies
(headers: Any)
src/services/protocol_login.py:81
↓ 2 callersMethod_get_token_direct
( self, project_id: str, action: str = "IMAGE_GENERATION", token_id: Optional[
src/services/browser_captcha_personal.py:13522
↓ 2 callersMethod_get_token_legacy
传统模式获取 reCAPTCHA token(每次创建新标签页) Args: project_id: Flow项目ID action: reCAPTCHA action类型 (IMAGE_GENERATION 或 VIDEO_GENE
src/services/browser_captcha_personal.py:11564
↓ 2 callersFunction_infer_aspect_ratio_from_images
( images: Any, *, video_mode: bool = False, )
src/core/model_resolver.py:138
↓ 2 callersMethod_infer_sec_ch_ua_from_user_agent
(self, user_agent: Optional[str])
src/services/flow_client.py:139
↓ 2 callersMethod_is_generation_policy_error
(self, error_text: str)
src/services/browser_captcha_personal.py:9601
↓ 2 callersMethod_is_google_family_cookie_host
(host: str)
src/services/browser_captcha_personal.py:6368
↓ 2 callersMethod_is_labs_bootstrap_url
(url: str)
src/services/browser_captcha_personal.py:7150
↓ 2 callersFunction_is_runtime_normal_close_error
识别 websocket 正常关闭(1000)这类预期退场。
src/services/browser_captcha_personal.py:795
↓ 2 callersFunction_is_truthy_env
判断环境变量是否为 true。
src/services/browser_captcha_personal.py:172
↓ 2 callersFunction_is_truthy_env
判断环境变量是否为 true。
src/services/browser_captcha.py:57
↓ 2 callersMethod_kill_pid
(self, pid: Optional[int], reason: str)
src/services/browser_captcha.py:955
↓ 2 callersMethod_labs_trpc_post_with_st
( self, trpc_path: str, payload: Dict[str, Any], st: str, project_id:
src/services/flow_client.py:2326
↓ 2 callersMethod_load_browser_count
从数据库加载浏览器数量配置
src/services/browser_captcha.py:2630
↓ 2 callersMethod_load_config
Load configuration from setting.toml, falling back to the example file.
src/core/config.py:35
↓ 2 callersMethod_load_recaptcha_asset_bytes
Load a static asset from local cache first, then refresh from upstream.
src/services/browser_captcha_personal.py:8587
↓ 2 callersMethod_log_stats
(self)
src/services/browser_captcha.py:2680
↓ 2 callersFunction_make_image_bytes
(size: tuple[int, int], color: str = "white")
tests/test_veo_lite_support.py:15
↓ 2 callersMethod_make_remote_object_result
(token: str)
tests/test_browser_captcha_personal.py:77
↓ 2 callersMethod_mark_at_valid
(self, token_id: int, ttl_seconds: int = 300)
src/services/token_manager.py:107
↓ 2 callersMethod_mark_fresh_profile_restart_pending
(self, *, reason: str, force: bool = False)
src/services/browser_captcha_personal.py:2072
↓ 2 callersMethod_mark_resident_slot_unavailable_locked
( self, slot_id: Optional[str], resident_info: Optional[ResidentTabInfo] = None, )
src/services/browser_captcha_personal.py:6676
↓ 2 callersMethod_mask_token
Mask token for logging (show first 6 and last 6 characters)
src/core/logger.py:46
↓ 2 callersMethod_merge_cookie_header
( existing_cookie_header: Optional[str], extra_cookies: Optional[Dict[str, Any]], )
src/services/flow_client.py:255
↓ 2 callersMethod_merge_request_fingerprint
(self, patch: Optional[Dict[str, Any]])
src/services/flow_client.py:4179
↓ 2 callersMethod_normalize_cache_error
整理缓存错误,避免将底层命令异常直接暴露给用户。
src/services/file_cache.py:264
↓ 2 callersFunction_normalize_http_base_url
(base_url: str)
src/api/admin.py:247
↓ 2 callersMethod_normalize_nodriver_evaluate_result
(self, value: Any)
src/services/browser_captcha_personal.py:2576
↓ 2 callersFunction_normalize_openai_request
( request: ChatCompletionRequest, )
src/api/routes.py:423
↓ 2 callersMethod_normalize_project_name_base
Normalize a project base name for pooled creation.
src/services/token_manager.py:54
↓ 2 callersFunction_normalize_runtime_kind
(runtime_kind: str)
src/core/browser_runtime_status.py:31
↓ 2 callersMethod_normalize_sec_ch_ua_header
( self, sec_ch_ua: Optional[str], *, user_agent: Optional[str] = None, )
src/services/flow_client.py:148
↓ 2 callersMethod_normalize_token_key
(token_id: Optional[int])
src/services/browser_captcha.py:1036
← previousnext →301–400 of 1,214, ranked by callers