> For the complete documentation index, see [llms.txt](https://seekspeed.gitbook.io/seekspeed-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://seekspeed.gitbook.io/seekspeed-docs/connectors/openai-compatible.md).

# OpenAI-Compatible Endpoints

SeekSpeed Terminal speaks one wire format: the OpenAI `/v1/chat/completions` HTTP surface. Any endpoint that implements it — first-party OpenAI, Anthropic via a translation proxy, vLLM, TGI, SGLang, llama.cpp's server, Groq, Together, Fireworks, OpenRouter, Azure OpenAI, or a custom DeepSpec-fronted gateway — works without code changes.

## Request shape

```http
POST {baseUrl}/chat/completions
Authorization: Bearer {apiKey}
Content-Type: application/json

{
  "model": "deepseek-ai/DeepSeek-V3",
  "messages": [
    { "role": "system",  "content": "You are a senior engineer. Be terse." },
    { "role": "user",    "content": "Explain rope embeddings." }
  ],
  "max_tokens": 512,
  "temperature": 0,
  "stream": true
}
```

## Why `stream: true` matters

Without streaming, you cannot measure true TTFT — only `request_send → final_byte_received`. With streaming enabled, SeekSpeed reads the SSE chunks and records the moment the first delta token arrives. For voice and interactive agents that's the metric that maps to "feels fast".

## Self-hosted endpoints

For self-hosted vLLM serving DeepSeek-V3 with DSpark speculative decoding:

```bash
python -m vllm.entrypoints.openai.api_server \
  --model deepseek-ai/DeepSeek-V3 \
  --speculative-model deepseek-ai/DeepSeek-V3-Draft \
  --num-speculative-tokens 5 \
  --tensor-parallel-size 8 \
  --port 8000
```

Then add it as a connector with base URL `http://your-host:8000/v1`. The Spec Lab adapter will auto-discover the spec-decode metrics at `/metrics`.


---

# 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, and the optional `goal` query parameter:

```
GET https://seekspeed.gitbook.io/seekspeed-docs/connectors/openai-compatible.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
