# OpenAI Compatibility

### Ollama API Compatibility

The Secret AI SDK provides full compatibility with OpenAI's API through Ollama endpoints:

#### Supported Endpoints

| Endpoint               | Support Status    | Description                           |
| ---------------------- | ----------------- | ------------------------------------- |
| `/v1/chat/completions` | ✅ Fully supported | Chat completion with streaming        |
| `/v1/completions`      | ✅ Supported       | Text completion via OpenAI-style API  |
| `/v1/models`           | ✅ Supported       | List and detail endpoints             |
| `/v1/embeddings`       | ⚠️ Available      | API compatibility in progress         |
| Tool/function calling  | ✅ Supported       | Available for select models via tools |
| `/v1/responses`        | ❌ Not supported   | Returns 404                           |


---

# Agent Instructions: 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.scrt.network/secret-network-documentation/secret-ai/sdk/setting-up-your-environment/openai-compatibility.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.
