Requix One API

OpenAI-compatible engine · model requix-one-pro
Admin panel

Quick start

Requix One speaks the OpenAI Chat Completions API. Use any OpenAI SDK and change three things: the base URL, the API key and the model.

Base URLhttps://one.requixpro.com/v1
Modelrequix-one-pro
Auth headerAuthorization: Bearer rqx1_… (keys are issued in the admin panel)

curl

curl https://one.requixpro.com/v1/chat/completions \
  -H "Authorization: Bearer $REQUIX_ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "requix-one-pro",
       "messages": [{"role": "user", "content": "Do you have white interior paint?"}]}'

Python

from openai import OpenAI   # pip install openai
import os

client = OpenAI(base_url="https://one.requixpro.com/v1",
                api_key=os.environ["REQUIX_ONE_API_KEY"],
                timeout=960)          # allow for cold starts, see below

reply = client.chat.completions.create(
    model="requix-one-pro",
    messages=[{"role": "system", "content": "You are the shopping assistant for STO."},
              {"role": "user", "content": "Do you have white interior paint?"}],
)
print(reply.choices[0].message.content)

JavaScript / TypeScript

import OpenAI from "openai";   // npm i openai

const client = new OpenAI({
  baseURL: "https://one.requixpro.com/v1",
  apiKey: process.env.REQUIX_ONE_API_KEY,
  timeout: 960_000,
});

const reply = await client.chat.completions.create({
  model: "requix-one-pro",
  messages: [{ role: "user", content: "Do you have white interior paint?" }],
});
console.log(reply.choices[0].message.content);

Authentication

Every request needs Authorization: Bearer rqx1_…. Keys are created in the admin panel, one per app or person, and each has its own rate limit, monthly token quota and allowed models. A key is shown once when it's created. Keep it in the app's secret settings (environment variable or secrets manager), never in source code, the browser or chat. A revoked key stops working immediately.

Call the API from your server only. Never put a key in a website or mobile app, where anyone can read it.

GET/v1/models

The models your key may use.

{"object": "list", "data": [{"id": "requix-one-pro", "object": "model", "owned_by": "requix"}]}

POST/v1/chat/completions

FieldTypeNotes
modelstringRequired. requix-one-pro
messagesarrayRequired. Roles system, user, assistant, tool, as in OpenAI.
toolsarrayOptional. OpenAI function-tool format. See Tool calling.
tool_choicestring/objectOptional. auto (default), none, or a specific function.
temperaturenumberOptional, 0–2. Use 0.2–0.5 for shop assistants.
max_tokensintegerOptional. Cap on reply length.
streambooleanOptional. Server-sent events; see Streaming.
top_p, stop, seedOptional, standard OpenAI meaning.

The context window is 16,384 tokens (prompt plus reply). Requix One has no "thinking" mode: the engine turns it off, because the model is trained to answer directly.

Response

{"id": "chatcmpl-…", "object": "chat.completion", "model": "requix-one-pro",
 "choices": [{"index": 0, "finish_reason": "stop",
              "message": {"role": "assistant", "content": "Yes — we have …", "tool_calls": null}}],
 "usage": {"prompt_tokens": 2517, "completion_tokens": 71, "total_tokens": 2588}}

Tool calling

Requix One is trained on Requix's own tools (search_products, get_product_details, add_to_cart, get_cart, search_paint_colors, search_external_data, track_order, create_order) and follows the standard OpenAI tool flow:

  1. Send tools with the request.
  2. If the reply has tool_calls, run each one in your app.
  3. Append the assistant message, then one role: "tool" message per call with the matching tool_call_id.
  4. Call again. Repeat until a reply has no tool_calls. The model often makes several calls at once (catalog plus brand site) and may call again after seeing results.
messages = [{"role": "system", "content": SYSTEM_PROMPT}, {"role": "user", "content": question}]
for _ in range(6):                                   # safety cap on rounds
    msg = client.chat.completions.create(model="requix-one-pro", messages=messages,
                                         tools=REQUIX_TOOLS).choices[0].message
    if not msg.tool_calls:
        break                                        # final answer in msg.content
    messages.append(msg.model_dump(exclude_none=True))
    for call in msg.tool_calls:
        result = run_tool(call.function.name, json.loads(call.function.arguments))
        messages.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(result)})
print(msg.content)

Tool definitions use the OpenAI shape: {"type": "function", "function": {"name", "description", "parameters"}}. Requix's Anthropic-style definitions convert one-to-one (input_schemaparameters).

Streaming

Set "stream": true to get tokens as they're generated (server-sent events, data: {…} lines, ending with data: [DONE]), the same as OpenAI. SDKs handle this for you:

for chunk in client.chat.completions.create(model="requix-one-pro", messages=messages, stream=True):
    print(chunk.choices[0].delta.content or "", end="", flush=True) if chunk.choices else None

Errors

Errors use the OpenAI shape {"error": {"message": "…", "type": "requix_one_error", "code": "…"}}.

HTTPcodeMeaning / what to do
400invalid_jsonBody isn't valid JSON.
401missing_api_key, invalid_api_keyNo key, wrong key, or revoked key.
403model_not_allowedThis key may not use that model.
404model_not_foundUnknown model name.
429rate_limitedToo many requests this minute for this key. Wait and retry.
429quota_exceededMonthly token quota used up. Ask an admin to raise it.
502 / 504upstream_invalid, upstream_timeoutThe engine didn't answer in time (usually a slow cold start). Retry once.

Limits & quotas

Each key has a requests-per-minute limit (default 60) and an optional monthly token quota, both set in the admin panel. Tokens are counted from usage (prompt plus completion). Usage is logged per key (model, token counts, latency, status) for the admin dashboard. Message content is never stored.

Cold starts & timeouts

To keep costs near zero when nobody is chatting, the GPU scales to zero after about 2 minutes idle. The first request after that waits while a GPU starts and loads the model: up to about 15 minutes. After that, replies take a few seconds while traffic continues.

  • Set client timeouts to at least 960 seconds, and retry once on 502/504.
  • Admins can press Warm up now before expected traffic, or turn on Warm mode (one GPU always on, no cold starts, billed continuously).
  • For customer-facing chat, run Requix One in shadow mode (alongside the current model, not in front of customers) until warm mode is on.

Good practice

  • One key per app or environment (requix-backend-prod, requix-staging) so you can revoke one without breaking the others.
  • Send the same system prompt and tools Requix uses in production; the model was trained on them.
  • Scrub customer personal data you don't need before sending it.
  • Check finish_reason: length means the reply hit max_tokens.