The Ikabot API is a RESTful service built with FastAPI, designed to enhance Ikabot's capabilities across various scenarios.
Effortlessly handle login captchas with automatic resolution.
Automatically resolve captchas associated with piracy-related actions.
Generate Blackbox tokens for streamlined authentication.
The Ikabot API is hosted and publicly accessible. No installation is required; refer to the Wiki for details on available endpoints and their usage.
When self-hosting locally:
- Swagger UI →
http://localhost:5000/docs(development) orhttp://localhost:5005/docs(production-like) - ReDoc →
http://localhost:5000/redoc/http://localhost:5005/redoc
- Docker installed on your Linux server.
You can launch the API using one of the following methods, depending on whether you want to use Nginx or an existing reverse proxy.
docker-compose up -d --build- Default port: 80 (configurable in
/nginx/app.conf).
docker build -t ikabotapi .
docker run -d -p 5005:5005 ikabotapiNeed a different host port?
docker run -d -p 8000:5005 ikabotapi- Python 3.10
- Poetry
- Playwright (browsers required at runtime)
git clone <repo_url>
cd ikabotapi
# Install all dependencies (main + dev groups from pyproject.toml)
poetry install
# Install Playwright browsers (Chromium)
# On Linux: --with-deps is recommended; on macOS/Windows, omit if not needed
poetry run playwright install --with-deps chromiumpoetry run uvicorn main:app --reload --host 0.0.0.0 --port 5000- API:
http://localhost:5000 - Docs:
http://localhost:5000/docs
poetry run uvicorn main:app --host 0.0.0.0 --port 5005 --workers 1 --access-log --log-level infoTest dependencies are already declared under [tool.poetry.group.dev.dependencies] in pyproject.toml.
Run the test suite:
poetry run pytest testsThe API can be configured with environment variables.
You can enable logging to a Discord channel by setting the LOGS_WEBHOOK_URL environment variable.
Example .env.example:
# The Webhook URL of a Discord channel for logs (optional)
LOGS_WEBHOOK_URL=Options to set it:
-
Create a local
.envfile (loaded automatically bypython-dotenv). -
Or pass it as an environment variable in Docker:
docker run -d -p 5005:5005 -e LOGS_WEBHOOK_URL="https://discord.com/api/webhooks/xxxx" ikabotapi
-
Open Swagger UI:
- Dev mode → http://localhost:5000/docs
- Prod mode → http://localhost:5005/docs
-
Or test an endpoint with
curl(replace<path>with one of your endpoints):
curl -X GET "http://localhost:5000/<path>" -H "accept: application/json"