EN ▾
Get API key

LLM Model API Open Source: What You Actually Get

Searching for an open source LLM with an API can mean three different things. This page separates them and shows where a hosted endpoint for an open-weight model fits.

Updated

  • An open-weight model is a file you can download; an API is a service that runs it for you.
  • Self-hosting gives control but needs GPU memory, a serving stack and someone to keep it running.
  • This service hosts one open-weight model behind an OpenAI-compatible endpoint with pay-per-token billing.
  • You switch from any OpenAI SDK by changing the base URL and key, and the model ID is uncensored.
A glowing block of model weights linked by a light bridge to a server rack, illustrating a hosted open-weight API

Key points

If you type llm model api open source into a search box, the results mix up three separate ideas. The first is a model whose weights you can download. The second is the software that serves that model and exposes it over HTTP. The third is a company that has already done the serving and sells you access by the token. They solve different problems, and picking the wrong one costs either money or weekends.

Here is the short version. If you want to own the whole stack, download the weights and run a serving program yourself. If you want to write code against a chat endpoint today without buying GPUs, use a hosted API in front of an open-weight model. This site is the second kind: one model, an OpenAI-compatible interface, prepaid credit, and no content refusals for lawful adult use.

The rest of this page explains the vocabulary, compares the options honestly, and shows the few lines of code you need to call a hosted open-weight model.

Open source, open weight and why the label matters

People use "open source" loosely for language models. In the strict software sense, open source means you can read, modify and redistribute the source under an approved license. A language model is mostly a very large set of numbers, called weights, plus some code that runs them. Many popular releases publish the weights and the inference code but not the training data or the full training recipe. That is why you will often see the more accurate term open-weight.

Why care? Because the license attached to a model decides what you may do with it. Some licenses are permissive. Others restrict commercial use above a certain size, ban specific uses, or require you to pass the same terms along. Always read the license of the exact model you plan to ship, since two models from the same family can have different terms.

There is a second reason the label matters. An open-weight model is not an API. A file of weights does nothing until something loads it into GPU memory and answers requests. When a page says "open source LLM API", check whether it means "download this and run it" or "call our servers". The two have almost nothing in common operationally.

Ways to get an open-weight model behind an API

There are three practical routes. Each one ends in the same place for your application: an HTTP endpoint that accepts chat messages and returns text. What differs is who owns the hardware and who gets paged when it breaks.

Route 1: run it on your own machine

Tools such as llama.cpp, Ollama and vLLM can load open-weight models and expose an OpenAI-style server. This is excellent for experiments and for data that must never leave your network. The limit is memory. A model has to fit in VRAM, or run slowly from system memory after aggressive quantization, and long prompts need extra memory for the attention cache on top of the weights.

Route 2: rent GPUs and serve it yourself

You pick a cloud GPU, install a serving stack and tune it. You get full control over the model version, the sampling defaults and the context length. You also own monitoring, restarts, driver updates, batching settings and the bill for idle time. Rented GPUs cost money whether or not anyone sends a request.

Route 3: call a hosted API

A provider runs the GPUs and you pay for tokens. You give up control over the serving details, and in exchange you pay nothing while idle and write no infrastructure code. For most applications that only need text in and text out, this is the shortest path.

RouteUpfront workCost shapeBest for
Local machineInstall runtime, download weightsHardware you already ownOffline work, private experiments
Rented GPUServing stack, tuning, monitoringHourly, even when idleSteady heavy traffic, custom models
Hosted APIChange a base URL, add a keyPer token, nothing when idleApps, bots, prototypes, variable load

What this service is, and what it is not

This site hosts a single open-weight model that is run by an independent provider. The model is tuned to answer without content refusals for lawful adult use. There is one hard limit that never changes: no sexual content involving minors.

Some clarifications avoid confusion. It is not the official API of Meta, Mistral, Qwen, DeepSeek, OpenAI, xAI, Google, Anthropic or any other vendor. It is not a router that forwards your request to whichever vendor is cheapest. You send a request, one model answers it. The model ID is always uncensored, and GET /v1/models lists it.

It handles text only. There is no image, audio or video generation, no embeddings and no fine-tuning. If your project needs any of those, plan to get them elsewhere. The context window is 100,000 tokens, counting the prompt and the completion together, and a request body can be up to 8 MB.

The myths and facts page covers common misunderstandings about uncensored open-weight models, which is a useful read if you are still deciding what you actually need.

Calling a hosted open-weight model in a few lines

Because the endpoint speaks the OpenAI protocol, any OpenAI SDK works once you change two values: the base URL and the key. The two supported methods are POST /v1/chat/completions and GET /v1/models. Authentication is a standard bearer header.

from openai import OpenAI

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

resp = client.chat.completions.create(
    model="uncensored",
    messages=[
        {"role": "system", "content": "You are a concise assistant."},
        {"role": "user", "content": "Explain open-weight vs open-source models in two sentences."},
    ],
    temperature=0.7,
)
print(resp.choices[0].message.content)
print(resp.usage)

The same request from a shell:

curl https://api.nsfwllm.cc/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Say hello in five words."}],
    "stream": false
  }'

Streaming over server-sent events, tool calling, JSON mode, and the sampling parameters (temperature, top_p, stop, seed and the penalties) are all passed through. The quickstart docs list each one with an example. Response headers include X-Request-Id and X-Balance-USD, so you can log the remaining balance without a separate call.

What it costs compared with running your own box

Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, billed from prepaid credit with no subscription. Failed or refused requests are not charged, and credit never expires. Top-ups are any whole amount from $20 to $500, with a bonus of +5% from $50, +10% from $100 and +15% from $200. Payment is crypto only, in USDT on TRC20 or USDC on Base. See the pricing page for the current table.

Here is a worked example. Say a batch job sends 200,000 input tokens and receives 50,000 output tokens in total.

  • Input: 0.2 million tokens x $0.15 = $0.030
  • Output: 0.05 million tokens x $0.50 = $0.025
  • Total: $0.055

Now scale it. One million input tokens plus one million output tokens costs $0.15 + $0.50 = $0.65. A hosted API only wins on price when your usage is uneven or modest. If you already own a machine that sits idle and your volume is high and steady, running the model yourself can cost less per token. Do the arithmetic with your own traffic before deciding, and check any other provider's current pricing rather than relying on a number from a blog post.

When self-hosting is the better choice

A hosted endpoint is not always right, and it is better to say so plainly. Choose self-hosting if any of these apply:

  • Your data may not leave your own network for legal or contractual reasons.
  • You need a specific model version, a custom fine-tune or exact control over the serving settings. Fine-tuning is not offered here.
  • You already have spare GPU capacity and high, predictable traffic.
  • You need to run fully offline.

Choose the hosted route if you want to test an idea this afternoon, your load comes in bursts, or you would rather spend your time on the product than on drivers and batching flags. Prompts sent to this service are not used for training, which is worth confirming for any provider you compare.

A sensible plan for many teams is to prototype against the hosted endpoint, measure real token counts, and only then decide whether to move the workload onto hardware you control. Since the interface is the OpenAI protocol, moving later means changing a base URL, not rewriting your client code.

Try it with the trial credit

New users can claim $0.50 of trial credit with one click on the API key page after sign-up. It is one per person, valid for 7 days, and needs no payment details. Sign-up works with Google or with an email and password. A trial key allows 2 concurrent requests and 60 requests per minute, which is plenty for checking that your client code works.

At the output price above, $0.50 buys about one million output tokens if you send almost nothing as input, so a trial is more than enough for a real test. Go to the API key page, claim the credit, and run the Python snippet from earlier. A full key raises the limits to 8 concurrent requests and 300 requests per minute.

Questions and answers

Is an open source LLM API the same as a downloadable model?

No. A downloadable model is a set of weights you run yourself. An API is a hosted service that runs a model for you and returns the output over HTTP.

Is this the official API of the model's original developer?

No. It runs one open-weight model operated by an independent provider. It is not the official API of any model vendor and it does not route across vendors.

Which SDKs can I use?

Any OpenAI-compatible SDK or client. Set the base URL to https://api.nsfwllm.cc/v1, use your key as the bearer token, and set the model to uncensored.

Can I use it for image generation or embeddings?

No. The service is text only, with no image, audio or video generation, no embeddings and no fine-tuning.

How much context can I send?

The window is 100,000 tokens in total, covering the prompt and the completion together.

Your key is one form away

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