What is the Ollama API?
The ollama api is a RESTful interface that exposes language models through a standardized endpoint structure. Originally designed to run models locally on your machine, it follows the same request-response patterns as major cloud providers. This means you can use standard SDKs (like the official OpenAI Python or JavaScript libraries) to interact with models running on your own hardware or via a third-party host.
By adopting this standard, the api reduces the friction of switching between different model providers. You define the model, send the prompt, and receive the completion. The key advantage is the decoupling of the client code from the underlying inference engine. If you are running llama3 locally or connecting to a remote server, the integration logic remains identical.
For developers seeking a local llm api alternative, this standardization allows for easy deployment in containerized environments or cloud functions. The api supports streaming responses, which are essential for real-time user experiences in chat applications. It also handles tokenization and context window management internally, freeing you to focus on the application logic rather than the inference details.
Why Use an Uncensored Model?
Standard models often apply content filters to prevent outputs that might be deemed inappropriate, even in professional or creative contexts. An uncensored llm api removes these guardrails, allowing the model to answer questions about adult themes, controversial topics, or niche subjects without refusal. This is particularly valuable for creative writing, where a model might refuse to generate a story involving violence or romance simply because it detects those keywords.
For security researchers, uncensored models provide a clearer view of the model's underlying knowledge and reasoning capabilities without the noise of safety filters. They are also preferred for role-playing applications where the model needs to stay in character without breaking the fourth wall to explain its safety guidelines.
It is important to note that uncensored does not mean lawless. Most models still have hard limits, such as blocking sexual content involving minors. However, for general adult content, political debate, or edgy humor, an uncensored variant provides a more authentic and less restricted user experience. This makes them a popular choice for uncensored chat api implementations where user engagement is prioritized over corporate polish.
Getting Started with Ollama
To begin using the api, you first need to install the inference engine. For local deployment, this involves downloading the software and pulling a model. Once the model is loaded, the api server starts on a local port, typically 11434. You can then send requests to http://localhost:11434/v1/chat/completions.
For a hosted solution, the process is even simpler. You obtain an API key from the provider and update your client's base URL. Instead of pointing to localhost, you point to the provider's endpoint. In our case, the base URL is https://api.ollamauncensored.com/v1. This allows you to use the exact same code you would use for GPT-4 or Claude, just with a different key and endpoint.
The setup requires minimal configuration. You only need to ensure your SDK is configured with the correct base URL and authentication header. This approach is ideal for developers who want the power of open-weight models without managing server infrastructure. It also allows for easy scaling if you move from local testing to production hosted instances.
API Endpoints Overview
The service exposes two primary endpoints to keep the integration simple and predictable. The first is POST /v1/chat/completions, which handles all conversational and single-turn interactions. This endpoint accepts a list of messages, each with a role (system, user, or assistant) and content. It returns the model's response, including token usage statistics.
The second endpoint is GET /v1/models, which returns a list of available models. This is useful for dynamically selecting models in your UI or verifying that the connection is active. Unlike complex providers that offer dozens of endpoints for images, audio, and embeddings, we focus exclusively on text generation.
This simplicity reduces the surface area for bugs and makes debugging easier. You do not need to handle multiple response formats for different modalities. Every request is text in, text out. This consistency is important for teams that want a reliable, predictable interface for their LLM integrations. The uncensored model api is designed to be a drop-in replacement for any standard OpenAI-compatible client.
Streaming and Function Calling
Streaming is supported via Server-Sent Events (SSE). When you set the stream parameter to true, the api returns partial responses as they are generated. This allows you to display text to the user in real-time, improving the perceived latency of the application. The final chunk of the stream contains the token usage statistics, which you can use for billing or logging purposes.
Function calling (tool use) is also supported. You can define a list of tools in your request, and the model will return a structured JSON object indicating which tool to call and with what arguments. This enables your application to perform actions like searching a database or calculating a sum. The model handles the tool selection logic, and you are responsible for executing the function and feeding the result back into the conversation.
JSON mode is another critical feature. By setting response_format to {"type": "json_object"}, you force the model to output valid JSON. This is essential for building structured data pipelines or integrating with other software systems. It ensures that your parser does not break due to malformed output.
Pricing and Costs
Our pricing is straightforward and usage-based. You pay for what you use, with no monthly subscriptions or hidden fees. The rates are $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. This is competitive with many hosted providers and offers transparency in cost calculation.
Payments are made via prepaid credit, topped up by crypto. We accept USDT (TRC20) and USDC (Base) for crypto top-ups. You can top up any whole amount from $20 to $500. For larger top-ups, you receive bonus credit: +5% for amounts from $50 and +10% for amounts from $100. This bonus credit never expires.
Error responses are free. If the model returns an error, you are not charged for those tokens. This protects you from unexpected costs due to network issues or model glitches. We accept crypto (USDT on TRC20, USDC on Base), keeping the transaction process fast and borderless. A new account receives $0.50 in trial credit, valid for 7 days, with no card required. Claim this credit with one click on your API key page.
Comparison with Other APIs
Unlike general AI platforms that offer a wide range of models and features, we focus on a single, high-performance uncensored model. This specialization means we can optimize our infrastructure specifically for this model's needs, ensuring low latency and high availability. Other providers often route requests through multiple models or add layers of moderation that can slow down the response time.
In terms of pricing, we keep it simple: competitive per-token rates and bonus credits on larger top-ups, payable by crypto (USDT on TRC20, USDC on Base). While other providers may offer free tiers, they often come with rate limits or lower quality models. Our paid tier ensures dedicated resources for your requests.
For developers who need a local llm api alternative without the hassle of managing hardware, our hosted service offers the best of both worlds. You get the flexibility of the open-source model ecosystem with the convenience of a managed API. The interface is identical to the standard OpenAI API, so you can switch between local and hosted instances with a single line of code change.
More guides
- Ollama Uncensored Vision Model: Is Ours Text-Only?
- Open WebUI on Windows with a Hosted Uncensored API
- How Much Does Ollama Cost? Local Setup vs API Fees
FAQs for Developers
- Is this the official Ollama API? No, we are an independent service. We use the same API standard but run our own uncensored model on our servers.
- Can I use this with the OpenAI SDK? Yes, it is fully OpenAI-compatible. Just change the base URL and API key.
- What happens if I get an error? Errors are free. You are only charged for successful token generations.
- Is my data used for training? No. Prompts sent through our API are not used to train our model.
