EN ▾
Get API key

Ollama API: the options compared

The Ollama API provides a standard interface for running open-weight models locally or on your own infrastructure, but for developers who need a hosted, uncensored text-generation service without content filters, a drop-in alternative is available. This guide explains the standard Ollama API workflow and introduces a privacy-focused, prepaid API that serves the same client code with an open-weight model tuned for adult and controversial topics.

Ollama API: the options compared

Updated

Key points

  • The standard Ollama API requires self-hosting or specific server setups, whereas hosted alternatives offer immediate access via standard OpenAI-compatible endpoints.
  • Our hosted API uses the 'uncensored' model, which does not refuse lawful adult, fictional, or security-research topics, unlike many generic providers.
  • You pay only for real token usage with errors and refusals being free, using a prepaid credit model that never expires.
  • The service supports streaming, JSON mode, and function calling, making it a direct drop-in replacement for standard text-generation workflows.

What is the Ollama API?

The Ollama API is a local or remote interface that exposes a standard set of endpoints for running large language models. Typically, Ollama runs as a local server on your machine, exposing a http://localhost:11434 endpoint that mirrors the OpenAI API structure. This design allows you to use existing OpenAI SDKs and client libraries without rewriting your code, simply by changing the base URL.

While Ollama is excellent for running models like Llama 3 or Mistral locally, it is not a hosted service. You manage the hardware, the model downloads, and the server uptime. For developers who want the flexibility of open-weight models but prefer a managed, hosted solution, the uncensored api offers a similar experience without the infrastructure overhead.

This approach ensures that your data remains under your control, or in the case of our hosted service, remains private with no training on your prompts. The standard Ollama API is great for experimentation, but for production workloads requiring high availability and specific content policies, a dedicated hosted alternative is often more efficient.

Why Use an Uncensored Model?

Many mainstream LLM providers apply strict content filters that refuse lawful adult content, creative fiction, or controversial topics. An uncensored model is tuned to answer these requests without unnecessary refusals. This is particularly useful for content creators, authors, and developers building applications that need nuanced or explicit output without fighting the model's safety layer.

Our hosted service uses an open-weight model that does not refuse lawful adult, fictional, or security-research topics. The only hard limit is sexual content involving minors, which is always blocked. This makes it an ideal nsfw llm choice for applications where creative freedom is prioritized over conservative filtering.

Unlike generic providers that may train on your data or change their content policies arbitrarily, this service offers transparency. You get a straightforward API key and a clear set of rules. The model is not GPT, Claude, or any other vendor's model; it is a distinct open-weight model run on our servers, ensuring that your prompts are not used for training other models.

How to Connect to the API

Connecting to our uncensored api is as simple as connecting to any OpenAI-compatible service. You need a base URL and an API key. Our base URL is https://api.ollamansfw.top/v1. You can sign up using Google or an email password to get your key immediately.

  • Base URL: https://api.ollamansfw.top/v1
  • Model ID: uncensored
  • Authentication: Bearer token via API key

This setup works with the official OpenAI SDKs and any OpenAI-compatible client. You do not need to install Ollama itself; our service handles the model serving. This is a significant advantage for developers who want the benefits of an open-weight model without managing the GPU infrastructure.

The API supports standard parameters like temperature, top_p, and stop, allowing you to fine-tune the output style. If you are building a chatbot, a content generator, or a research tool, the connection process is identical to what you might use for GPT-4, just with a different base URL and model ID.

Streaming vs Non-Streaming

Streaming is important for user experience in chat applications. Our API supports streaming via Server-Sent Events (SSE), allowing you to receive tokens as they are generated. This reduces perceived latency and keeps users engaged. The last chunk of the stream includes token usage statistics, so you can track costs in real-time.

Non-streaming requests are also supported, where you receive the full response at once. This is useful for batch processing or when you need the complete output before proceeding. The API handles both modes efficiently, ensuring that your application can choose the best approach for its specific use case.

For uncensored model outputs, streaming ensures that even long, complex responses are delivered smoothly. You can parse the SSE stream to display text progressively, improving the feel of your application. The API key remains valid for both modes, and the rate limits apply equally to streaming and non-streaming requests.

JSON Mode for Structured Output

Many applications require structured data rather than free-form text. Our API supports JSON mode, where the model is instructed to output a valid JSON object. This is achieved by setting the response_format parameter to {"type": "json_object"}.

This feature is essential for building tools that integrate with other systems, such as extracting data from text, generating configuration files, or creating structured content for databases. The model is tuned to adhere to JSON schemas, reducing the need for post-processing and validation.

When using JSON mode, the uncensored api ensures that the output remains consistent and valid. This is particularly useful for developers who need reliable data structures without the overhead of additional parsing libraries. The API handles the complexity of JSON generation, allowing you to focus on integrating the data into your application.

Function Calling with Tools

Function calling, or tool use, allows the model to execute specific functions based on user input. Our API supports this feature, enabling you to define tools and let the model decide when to use them. This is powerful for building agents that can interact with external systems, such as fetching weather data, querying databases, or performing calculations.

You can define tools with their names, descriptions, and parameter schemas. The model will return a function call if it determines that a tool is relevant. You then execute the tool and feed the result back to the model for further processing.

This feature makes the uncensored llm versatile beyond simple text generation. It can act as a reasoning engine that interacts with your application's logic. The API supports tool choice parameters, giving you control over how the model selects and uses tools. This flexibility is key for building advanced AI applications that require more than just text output.

Managing Tokens and Limits

Understanding token limits is important for optimizing your API usage. Our API has a context window of 100,000 tokens, which includes both the prompt and the completion. If max_tokens is not set, the response can run to the end of the window. This allows for substantial conversations and long-form content generation.

Rate limits are set at 300 requests per minute per key and 8 concurrent requests. The request body is limited to 8 MB. These limits are designed to ensure fair usage and high availability. You can monitor your usage through the dashboard and top up your credit as needed.

Pricing is transparent: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Errors and refusals are free, so you only pay for real token usage. The prepaid credit never expires, and you can top up with crypto (USDT or USDC) for a bonus. This model ensures that your costs are directly tied to your actual consumption.

Why Choose This API?

This API offers a unique combination of privacy, flexibility, and uncensored content. Unlike generic providers, we do not train on your prompts, and we do not refuse lawful adult content. The prepaid model is straightforward, with no monthly subscriptions or hidden fees. You pay only for what you use, and your credit never expires.

The service is designed for developers who value direct control over their prompts. The uncensored model is tuned for adult and controversial topics, making it ideal for content creators and researchers. The API is compatible with standard OpenAI SDKs, making it easy to switch from other providers.

With a simple signup process using Google or email, and a crypto-only top-up system, the service is accessible and privacy-focused. The lack of content filters, except for minors, ensures that your creative freedom is not restricted. This makes it a compelling alternative for those who find standard APIs too restrictive.

Questions and answers

Is this the official Ollama API?

No, this is an independent service that uses an open-weight model served via an OpenAI-compatible interface. While it mirrors the Ollama API structure, it is not affiliated with the Ollama project. You can use standard SDKs to connect, but the model and hosting are distinct.

What happens if I make a request that results in an error?

Errors are free. You only pay for real token usage when the model successfully generates output. This means you do not incur costs for failed requests or network issues, making the prepaid model very efficient for testing and development.

Can I use this API for commercial projects?

Yes, the API is designed for both personal and commercial use. The content policy allows lawful adult content, so you can use it for various applications without worrying about content refusals. Just ensure your usage complies with the hard limit on minor content.

How do I top up my credit?

You can top up using crypto only, specifically USDT (TRC20) or USDC (Base). The minimum amount is $20, and the maximum is $500 per transaction. You receive a +5% bonus for top-ups of $50 or more, a +10% bonus for $100 or more, and a +15% bonus for $200 or more.

Your key is one form away

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