Integrate Uncensored Ollama Model API
Developers often look for a straightforward way to add unrestricted text generation to their applications. This guide walks you through connecting to our OpenAI-compatible endpoint using standard SDKs. You will learn how to handle authentication, manage token limits, and configure parameters for optimal results.

Understanding the API Endpoint Structure
Before writing any code, you need to identify the correct base URL for your integration. Our service operates as a hosted endpoint that mimics the structure of popular chat APIs. This design allows you to use existing SDKs without major rewrites. The base URL for all requests is https://api.uncensoredollamamodel.com/v1. You do not need to worry about different endpoints for different models since we serve only one uncensored open-weight text model. The model identifier you must send in your requests is simply uncensored.
When you initialize your client library, you will point it to this base URL. This ensures that all your API calls, whether for chat completions or model listing, route to the correct server. The service is designed to be drop-in compatible with standard OpenAI-style clients. This means you can likely reuse your existing integration code with minimal changes. The focus is on text input and text output, providing a clean and predictable interface for developers.
You should verify that your client library supports the version of the API we host. Since we follow the standard chat-completions format, most modern libraries will work out of the box. You do not need to install specific vendor drivers or manage complex local environments. The entire infrastructure is managed on our side, allowing you to focus on your application logic. This reduces the overhead of maintaining your own model serving stack.
It is important to note that we do not offer embeddings, image generation, or audio processing. If your application requires those features, you will need to integrate other services. Our API is strictly for text generation. By keeping the scope focused on text, we ensure high performance and reliability for your chat and content generation workflows. The simplicity of the endpoint structure makes debugging easier when issues arise.
Authentication and Key Management
Access to the API requires an API key, which you obtain during the signup process. You can create an account by continuing with Google or using an email and password combination. Upon signing up, your API key is shown immediately. It is important to save this key securely, as it is the primary method for authenticating your requests. The key is tied to your account and allows you to make requests up to the rate limits defined for your plan.
When making requests, you must include the API key in the Authorization header. The standard format is Bearer YOUR_API_KEY. If the key is invalid or missing, the API will return a 401 error. This indicates that the key is either malformed or does not exist in our system. It is a good practice to check your key format before debugging other parts of your integration. A simple typo in the key string can prevent your application from connecting.
If you encounter a 402 error, it means you have no credit available to process the request. Our service operates on a prepaid credit system, so you must top up your account to continue making calls. Errors and refusals do not consume credit, which is a helpful feature for testing your application logic. You can monitor your usage and balance through your account dashboard. Keeping an eye on your credit balance helps prevent unexpected interruptions in service.
The rate limit for your API key is 300 requests per minute. If you exceed this limit, you will receive a 429 error. This limit is designed to ensure fair usage across all users. You can implement exponential backoff in your code to handle rate limiting gracefully. This approach prevents your application from overwhelming the server during peak usage times. Proper error handling for these status codes is essential for a reliable integration.
Configuring Parameters for Generation
Our API supports a range of parameters that allow you to fine-tune the behavior of the text generation. You can adjust the temperature to control the randomness of the output. A lower temperature produces more deterministic results, while a higher temperature encourages creativity. The top_p parameter allows you to control the nucleus sampling, which filters out low-probability tokens. These parameters give you precise control over the quality and style of the generated text.
You can also specify stop sequences to halt generation when certain strings are encountered. This is useful for formatting output or preventing the model from running on too long. The seed parameter allows you to set a random seed for reproducible results. This is particularly valuable for testing and debugging, as it ensures that the same input produces the same output. Consistency in generation helps you validate your application logic more effectively.
Penalties can be applied to discourage the model from repeating certain tokens or phrases. This helps in generating more diverse and natural-sounding text. The JSON mode feature allows you to force the output into a valid JSON format, which is useful for structuring data in your application. Function calling is also supported, enabling you to define tools that the model can invoke. This opens up possibilities for agentic workflows and complex task automation.
Streaming is available over Server-Sent Events (SSE), allowing you to receive tokens as they are generated. This provides a smoother user experience, especially for long responses. The usage information is included in the last chunk of the stream, so you can track token consumption in real time. Understanding these parameters helps you optimize your application for both performance and user satisfaction. Experimenting with different settings can reveal the best configuration for your specific use case.
Token Budgeting and Pricing Model
Understanding the pricing model is essential for budgeting your API usage. We charge $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. This pricing structure is straightforward and transparent, allowing you to estimate costs based on your expected token volume. You can calculate the cost of a request by dividing the number of tokens by 1,000,000 and multiplying by the respective rate. For example, a request with 10,000 input tokens and 5,000 output tokens would cost a small fraction of a cent.
Credit is prepaid and charged by real token usage. Errors and refusals do not consume credit, which saves you money during testing. The prepaid credit never expires, so you can top up whenever it is convenient. This flexibility is beneficial for projects with irregular usage patterns. You do not need to worry about monthly fees or subscription commitments. The focus is on pay-as-you-go pricing, which aligns costs with actual usage.
To top up your account, you can use cryptocurrency. We accept USDT on the TRC20 network or USDC on the Base network. The minimum top-up amount is $20, and the maximum is $500. If you top up with $50 or more, you receive a bonus credit ranging from 5% to 15%. This bonus provides additional value for larger purchases. The payment process is simplified to ensure quick credit availability for your account.
It is important to monitor your token usage to avoid unexpected charges. You can estimate the token count of your prompts and responses to plan your budget. The context window for our model is 100,000 tokens, which includes both the prompt and the completion. This large context window allows for complex conversations and long documents. By understanding the token economics, you can optimize your application for cost efficiency.
When This API Is Not the Right Choice
While our API is powerful for text generation, it may not be the right choice for every project. If your application requires image generation, audio processing, or video creation, our service will not meet those needs. We do not offer embeddings, OCR, or fine-tuning capabilities. Developers looking for these features should consider other specialized services. Our API is strictly focused on text-in, text-out workflows.
If you need on-premises deployment or require specific SLA guarantees, our hosted service may not fit your infrastructure requirements. We do not offer SLA percentages or certifications like SOC2 or HIPAA. For enterprises with strict compliance needs, a self-hosted solution might be more appropriate. Our service is designed for developers and indie builders who need a reliable, uncensored text API without the overhead of managing their own infrastructure.
Additionally, if you need to route requests to multiple models or perform model routing, our service may not be suitable. We serve only one uncensored open-weight text model. If your application requires A/B testing between different models or dynamic model selection, you would need a more flexible routing solution. Our simplicity is a feature, but it also means we do not offer multi-model capabilities.
Finally, if you prefer traditional payment methods like credit cards or PayPal, our crypto-only top-up system might be a barrier. We accept USDT on TRC20 or USDC on Base, with no card or bank transfer options. For users who need immediate access without cryptocurrency transactions, this could be a limitation. However, for those comfortable with crypto, the process is straightforward and efficient.
Addressing Common Community Questions
Discussions in developer communities often revolve around the best uncensored models for specific hardware constraints. Users frequently ask about running models on GPUs with limited VRAM, such as 12GB or 16GB. While our API is hosted, many developers are interested in understanding the underlying model capabilities. Threads on r/LocalLLaMA and r/StableDiffusion often discuss model sizes and performance on local hardware. These conversations help users choose the right model for their setup.
Another common topic is the difference between local inference and API usage. Some users prefer to run models locally for privacy or cost reasons, while others prefer the convenience of an API. The Reddit digest shows that users appreciate the flexibility of having both options. Our API provides a middle ground, offering the power of a large model without the need for local hardware. This is particularly useful for users with limited GPU resources.
Users also discuss the importance of prompt engineering and parameter tuning. Many threads highlight the need to experiment with temperature, top_p, and stop sequences to get the best results. Our API supports all these parameters, allowing users to fine-tune their outputs. The community often shares tips on how to structure prompts for better performance. These insights can help you optimize your integration.
Finally, there is interest in agentic workflows and tool use. Users are exploring how to integrate uncensored APIs into complex applications that require function calling and tool use. Our API supports function calling and JSON mode, making it suitable for these advanced use cases. By understanding these community trends, you can better align your integration with current developer needs. The focus is on providing a flexible and powerful text generation service.
Testing and Troubleshooting Your Integration
Once you have integrated the API, it is important to test your connection thoroughly. Start by sending a simple request to the /v1/models endpoint to verify that your key is valid and the service is reachable. This simple check can save you time when debugging more complex issues. If you receive a 401 error, double-check your API key and its format. Ensure that the key is included in the Authorization header correctly.
If you encounter a 429 error, it means you have exceeded the rate limit of 300 requests per minute. You should implement exponential backoff in your code to handle this gracefully. This involves waiting for a short period before retrying the request, increasing the wait time with each attempt. This approach prevents your application from overwhelming the server and ensures a smoother user experience.
Testing with different parameters is also important. Try varying the temperature, top_p, and stop sequences to see how they affect the output. This helps you find the best settings for your specific use case. You can also test the streaming functionality to ensure that tokens are being received correctly. The usage information in the last chunk of the stream allows you to verify token counts.
Finally, monitor your account for any unusual activity or errors. If you notice unexpected charges or errors, check your API key and usage logs. Our service provides detailed error codes to help you diagnose issues. A 402 error indicates no credit, while a 401 error indicates an invalid key. By staying vigilant and responsive to these signals, you can maintain a reliable and efficient integration.
Frequently asked questions
How do I top up my account?
You can top up your account using USDT on the TRC20 network or USDC on the Base network. The minimum amount is $20, and the maximum is $500. Credit is added immediately after the transaction is confirmed.
What happens if I run out of credit?
If you run out of credit, you will receive a 402 error on your requests. You can continue to make requests, but they will not be processed until you top up your account. Errors and refusals do not consume credit.
Can I use this API for function calling?
Yes, our API supports function calling (tools). You can define tools in your requests, and the model can invoke them. This is useful for agentic workflows and complex task automation.
Is there a free trial available?
Yes, every new account gets $0.50 of trial credit. No credit card is needed to sign up. This allows you to test the API without any financial commitment.