Skip to content
SingularSingular

Connect SDKs and compatible clients

Connect tools that let you set an OpenAI-compatible base URL and use Chat Completions.

On this page

Required settings

  • Base URL: https://api.impossi.build/v1
  • API key: your mr_... Singular API key
  • API style: OpenAI Chat Completions
  • Model: auto or an exact live Singular model ID

Environment variables

Many OpenAI SDK-based tools honor these values:

bash
export OPENAI_BASE_URL="https://api.impossi.build/v1"
export OPENAI_API_KEY="$SINGULAR_API_KEY"

Prefer a tool's explicit custom-base-URL setting when it has one. Environment-variable names vary across clients.

OpenAI JavaScript SDK

javascript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.SINGULAR_API_KEY,
  baseURL: process.env.OPENAI_BASE_URL,
});

const completion = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Hello from Singular." }],
});

console.log(completion.choices[0]?.message?.content);

OpenAI Python SDK

python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["SINGULAR_API_KEY"],
    base_url=os.environ["OPENAI_BASE_URL"],
)

completion = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Hello from Singular."}],
)
print(completion.choices[0].message.content)

OpenWebUI and chat frontends

Create an OpenAI connection and set the API base to the Singular base URL. If the client insists on populating its model picker from GET /v1/models, add auto or an exact model ID manually because non-admin Singular API keys intentionally see an opaque model list.

n8n and automation tools

Use an OpenAI Chat Model or OpenAI-compatible credential that supports a custom base URL. Set the node's model field explicitly. Avoid nodes that require the Responses API, Files API, Batch API, or Assistants API.

Coding clients

A client is a good fit when it can:

  1. Use Chat Completions instead of requiring Responses.
  2. Override the OpenAI base URL.
  3. Accept a custom model ID.
  4. Tolerate the Singular error envelope and opaque /v1/models result.

Do not assume that a tool described as 'OpenAI compatible' only uses Chat Completions. Some modern agents require Responses, Files, Realtime, or vendor-specific endpoints and will not work against the stable Singular surface.

Anthropic SDK clients

Do not point an Anthropic SDK at the complete routed catalog. Native /v1/messages support is provider-specific, while the current NanoGPT/AIsa-backed pool uses an OpenAI-compatible wire. Use the OpenAI client and Chat Completions for Claude-family models in Singular.

Integration acceptance test

Before adopting a client, verify one non-streaming request, one streaming request, a 401, a 429 or mocked retry, model selection, cancellation, and any tool/structured-output feature the client requires.

Updated 2026-08-10. Live model availability, rates, account state, and payment rails remain request-time data.