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.
A compatibility matrix for the public route.
| Capability | Status | Implementation note |
|---|---|---|
| POST /v1/chat/completions | Supported | Bearer authentication and JSON request body. |
| String role messages | Supported | system, user, and assistant roles on the public route. |
| temperature / top_p | Supported | Optional sampling values within documented ranges. |
| max_tokens | Supported | Optional caller cap; omit it for natural completion. max_completion_tokens is an alias. |
| stop / user | Supported | One stop string or up to four; short user identifier. |
| SSE streaming | Supported | chat.completion.chunk events followed by data: [DONE]. |
| OpenAI-style error envelope | Partial | Typed JSON errors and request IDs; do not assume every code or message matches. |
| Function tools | Supported | Tool calls are returned to clients; hosted execution is not implicit. |
| Structured outputs | Supported | Non-streamed JSON object or JSON Schema output is validated before delivery. |
| POST /v1/responses | Supported subset | Text, function calls, JSON formats, and lifecycle-event streaming. |
| Batch inference | Supported | Persisted non-streaming chat batches with per-item results. |
| Token count / usage | Supported | Scoped endpoints count input and report per-key usage. |
| Multimodal message parts | Not advertised | Current message content is a string. |
| Other platform endpoints | Not advertised | Compatibility 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.
Change three identifiers, then test behavior.
- Base URL: point the client at
https://brokengpt.com/v1. - API key: replace the provider credential with a BrokenGPT server-side key.
- 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.
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.
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
- 01Create chat completion — API reference
OpenAI — Reference for the source interface terminology.
- 02BrokenGPT API documentation
BrokenGPT — Operational source for the supported destination surface.