Skip to content

SubQ developer documentation

Explore API endpoints, authentication, and examples for calling SubQ from your application.
Context12M

context for large codebases, long documents, and agent state in one request.

Speed150

tokens per second for interactive long-context products and agents.

Cost1/5

the cost of other leading LLMs for long-context inference.

Drop-in API

Keep the OpenAI SDK. Change the base URL.

Use the same Chat Completions request shape your app already sends, then call the SubQ API.

POST/v1/chat/completions
import OpenAI from "openai";

const client = new OpenAI({
apiKey: process.env.SUBQ_API_KEY,
baseURL: "https://api.subq.ai/v1",
});

const completion = await client.chat.completions.create({
model: "subq-preview",
messages: [{ role: "user", content: "Hello World" }],
stream: true,
});
01Start with the API shape

Base URL, compatibility boundaries, and how SubQ fits into an existing Chat Completions integration.

02Authenticate securely

Create an API key, send it as a bearer token, and keep credentials out of source control.

03Create chat completions

Supported fields, message formats, response shapes, streaming, and generated snippets.

Authenticating...