> ## 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.

# Overview

> A quick map of every endpoint in the Routeway API.

The Routeway API is fully OpenAI-compatible. Any SDK or tool that works against `api.openai.com` works against `api.routeway.ai` with only a base URL and key change.

<Info>
  All requests must include an `Authorization: Bearer <key>` header. Obtain your key from the [Dashboard](https://routeway.ai/dashboard/keys).
</Info>

```
Base URL: https://api.routeway.ai
```

***

## Endpoints

### Inference

| Method                           | Path                                                                  | Description                                                                           |
| -------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| <Badge color="blue">POST</Badge> | [/v1/chat/completions](/api-reference/ChatCompletions/completions)    | Text and vision completions — the recommended default for apps, agents, and pipelines |
| <Badge color="blue">POST</Badge> | [/v1/images/generations](/api-reference/ImageGenerations/generations) | Generate images from a text prompt                                                    |
| <Badge color="blue">POST</Badge> | [/v1/images/edits](/api-reference/ImageEdits/edits)                   | Edit an existing image with a text prompt and optional mask                           |

### Account & Keys

| Method                              | Path                                                       | Description                          |
| ----------------------------------- | ---------------------------------------------------------- | ------------------------------------ |
| <Badge color="green">GET</Badge>    | [/v1/account/balance](/api-reference/Account/balance)      | Retrieve your current credit balance |
| <Badge color="green">GET</Badge>    | [/v1/account/activity](/api-reference/Account/activity)    | Paginated log of usage events        |
| <Badge color="green">GET</Badge>    | [/v1/account/analytics](/api-reference/Account/analytics)  | Aggregated usage analytics           |
| <Badge color="green">GET</Badge>    | [/v1/account/keys](/api-reference/Account/keys-list)       | List all API keys on your account    |
| <Badge color="blue">POST</Badge>    | [/v1/account/keys](/api-reference/Account/keys-create)     | Create a new API key                 |
| <Badge color="green">GET</Badge>    | [/v1/account/keys/:id](/api-reference/Account/keys-get)    | Retrieve a single API key            |
| <Badge color="orange">PATCH</Badge> | [/v1/account/keys/:id](/api-reference/Account/keys-update) | Update an API key                    |
| <Badge color="red">DELETE</Badge>   | [/v1/account/keys/:id](/api-reference/Account/keys-delete) | Delete an API key                    |

***

## Authentication

All endpoints (except a public status check) require a bearer token:

```bash theme={null}
Authorization: Bearer YOUR_ROUTEWAY_API_KEY
```

Keys can be scoped and rate-limited — see [Authentication](/getting-started/authentication) for details.

***

## OpenAI Compatibility

Drop in your existing OpenAI SDK code by changing two values:

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(
        base_url="https://api.routeway.ai/v1",  # changed
        api_key="YOUR_ROUTEWAY_API_KEY",         # changed
    )
    ```
  </Tab>

  <Tab title="Node.js">
    ```javascript theme={null}
    import OpenAI from "openai";

    const client = new OpenAI({
      baseURL: "https://api.routeway.ai/v1",  // changed
      apiKey: process.env.ROUTEWAY_API_KEY,   // changed
    });
    ```
  </Tab>
</Tabs>

Everything else — request shapes, response objects, streaming, tool calls, structured outputs — stays identical.
