> ## Documentation Index
> Fetch the complete documentation index at: https://docs.routeway.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenHands

> Use OpenHands autonomous agent with Routeway's OpenAI-compatible API.

OpenHands is an autonomous AI coding agent. You can connect it to Routeway by adding a custom LLM endpoint that points to Routeway's OpenAI-compatible API.

<Note>
  Requires a valid Routeway API key. Get yours from the [dashboard](https://routeway.ai/dashboard/api-keys).
</Note>

***

## Setup

<Steps>
  <Step title="Open OpenHands LLM settings">
    In OpenHands, add a new **LLM Endpoint** and toggle **Advanced** to reveal all fields.
  </Step>

  <Step title="Configure the endpoint">
    Fill in the following:

    | Field            | Value                                     |
    | ---------------- | ----------------------------------------- |
    | **Custom Model** | `openai/MODEL_ID` (e.g. `openai/gpt-4.1`) |
    | **Base URL**     | `https://api.routeway.ai/v1`              |
    | **API Key**      | Your Routeway API key                     |
    | **Agent**        | `CodeActAgent` (recommended)              |

    <Warning>
      The Base URL must **not** end with a trailing `/`. Use `https://api.routeway.ai/v1` exactly.
    </Warning>
  </Step>

  <Step title="Model naming">
    Prefix the model with `openai/` and use the exact model ID from [routeway.ai/models](https://routeway.ai/models):

    * `openai/gpt-4.1`
    * `openai/claude-sonnet-4.5`
    * `openai/gemini-2.5-flash`
  </Step>

  <Step title="Start using OpenHands">
    Save the configuration and start a new session. OpenHands will route requests through Routeway.
  </Step>
</Steps>

***

## Reference

| Setting           | Value                                            |
| ----------------- | ------------------------------------------------ |
| Base URL          | `https://api.routeway.ai/v1` (no trailing slash) |
| Model prefix      | `openai/`                                        |
| Recommended agent | `CodeActAgent`                                   |

***

## Example Prompts

* *"Set up a basic Express.js server with health check endpoint."*
* *"Find and fix the bug causing test failures in the auth module."*
* *"Refactor this class to use dependency injection."*
