Skip to content

Compatibility / not equivalence

OpenAI-compatible API: the supported surface, exactly

Migrate an inference client to BrokenGPT with an explicit compatibility matrix for chat, tools, structured output, Responses, batches, streaming, errors, and limits.

UPDATED 18 Jul 20269 MIN READTECHNICAL GUIDE
01

Compatible means shared syntax—not identical products.

BrokenGPT accepts focused subsets of the familiar chat-completions and Responses request shapes. That can reduce integration work for clients already built around model, messages, function tools, structured output, sampling controls, and streaming. It does not mean BrokenGPT serves OpenAI models, reproduces every response, or implements every OpenAI endpoint.

The safest interpretation is narrow: if your client can set a custom base URL and stays inside the documented documented subset, migration may be small. Function calls, Responses, and batches have explicit BrokenGPT contracts; multimodal content, embeddings, hosted files/assistants, and private-route extensions remain separate dependencies.

02

A compatibility matrix for the public route.

BrokenGPT chat-completions compatibility
CapabilityStatusImplementation note
POST /v1/chat/completionsSupportedBearer authentication and JSON request body.
String role messagesSupportedsystem, user, and assistant roles on the public route.
temperature / top_pSupportedOptional sampling values within documented ranges.
max_tokensSupportedOptional caller cap; omit it for natural completion. max_completion_tokens is an alias.
stop / userSupportedOne stop string or up to four; short user identifier.
SSE streamingSupportedchat.completion.chunk events followed by data: [DONE].
OpenAI-style error envelopePartialTyped JSON errors and request IDs; do not assume every code or message matches.
Function toolsSupportedTool calls are returned to clients; hosted execution is not implicit.
Structured outputsSupportedNon-streamed JSON object or JSON Schema output is validated before delivery.
POST /v1/responsesSupported subsetText, function calls, JSON formats, and lifecycle-event streaming.
Batch inferenceSupportedPersisted non-streaming chat batches with per-item results.
Token count / usageSupportedScoped endpoints count input and report per-key usage.
Multimodal message partsNot advertisedCurrent message content is a string.
Other platform endpointsNot advertisedCompatibility is limited to the live documented surface.

This table describes BrokenGPT’s current application route, not every feature an upstream model might support. The live API documentation remains the operational source of truth.

03

Change three identifiers, then test behavior.

  1. Base URL: point the client at https://brokengpt.com/v1.
  2. API key: replace the provider credential with a BrokenGPT server-side key.
  3. Model: use the public alias published in the current docs.

SERVER-SIDE JAVASCRIPT EXAMPLE

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.BROKENGPT_API_KEY,
  baseURL: "https://brokengpt.com/v1",
});

const response = await client.chat.completions.create({
  model: "broken-one",
  messages: [{ role: "user", content: "Explain this plainly." }],
  stream: false,
});

The snippet illustrates the compatible shape; it is not a guarantee for every SDK release. Pin the SDK version, run a non-streamed request first, then test streaming separately. If your client silently adds fields outside the contract, inspect the final wire request rather than guessing.

04

A live migration needs more than a 200 response.

Use representative prompts and verify the complete application path:

  • JSON parsing, role order, Unicode, long input, stop sequences, and requested output length;
  • SSE framing, partial chunks, disconnects, [DONE], and stream-level usage;
  • 401, 400, 404, 429, and 503 handling without leaking secrets or retrying forever;
  • request IDs, rate-limit headers, timeouts, cancellation, and idempotency assumptions;
  • input/output metering, credit exhaustion, dashboard attribution, and cost alerts;
  • refusal behavior, factual quality, application-level validation, and human escalation.
05

Compatibility is a technical description, not an affiliation.

BrokenGPT is an independent product. OpenAI and ChatGPT are associated with OpenAI; mentioning them here explains the client interface and migration context. It does not imply endorsement, partnership, model equivalence, or access to an OpenAI model.

For the upstream interface being referenced, consult OpenAI’s own API reference. For the destination interface, use BrokenGPT’s live docs. Comparing both contracts is more reliable than a generic “drop-in replacement” claim.

PRIMARY SOURCES

  1. 01
    Create chat completion — API reference

    OpenAI — Reference for the source interface terminology.

  2. 02
    BrokenGPT API documentation

    BrokenGPT — Operational source for the supported destination surface.

STRAIGHT ANSWERS

Frequently asked questions

01Is BrokenGPT a complete drop-in replacement for the OpenAI API?

No. It implements documented subsets for chat completions, Responses, tools, structured output, batches, token counting, and usage. Applications inside that contract may need only a base URL, key, and model change; unrelated platform features require separate work.

02Can I use an OpenAI SDK with BrokenGPT?

A client that lets you set a custom base URL and uses the supported chat-completions fields can generally send the documented shape. Test your exact SDK version and error-handling path before live use.

03Are OpenAI and BrokenGPT affiliated?

No. OpenAI is a separate company and trademark owner. Compatibility refers only to the documented API shape; it does not imply partnership, endorsement, identical models, or identical behavior.

04What should I test before switching?

Test message serialization, streaming chunk parsing, finish reasons, error objects, rate-limit headers, timeouts, optional caller output controls, billing, and your safety or human-review workflow with representative prompts.

INTEGRATION

Migrate the smallest slice first.

Point one server-side chat request at BrokenGPT, compare the result and headers, then expand only after your tests pass.

Read the exact docs