# Supported specifications

Redoc CE renders API reference documentation from OpenAPI, AsyncAPI, and GraphQL descriptions, and documents MCP servers described in an OpenAPI file.
One renderer handles all of them.
The same script, element, component, Docker image, and CLI command work for every specification.
All supported specifications accept the [configuration options](/docs/redoc/v3.x/config) in the same way.

Redoc CE detects the specification type from the description file you point it at, and renders one description per page.

## Specifications and versions

| Specification | Versions | What Redoc CE renders |
| --- | --- | --- |
| OpenAPI | 3.2, 3.1, 3.0 | An overview page, operations grouped by tag, webhooks, and schema pages. |
| Swagger | 2.0 | Converted to OpenAPI 3 when the description loads, then rendered like an OpenAPI 3 description. |
| AsyncAPI | 3.x, 2.x | An overview page with the servers, channels, and operations with their messages. |
| GraphQL | Schema definition language (SDL) | An overview page, queries, mutations, subscriptions, and the objects, inputs, enums, interfaces, unions, scalars, and directives of the schema. Introspection JSON is not supported. |
| MCP | Servers described with the [`x-mcp`](/docs/realm/content/api-docs/openapi-extensions/x-mcp) extension | The MCP servers and tools declared at the root of an OpenAPI description, with connect buttons on the overview page. MCP is not a separate input: it is documented inside an OpenAPI description. |

## Specification detection

Redoc CE always detects the specification type from the description.
There is no setting for it.
The rules apply in this order:

1. A URL that ends in `.graphql` or `.gql` is fetched as a GraphQL schema.
2. Any other URL is loaded and bundled.
  A document with an `asyncapi` field is AsyncAPI, and every other document is OpenAPI.
  A document with a `swagger` field is converted to OpenAPI 3.
3. A URL that does not load as OpenAPI or AsyncAPI is fetched again as a GraphQL schema.
  A schema served from an API endpoint therefore works without a file extension.
4. A string is parsed as a JSON description when it is JSON, and read as a GraphQL schema in SDL otherwise.
5. An object follows the same `asyncapi` and `swagger` rules as a loaded document.

GraphQL introspection results are not accepted.
Redoc CE stops with an error that asks for the schema in SDL.

## One description per page

Redoc CE renders a single description at a time.
A page cannot combine an OpenAPI description with an AsyncAPI description or a GraphQL schema.
To document several APIs, or the same API in several specifications, create one page per description and link the pages from your site navigation.
In a React application, render one `RedocStandalone` per route.

## Point each deployment method at a description

| Method | Description source |
| --- | --- |
| [HTML element](/docs/redoc/v3.x/deployment/html) | `spec-url` attribute with a URL or path |
| [`init` function](/docs/redoc/v3.x/deployment/html#the-init-function) | First argument: a URL, a parsed description object, a JSON string, or a GraphQL schema in SDL |
| [React component](/docs/redoc/v3.x/deployment/react) | `specUrl` prop for a URL, or `spec` prop for a parsed object, a JSON string, or a GraphQL schema in SDL |
| [Docker image](/docs/redoc/v3.x/deployment/docker) | `SPEC_URL` environment variable |
| [Redocly CLI](/docs/redoc/v3.x/deployment/cli) | Path or URL of the description passed to `build-docs` |

## Sample descriptions

The [deployment guide](/docs/redoc/v3.x/deployment/intro#api-description) lists sample descriptions for every specification, including Swagger 2.0 files.

## Options per specification

The standalone options such as `router`, `basePath`, and `disableTelemetry` apply to every specification.
The [OpenAPI options](/docs/redoc/v3.x/config#openapi-options) apply to OpenAPI descriptions, and the [AsyncAPI options](/docs/redoc/v3.x/config#asyncapi-options) and [GraphQL options](/docs/redoc/v3.x/config#graphql-options) apply to their specification only.
[Specification extensions](/docs/redoc/v3.x/redoc-vendor-extensions) such as `x-logo` and `x-tagGroups` are read from OpenAPI and AsyncAPI descriptions.
GraphQL schemas have no extension mechanism.
The overview metadata comes from the [`info`](/docs/realm/config/graphql/info) option.

## Resources

- **[Redoc CE quickstart](/docs/redoc/v3.x/quickstart)** - Render a description of any supported specification in one HTML file
- **[Configure Redoc CE](/docs/redoc/v3.x/config)** - Every option, including the AsyncAPI and GraphQL sections
- **[Redoc CE specification extensions](/docs/redoc/v3.x/redoc-vendor-extensions)** - The `x-` fields Redoc CE reads from OpenAPI and AsyncAPI descriptions
- **[OpenAPI extension `x-mcp`](/docs/realm/content/api-docs/openapi-extensions/x-mcp)** - Document MCP servers and tools inside an OpenAPI description
