# OpenAI-compatible endpoints

> Connect any endpoint that speaks the OpenAI Chat Completions API: hosted routers and inference services, or your own server.

Source: https://shopassist.coec.dk/docs/ai/openai-compatible · Updated 2026-10-01

Many services and self-hosted servers expose the OpenAI Chat Completions API. ShopAssist can use them if the model supports **tool calling**.

## Presets [#presets]

| Preset               | Base URL                         | Guide                             |
| -------------------- | -------------------------------- | --------------------------------- |
| OpenRouter           | `https://openrouter.ai/api/v1`   | [OpenRouter](/docs/ai/openrouter) |
| Groq                 | `https://api.groq.com/openai/v1` | [Groq](/docs/ai/groq)             |
| Together             | `https://api.together.xyz/v1`    | [Together](/docs/ai/together)     |
| Ollama (cloud)       | `https://ollama.com/v1`          | [Ollama](/docs/ai/ollama)         |
| Ollama (self-hosted) | Your public HTTPS URL            | [Ollama](/docs/ai/ollama)         |
| vLLM                 | Your public HTTPS URL            | [vLLM](/docs/ai/vllm)             |
| LM Studio            | Your public HTTPS URL            | [LM Studio](/docs/ai/lm-studio)   |
| Custom               | Your public HTTPS URL            | below                             |

## Fields [#fields]

| Field                     | Notes                                                                                               |
| ------------------------- | --------------------------------------------------------------------------------------------------- |
| Base URL                  | Fixed for hosted presets; for your own server: HTTPS on port 443, a public address, no query string |
| API key                   | Sent as `Authorization: Bearer …`                                                                   |
| Extra headers (optional)  | Up to 3 headers for an access proxy, for example Cloudflare Access service tokens                   |
| Model                     | Any model id the endpoint serves (up to 128 characters)                                             |
| Context window (optional) | The model's context size, if the endpoint doesn't report it                                         |

## Self-hosted endpoints [#self-hosted]

ShopAssist calls your endpoint from its [egress IPs](/docs/security/egress-ips). The endpoint must be reachable over public HTTPS with authentication; private addresses, plain HTTP and non-standard ports are refused (`endpoint_blocked`). Put the server behind a reverse proxy with TLS and an API key or access proxy.

Self-hosted endpoints run the extra **context** check: a fact at the start of an 8,000-token prompt must be recalled. Many servers truncate long prompts by default (`context_too_small`).

## Models [#models]

Any model your endpoint serves that supports tool calling.

## Data location [#data-location]

> **Data location:** Data goes wherever this endpoint runs. Self-hosted endpoints must be reachable over HTTPS with authentication.

## Connection test [#probe]

| Check | Required | What it tests | On failure |
| --- | --- | --- | --- |
| `auth` | Yes | The key is accepted (lists models or sends a tiny request) | `auth_failed`, `insufficient_quota`, `gemini_free_tier`, `endpoint_blocked`, `provider_unavailable`, `model_not_found` |
| `tools` | Yes | The model calls a tool with valid arguments and continues after the result | `tools_unsupported`: the model can't run the shopping tools |
| `ttft` | No (degraded) | The first answer event arrives within 8 seconds | `ttft_slow`: works, but shoppers wait |
| `parallel_tools` | No | Two tools are called in one step | `parallel_tools_unsupported`: slightly slower answers |
| `vision` | No | The model names the colour of a test image | `vision_unsupported`: visual search is off |
| `context` | Self-hosted only | A fact at the start of an 8,000-token prompt is recalled | `context_too_small`: the endpoint truncates prompts |
