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

# OpenAI-Compatible Providers

> Configure OpenAI-compatible providers that support the /responses API.

Use `provider ... from openai` for OpenAI-compatible HTTP APIs.

The provider endpoint must support the `/responses` API.

```wire theme={"languages":{"custom":["/languages/wire.tmLanguage.json"]}}
secrets {
    api_key: string
}

provider llm from openai {
    endpoint: "https://api.openai.com/v1"
    api_key: secrets.api_key
}

model fast from llm {
    id: "gpt-4.1-mini"
}
```

For an OpenAI-compatible gateway, change the endpoint and model ID.

```wire theme={"languages":{"custom":["/languages/wire.tmLanguage.json"]}}
provider llm from openai {
    endpoint: "https://dashscope.aliyuncs.com/compatible-mode/v1"
    api_key: secrets.api_key
}

model fast from llm {
    id: "qwen3.6-plus"
}
```

Agents use the named model profile.

```wire theme={"languages":{"custom":["/languages/wire.tmLanguage.json"]}}
agent reply {
    model: model.fast
    instruction: "Reply to {{ input.message }}."

    output {
        message: string
    }
}
```
