Overview
MuleRouter aggregates a wide range of providers, including large language models, multimodal models, and AI tools underhttps://api.mulerun.com.
All providers are invoked via MuleRun. MuleRun optimizes routing based on provider type and invocation mode to deliver a more stable and efficient experience.
Our APIs closely align with upstream interfaces and parameters to make integration straightforward.
Providers
All providers are exposed under the/vendors path, which distinguishes services by provider.
For example, /vendors/openai serves OpenAI models, and /vendors/anthropic serves Anthropic 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.mulerun.com/v1/chat/completions is an alias of https://api.mulerun.com/vendors/openai/v1/chat/completions.
Currently available aliases:
| Alias | Source |
|---|---|
/v1/chat/completions | /vendors/openai/v1/chat/completions |
/v1/models | /vendors/openai/v1/models |
/v1/messages | /vendors/anthropic/v1/messages |
Authentication
All endpoints require authentication via an API key (token). You can create API keys in MuleRun Creator Studio. See Quick Start for details. Include theAuthorization HTTP header in each request:
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.Traceparent
In the response header, you will receive aTraceparent 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 receive400 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.