EN ▾
Get API key

Uncensored text API for your pipeline

OpenAI Compatible APIs: What to Check Before You Pick One

OpenAI compatible apis accept the same requests as OpenAI's chat endpoint, so you switch providers by changing a base URL and a key. Compatibility has layers, though, and the useful question is which ones your project needs.

Updated

Different connectors plugging into one standard socket, symbolizing OpenAI compatible APIs

Key points

  • Compatible means the same request and response shape; it does not mean the same models, limits or policies.
  • Check streaming, tool calling, JSON mode, context size, rate limits and data handling, not only chat completions.
  • This API offers one open-weight model, uncensored, with a 100,000-token context and no embeddings or images.
  • Switching is a two-line change, so you can test with the $0.50 trial before committing.

What compatible means in practice

OpenAI's chat completions format became a common shape for language model APIs. Many hosted services, and self-hosted servers such as vLLM and Ollama, expose an endpoint that accepts the same JSON and returns the same structure. Client libraries, agent frameworks and no-code tools were built around that shape, so a compatible endpoint works with them after you change the base URL and key.

That is the whole benefit, and it is a real one. You are not tied to one vendor's SDK, you can test a new provider in minutes, and you can keep a second one ready as a fallback. The limit of the benefit is that compatibility describes the interface only. The model behind the interface, the price, the rate limits, the data policy and the rules about what it will answer are all different from service to service.

So when you compare openai compatible apis, do not stop at "works with the OpenAI SDK". Almost every candidate passes that test. The differences are in the next sections.

The layers of compatibility

LayerWhat to confirmStatus here
Chat completionsPOST /v1/chat/completions with messagesSupported
Model listingGET /v1/modelsSupported
StreamingServer-sent events with stream set to trueSupported, usage at the end
Tool callingtools, tool_choice, streamed tool_calls, role tool resultsSupported
JSON moderesponse_format json_objectSupported
Sampling controlstemperature, top_p, stop, seed, penaltiesPassed through
Embeddings, images, audioSeparate endpointsNot offered
Fine-tuningTraining endpointsNot offered

The last two rows are the ones people forget to check. If your stack needs embeddings for retrieval, you will need a second service for that part, whichever chat provider you choose. A text-only API does one job, and the honest way to use it is next to other tools, not in place of all of them.

Questions to ask any provider

Run through this list before you move real traffic anywhere.

  1. Which model answers? A compatible URL can hide anything. Ask who runs the model and whether you can pin a model ID.
  2. What is the context window? Agents with long histories and creative tools with long story state both need room.
  3. What are the rate and concurrency limits? A bot with many users hits concurrency first.
  4. How are failed requests billed? This varies, and it affects retry costs.
  5. What does the provider do with prompts? Look for a clear statement about training.
  6. What will the model refuse? Content policy decides whether your use case works at all.
  7. How do you pay, and does credit expire?

For other providers, read their current documentation and pricing pages; those details change and are not repeated here. The sections below answer the same questions for this service.

What this API offers

The service behind this site hosts one open-weight model, run by an independent provider, with the model ID uncensored. It is tuned to answer without content refusals for lawful adult use. It is not the official API of any model vendor, and it is not a router that picks between vendors.

  • Context: 100,000 tokens, prompt and completion together. max_tokens is optional.
  • Limits: a full key allows 8 concurrent requests and 300 requests per minute; a trial key allows 2 and 60. Bodies up to 8 MB.
  • Errors: over a limit you get HTTP 429 with the code rate_limited or concurrency. Temporary overload also returns 429 with Retry-After: 5.
  • Headers: X-Request-Id, X-Balance-USD and the rate limit headers on responses.
  • Price: $0.15 per 1M input tokens and $0.50 per 1M output tokens, from prepaid credit. No subscription, no expiry, no charge for failed or refused requests.
  • Data: prompts are not used for training.
  • Hard limit: no sexual content involving minors.

The docs show the request format, and the pricing page covers top-ups from $20 to $500, paid by crypto.

Where it fits: agents, bots and creative writing

Agents

Agent loops make many calls, each one carrying tool definitions and a growing history. Tool calling is supported, and a long context lets the history grow before you need to trim. As a worked example, take an agent run of 20 model calls with about 6,000 input tokens and 500 output tokens each. Input is 120,000 tokens, which costs 120,000 / 1,000,000 x $0.15 = $0.018. Output is 10,000 tokens, which costs 10,000 / 1,000,000 x $0.50 = $0.005. The run costs $0.023 in total. Mind the concurrency cap of 8 if you run agents in parallel.

Bots

A chat bot needs streaming for a responsive feel and a retry path for 429 responses. Because each streamed request keeps its concurrency slot until the stream ends, size your worker pool to the limit and queue the rest instead of firing everything at once.

Creative writing and roleplay

Fiction, interactive stories and companion-style apps for adults often hit refusals on other models. Here the model is tuned to avoid content refusals for lawful adult use, so a dark plot or a morally grey character does not end in a lecture. The hard limit on minors stays, and your app should still set its own rules for its users. For the media side, the Veo 3 prompt article shows how text prompts feed a video step.

A fair way to test candidates

Marketing pages cannot tell you how a model behaves on your data, so build a small test of your own. It takes an afternoon and saves weeks of regret.

  1. Collect 20 to 50 real prompts from your project: the ordinary ones, the long ones and the awkward ones that failed before.
  2. Write a script that sends each prompt to every candidate through the same OpenAI client, changing only the base URL, key and model.
  3. Record the reply, finish_reason and token usage for each call, and measure latency on your own network instead of trusting anyone's claim.
  4. Score what matters to you: refusals on lawful prompts, correct tool arguments, valid JSON, tone, and whether the story stays consistent over a long context.
  5. Multiply the usage by each provider's current prices. For other services, check their current pricing rather than relying on figures from a blog.

Run the test twice, on different days, since load changes. Keep the script. When a new model or provider appears, you can rerun the same set in minutes and compare with your last result, which is far better than starting from opinions each time.

Switching in two lines

Moving to a compatible endpoint is a configuration change. In the Python SDK:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.ltxapi.top/v1",
    api_key="YOUR_API_KEY",
)

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Write a two-line opening for a space-noir story."}],
)
print(resp.choices[0].message.content)

Many tools also read environment variables, which lets you switch without touching code:

export OPENAI_BASE_URL="https://api.ltxapi.top/v1"
export OPENAI_API_KEY="YOUR_API_KEY"

curl "$OPENAI_BASE_URL/chat/completions"   -H "Authorization: Bearer $OPENAI_API_KEY"   -H "Content-Type: application/json"   -d '{"model": "uncensored", "messages": [{"role": "user", "content": "ping"}]}'

Keep the model name in a config value rather than hard-coding it, and keep the base URL there too. That way a fallback provider is one environment change away, which is the practical payoff of choosing an interface many services share. Log the X-Request-Id header from each response so you can trace a bad answer later.

Run your own prompts through it before you decide. A short test set of your real inputs tells you more than any comparison article, including this one. Claim the $0.50 trial on the key page; it is valid for 7 days and needs no card.

If you need embeddings, images or a vendor's own flagship model, choose a provider that offers them, and use this API only for the text part where its model and rules suit you.

Questions and answers

Does OpenAI compatible mean it uses OpenAI models?

No. It means the API accepts the same request format. The model behind this endpoint is an open-weight model run by an independent provider.

Which OpenAI SDK features work here?

Chat completions, model listing, streaming, tool calling and JSON mode, plus temperature, top_p, stop, seed and penalties. Embeddings, images and audio are not offered.

How large can a prompt be?

The context window is 100,000 tokens, counting prompt and completion together, and the request body can be up to 8 MB.

Can I use it with LangChain, n8n or SillyTavern?

Tools that let you add an OpenAI-compatible endpoint can use it. Enter the base URL, your key and the model ID uncensored.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key