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

# Introduction

> Introduction to the MuleRouter API

## Overview

**MuleRouter is an All In One API service for Developers.**

With MuleRouter, you can easily call APIs from multiple model providers,

**No need to register multiple accounts or manage multiple API tokens, just ONE API key is all you need.**

Whether it's a large language model, an image generation model, or an AI-powered tool, everything can be accessed and used here with ease.

Meanwhile, MuleRouter negotiates higher-tier service levels with providers through aggregated purchasing, delivering more stable and efficient service.

**Follow our [Quick Start](/docs/get-started/quickstart) guide to get started in 3 steps.**

## Providers

All providers are exposed under the `/vendors` path, which distinguishes services by provider.

For example, `/vendors/openai` serves OpenAI models, and `/vendors/google` serves Google models.

For easier discovery, this documentation groups endpoints by practical use cases. Choose the category that best fits your needs.

## Endpoints

For most providers, we offer the same endpoints as upstream to simplify integration.

For instance, `/vendors/openai/v1/chat/completions` exposes OpenAI’s `v1/chat/completions` endpoint.

### Alias

For convenience and compatibility, we provide a small number of widely used industry aliases.

For example, `https://api.mulerouter.ai/v1/chat/completions` is an alias of `https://api.mulerouter.ai/vendors/openai/v1/chat/completions`.

Currently available aliases:

| Alias                  | Source                                |
| :--------------------- | :------------------------------------ |
| `/v1/chat/completions` | `/vendors/openai/v1/chat/completions` |
| `/v1/models`           | `/vendors/openai/v1/models`           |

## Authentication

All endpoints require authentication via an API key (token).

You can create API keys in MuleRouter Console. See [Quick Start](/docs/get-started/quickstart) for details.

Include the `Authorization` HTTP header in each request:

```
Authorization: Bearer <API Key>
```

In a cURL request, the header looks like this:

```shell lines highlight={3} theme={null}
curl https://api.mulerouter.ai/v1/chat/completions  \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <Your API Token>" \
```

## Requests and responses

### Requests

For most synchronous and streaming endpoints, you can simply switch the endpoint base URL with minimal or no changes to your code or workflow.

Our request and response schemas closely follow the upstream providers.

### Responses

#### Asynchronous tasks

For longer-running jobs, we execute via an asynchronous task system. After submitting a task, you receive a task ID that you can use to query status and retrieve results.

For more details, see [Asynchronous Tasks](/docs/get-started/async-tasks).

#### Traceparent

In the response header, you will receive a `Traceparent` header, this header is used to trace the request and response.

If you encounter any issues with your request, please include the Traceparent ID when submitting a bug report to help us resolve the problem as quickly as possible.

## Error handling

Errors are reflected in the returned HTTP status code.

For example, if your request contains invalid parameters, you will receive `400 Bad Request`.

The response body includes a JSON object compliant with RFC 9457, containing a MuleRouter error code and message.

For more information, see [Error Codes](/docs/get-started/error-codes).
