Skip to Content
API AccessChat Completions

Chat completions

POST /v1/chat/completions Content-Type: application/json Authorization: Bearer sk-steinkauz-live-...

Request and response bodies follow the OpenAI Chat Completions API  for supported fields. For parameter reference, streaming behavior, and response structure, see the OpenAI documentation:

Steinkauz supports a subset of OpenAI fields. Unsupported parameters return 400 invalid_request_error.

Non-streaming

curl -sS "$STEINKAUZ_BASE_URL/v1/chat/completions" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $STEINKAUZ_API_KEY" \ -d '{ "model": "steinkauz-gateway/openai/gpt-5.5", "messages": [{ "role": "user", "content": "Hello 👋" }] }'

Streaming

Set "stream": true. The response is text/event-stream with chat.completion.chunk objects, ending with data: [DONE]. See OpenAI streaming  for the event format.

curl -sS -N "$STEINKAUZ_BASE_URL/v1/chat/completions" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $STEINKAUZ_API_KEY" \ -d '{ "model": "steinkauz-gateway/openai/gpt-5.5", "messages": [{ "role": "user", "content": "Hello 👋" }], "stream": true }'

Tools

Function tools and tool_choice are supported where the underlying model and provider allow them. Behavior is consistent with the web chat.

OpenAI SDK (Python)

from openai import OpenAI client = OpenAI( api_key="sk-steinkauz-live-YOUR_SECRET", base_url="https://chat.steinkauz.ai/v1", ) completion = client.chat.completions.create( model="steinkauz-gateway/openai/gpt-5.5", messages=[{"role": "user", "content": "Hello 👋"}], ) print(completion.choices[0].message.content)

OpenAI SDK (JavaScript)

import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.STEINKAUZ_API_KEY, baseURL: "https://chat.steinkauz.ai/v1", }); const completion = await client.chat.completions.create({ model: "steinkauz-gateway/openai/gpt-5.5", messages: [{ role: "user", content: "Hello 👋" }], }); console.log(completion.choices[0]?.message?.content);

Usage tracking

Successful completions create activity records for your active context, attributed to the API key used. Open Usage & Activity to view them alongside chat activity. You can filter by source (API), inspect model and provider, token counts, cost, duration, tool calls where applicable, and the API key label.

On Gateway plans, usage counts toward your Budgets for the active subject (Individual System Gateway Budget, or the organization member / dedicated key Budget). On BYOK plans, usage is recorded for reference while you are billed by your providers directly; optional BYOK Budgets apply when configured. See Usage Budgets and Usage, costs, and activity details.

Last updated on