> For the complete documentation index, see [llms.txt](https://docs.distribute.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.distribute.ai/distribute-for-enterprise/enterprise-inference-api/openai-compatible-api.md).

# OpenAI Compatible API

{% hint style="info" %}
The page is currently being developed. If you experience issues, please contact our support team. Your feedback helps us improve our documentation for everyone.
{% endhint %}

The OpenAI-Compatible Inference API offers seamless drop-in replacements for OpenAI’s core endpoints, including chat completions, image generations, and more. Designed for developers familiar with the OpenAI API, it mirrors the structure, parameters, and behavior of endpoints like `/v1/chat/completions` and `/v1/images/generations`, enabling effortless integration without rewriting your codebase. This compatibility layer allows you to switch to a decentralized or self-hosted backend while maintaining full interoperability with existing OpenAI-compatible tools and SDKs.

{% content-ref url="/pages/aQKd0onGds67iVs639GL" %}
[Images](/distribute-for-enterprise/enterprise-inference-api/openai-compatible-api/images.md)
{% endcontent-ref %}

{% content-ref url="/pages/EfooG2k9jB13cAcQKNXX" %}
[Chat](/distribute-for-enterprise/enterprise-inference-api/openai-compatible-api/chat.md)
{% endcontent-ref %}

{% content-ref url="/pages/SboGHHNO115vj7lnQOG9" %}
[Audio](/distribute-for-enterprise/enterprise-inference-api/openai-compatible-api/audio.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.distribute.ai/distribute-for-enterprise/enterprise-inference-api/openai-compatible-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
