metadata
title: GeeTest4 Solver API
emoji: π
colorFrom: blue
colorTo: purple
sdk: docker
sdk_version: 5.43.1
app_file: hf-geetest4-app.py
pinned: false
license: mit
GeeTest4 Solver API
Pure FastAPI service for solving GeeTest4 captchas. 100% API endpoint without any UI dependencies.
π Features
- Pure FastAPI: No Gradio, no UI, just API endpoints
- ONNX Model: AI-powered object detection
- CV Fallback: Computer Vision fallback for reliability
- API Key Authentication: Secure access control
- Hidden Service: Root endpoint returns 404 for security
π‘ API Endpoints
POST /api/predict
Main endpoint for solving GeeTest4 captchas.
Request:
{
"data": ["base64_image_data", "API_KEY"]
}
Response:
{
"data": ["β
Success! Target at x=200 (Model: CV)", 200, 0.75]
}
GET /health
Health check endpoint.
Response:
{
"status": "healthy",
"model_loaded": true
}
GET /
Returns 404 (hidden service).
π§ Configuration
- API Key: Set via
GEETEST4_API_KEYenvironment variable (default:ADMINCKV005) - Port: Set via
PORTenvironment variable (default:7860)
π³ Docker Deployment
This Space uses Docker for deployment:
FROM python:3.10-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 7860
CMD ["python", "app.py"]
π¦ Dependencies
fastapi==0.104.1uvicorn[standard]==0.24.0pydantic==2.5.0numpy==1.24.3opencv-python==4.8.1.78Pillow==10.1.0PyYAML==6.0.1onnxruntime-cpu==1.15.1
π Security
- API key authentication required
- No UI exposed
- Root endpoint hidden (404)
- Non-root user in Docker container
π― Usage Example
curl -X POST https://your-space-name.hf.space/api/predict \
-H "Content-Type: application/json" \
-d '{"data": ["base64_image", "ADMINCKV005"]}'
π Performance
- Startup Time: ~10-15 seconds
- Response Time: ~100-500ms per request
- Memory Usage: ~200-300MB
- CPU: Optimized for Hugging Face CPU Basic
π οΈ Development
For local development:
pip install -r requirements.txt
python app.py
Then test with:
curl -X POST http://localhost:7860/api/predict \
-H "Content-Type: application/json" \
-d '{"data": ["test", "ADMINCKV005"]}'