How to Integrate Uncensored Claude API: SDK Checklist
Developers often search for an uncensored Claude API to power coding agents like Cursor or local LLM tools. This guide provides a tested integration checklist for OpenAI-compatible SDKs, covering API key setup and prompt formatting for text-in, text-out workflows. We focus on practical steps to get your model running without unnecessary complexity.

Setting Up Your API Key and Endpoint
Before you can send any requests, you need to obtain an API key. Our service allows you to sign up using Google or an email and password. Once you create an account, your key is shown immediately, so you can copy it right away. This key is essential for authenticating your requests to the endpoint. Without a valid key, you will receive a 401 error, which indicates that the key is invalid or missing. It is important to keep this key secure, as it is the primary way our system identifies your account and tracks your usage.
The base URL for our API is https://api.tokencostclaude.com/v1. When configuring your SDK, you should set this as the base URL for all your requests. This ensures that your calls are directed to the correct server. The API is OpenAI-compatible, which means you can use most standard OpenAI SDKs with minimal changes. You just need to update the base URL and the model name. The model ID you must send is 'uncensored'. This tells the system which model to use for generating responses.
It is also worth noting that we offer a trial credit of $0.50 for every new account. This allows you to test the integration without needing to add payment details immediately. No card is needed for the trial. You can start making requests right away to see how the API responds. This is a great way to verify that your SDK is configured correctly before you commit to purchasing more credit. The trial credit is charged by real token usage, so you can see exactly how much you are using.
Once you have your key and base URL set up, you are ready to make your first request. You can use the POST /v1/chat/completions endpoint to send messages. The API accepts text in and returns text out. This simple workflow is ideal for most applications. You do not need to worry about complex routing or multiple endpoints. Just send your prompt and receive the response. The API handles the rest, ensuring that your requests are processed efficiently.
Configuring SDK for OpenAI Compatibility
Since our API is OpenAI-compatible, you can use the standard OpenAI SDK for Python, JavaScript, or other languages. This makes integration straightforward for developers who are already familiar with these tools. You simply need to update the configuration to point to our base URL and use the 'uncensored' model. This compatibility allows you to use existing code and libraries, reducing the time needed to get your project up and running. You do not need to learn a new SDK from scratch.
When configuring the SDK, you should also set the appropriate parameters. Our API supports parameters such as temperature, top_p, stop sequences, and seed. These parameters allow you to control the behavior of the model. For example, you can adjust the temperature to make the responses more creative or more deterministic. The top_p parameter helps control the diversity of the output. Using these parameters effectively can improve the quality of the responses you receive.
Another important feature is the support for function calling. If your application requires the model to call specific functions, you can define these tools in your request. The API will return the function calls in the response, which you can then execute in your code. This is particularly useful for coding agents and automated workflows. You can also use JSON mode to ensure that the output is strictly in JSON format, which is helpful for structured data processing.
Streaming is also supported over Server-Sent Events (SSE). This allows you to receive responses in real-time as they are generated. This is useful for applications that require immediate feedback, such as chat interfaces or live coding assistants. The usage information is included in the last chunk of the stream, so you can track your token usage as you go. This helps you manage your budget and avoid unexpected charges.
Understanding Token Billing and Costs
Our pricing model is based on token usage. You pay $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. This means that the cost depends on the length of your prompts and the length of the responses. It is important to estimate your token usage before you start your project. You can use our calculator to estimate costs based on your expected workload. This helps you budget effectively and avoid surprises.
The API charges by real token usage, so you only pay for what you use. Errors and refusals are free, which means you do not pay for failed requests. This is a significant advantage for developers who are testing different prompts or configurations. You can experiment freely without worrying about incurring costs for unsuccessful attempts. The prepaid credit is charged by real token usage, so you can see exactly how much you are spending.
It is important to note that the credit never expires. You can top up your account whenever you need more credit. The minimum top-up amount is $20, and the maximum is $500. You can pay with USDT on the TRC20 network or USDC on the Base network. There are no monthly fees or subscriptions, so you only pay for what you use. This flexible pricing model is ideal for developers who have variable workloads.
If you need to estimate the cost of a specific request, you can use the formula: (tokens divided by 1,000,000) times the per-million price. For example, if you send 100,000 input tokens and receive 50,000 output tokens, the cost would be (100,000 / 1,000,000) * $0.15 for input and (50,000 / 1,000,000) * $0.50 for output. This allows you to calculate the exact cost of your requests. You can also use the per-million prices of $0.15 and $0.50 to get a quick estimate.
Handling Rate Limits and Errors
Our API has a rate limit of 300 requests per minute per key. This limit is in place to ensure fair usage and prevent abuse. If you exceed this limit, you will receive a 429 error, which indicates that you have hit the rate limit. It is important to handle this error in your code by implementing a retry mechanism with exponential backoff. This ensures that your application can recover from rate limits without overwhelming the server.
In addition to rate limits, you may encounter other errors. A 401 error indicates an invalid key, while a 402 error indicates that you have no credit left. It is important to check your account balance regularly to avoid unexpected interruptions. You can top up your account at any time to ensure that you have sufficient credit. The API also provides clear error messages, which help you diagnose and resolve issues quickly.
When integrating with SDKs, it is good practice to implement error handling for these common errors. You can log the errors and notify the user if necessary. This helps you monitor the health of your integration and identify any issues early. You can also use the error messages to adjust your request parameters or retry the request after a delay.
It is also important to note that the API supports streaming over SSE. This allows you to receive responses in real-time, which can help you manage rate limits more effectively. You can process the response as it comes in, rather than waiting for the entire response to be generated. This can reduce the time your application spends waiting for responses, which can help you stay within the rate limit.
When Our API Is NOT the Right Choice
While our API is excellent for text-based tasks, it may not be the right choice for all applications. If you need image, audio, video, or embedding generation, our API does not support these features. We also do not offer OCR, fine-tuning, or model routing. If your application requires these capabilities, you may need to use a different service or combine our API with other tools.
For example, if you need to generate images from text prompts, our API will not be able to handle this task. You would need to use a separate image generation service. Similarly, if you need to process audio or video files, you would need to use a different API. Our API is focused on text-in, text-out workflows, so it is best suited for applications that primarily involve text processing.
Another consideration is the context window. Our API has a context window of 100,000 tokens, which is quite large. However, if you need a larger context window, you may need to look for a different service. Additionally, if you need to route requests to multiple models, our API does not support this feature. You would need to manage the routing yourself or use a different service that offers model routing.
Finally, if you need real-time speech recognition or synthesis, our API may not be the best fit. Our API is designed for text-based interactions, so it does not include features for audio processing. If your application requires these features, you may need to use a different service. It is important to evaluate your specific needs before deciding to use our API.
Addressing Reddit Discussions on Pricing and Tool Calls
Developers on Reddit often discuss the pricing of various APIs and how to optimize tool calls. Some users have mentioned tools like Codegraph, which claim to reduce API tool calls by 94% locally. This can help offset the costs of using expensive APIs. However, it is important to verify these claims, as some users have noted that the actual reduction might be different. When considering such tools, it is advisable to check the vendor's documentation for current prices and limits.
Another common topic is the cost of using large language models for coding tasks. Users have shared their experiences with different models and how much credit they use. Some users have found that using a subscription plan can be more cost-effective for heavy usage. However, for many developers, the pay-as-you-go model of our API is more suitable. You only pay for what you use, and there are no monthly fees.
It is also worth noting that the pricing models of different vendors can change frequently. When reading about pricing on Reddit, it is important to remember that these are often discussions about current prices and may not reflect the latest changes. It is always a good idea to check the official documentation for the most up-to-date information. This ensures that you are making decisions based on accurate data.
Finally, some users have discussed the importance of estimating token usage before starting a project. This can help you budget effectively and avoid unexpected costs. Our API provides a calculator to help you estimate costs based on your expected workload. This is a valuable tool for developers who want to plan their projects carefully. By understanding the costs involved, you can make informed decisions about which API to use.
Testing and Troubleshooting Your Integration
Once you have integrated the API, it is important to test your implementation thoroughly. Start with simple requests to ensure that the API is responding correctly. You can use the trial credit to test your integration without worrying about costs. This allows you to verify that your SDK is configured correctly and that your requests are being processed as expected.
If you encounter any issues, check the error messages returned by the API. A 401 error indicates an invalid key, while a 402 error indicates that you have no credit left. A 429 error indicates that you have hit the rate limit. These error messages can help you diagnose and resolve issues quickly. You can also log the errors and monitor them to identify any patterns.
It is also important to test the different parameters and features of the API. Try using different temperatures, top_p values, and stop sequences to see how they affect the output. Test the function calling and JSON mode features to ensure that they are working as expected. This will help you get the most out of the API and ensure that your application is performing optimally.
Finally, consider using streaming to receive responses in real-time. This can help you manage rate limits more effectively and provide a better user experience. You can process the response as it comes in, rather than waiting for the entire response to be generated. This can reduce the time your application spends waiting for responses, which can help you stay within the rate limit. By testing these features, you can ensure that your integration is reliable and reliable.
Frequently asked questions
How do I get an API key?
You can sign up using Google or an email and password. Your key is shown immediately after signup, so you can copy it right away. This key is used to authenticate your requests to the endpoint.
What is the pricing model?
We charge $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. You pay by real token usage, and errors are free. There are no monthly fees or subscriptions.
Can I use my own credit card?
No, we only accept crypto payments. You can top up with USDT on TRC20 or USDC on Base. The minimum top-up is $20, and the maximum is $500.
Does the API support image generation?
No, our API is text-in, text-out only. We do not support image, audio, video, or embedding generation. If you need these features, you may need to use a different service.