Coding Tools
OpenHands
Connect OpenHands to TokenLab
Overview
Use this page for the OpenHands UI with LiteLLM-backed Settings → LLM → Advanced options. Select OpenAI and enter a custom model with the openai/ prefix, a TokenLab key in the local API-key field, and the Base URL below. Record the previous selection first and restore it when finished. Keep existing accounts and tool permissions. See the official OpenAI-compatible configuration. CLI, cloud and source-checkout installations can use different setup flows; follow the instructions for your installed edition. make setup-config is not a general installed-CLI command.
Model Settings
Save the current provider, model and connection settings locally before editing. These controls change the active model selection; restore your previous values when finished. Keep signed-in accounts and tool permissions unchanged. Do not overwrite another OpenAI-compatible connection without a restorable backup.
Custom Model: openai/claude-sonnet-5-5
Base URL: https://api.tokenlab.sh/v1Saving settings or listing models does not verify a key or a completed request. A prompt uses TokenLab balance. Check the reply and its matching request record before trying tools; auxiliary requests may also be billed.
Reply only with TOKENLAB_CONNECTION_OK. Do not use tools or modify files.Generate images and video in the same agent
OpenHands can also create images and short videos with the TokenLab MCP server. Each generation is paid from the same TokenLab balance. Open Customize → MCP Servers → Add custom server and enter:
| Field | Value |
|---|---|
| Name | tokenlab |
| Server Type | STDIO |
| Command | npx |
| Command Arguments | -y and @tokenlabai/mcp-server@0.6.48, one per line |
| Environment Variables | TOKENLAB_MCP_TOOL_PROFILE=core and TOKENLAB_API_KEY= followed by your key, one per line |
Use Test connection to check that the tools load. The server is available in new conversations. Then try:
Call get_model_pricing for nano-banana-2, then use create_image with nano-banana-2 at 1k to make a photo of a matte black coffee mug on a white desk.create_video returns a task ID. The agent calls get_task_status until the video is ready. See OpenHands MCP settings for other settings.