EN ▾
gemmaapi.ccgemmaapi.ccgemmaapi.ccgemmaapi.ccgemmaapi.ccgemmaapi.ccgemmaapi.ccgemmaapi.ccgemmaapi.ccgemmaapi.ccgemmaapi.ccgemmaapi.ccgemmaapi.ccgemmaapi.ccgemmaapi.ccgemmaapi.cc
Get API key

Integrating Gemma API: SDK Setup & Uncensored Settings

Developers often struggle to get raw, unfiltered responses from OpenAI-compatible endpoints. This guide shows you how to configure the Gemma API to bypass standard alignment filters. We cover SDK setup, parameter tuning, and payment methods for indie builders.

Abstract neural network visualization above a laptop screen representing API integration

Understanding the Uncensored Model

The core of our service is a single, uncensored open-weight text model. When you send requests, you must specify the model ID as uncensored. This model does not refuse lawful adult, fictional, security-research, or controversial topics. It provides text in and text out, making it ideal for developers who want raw output without extra alignment layers.

Unlike other providers that might filter content based on safety guidelines, our API focuses on delivering the model's natural predictions. The model is hosted and accessible via standard endpoints. You do not need to manage model routing or fine-tuning. The simplicity of having one model reduces complexity in your integration logic.

It is important to note that the model has a hard content limit. Requests involving sexual content with minors are refused. This is the only major restriction on content. All other topics, including sensitive or controversial ones, are generally processed. This makes the API suitable for creative writing, roleplay, and research applications.

When you integrate this model, you are choosing a service that prioritizes output fidelity over safety filtering. This is a deliberate design choice for developers who want full control over the conversation flow. You can implement your own filters on the client side if needed, but the API itself remains neutral.

SDK Initialization and Base URL

To start using the API, you need to initialize your SDK with the correct base URL. The base URL for our service is https://api.gemmaapi.cc/v1. This URL is used for all endpoints, including chat completions and model listing. Ensure that your SDK configuration points to this exact address to avoid connection errors.

Authentication is handled via API keys. You can sign up using Google or an email and password. Upon signup, your API key is shown immediately. This key is required for all requests. Store it securely in your environment variables. The key is tied to your account and allows access to the prepaid credit.

When configuring your SDK, set the model ID to uncensored. This tells the API which model to use for your requests. The API supports standard OpenAI-compatible endpoints. This means you can use existing SDKs for other providers with minimal changes. Just update the base URL and the model ID.

Remember that the API is an independent service. It is not an official product of any other company. Do not assume it shares the same limits or features as other providers. Always check the specific documentation for our service. The SDK setup is straightforward, but the underlying service has unique characteristics that you should be aware of.

Configuring Generation Parameters

The API supports several parameters to control the output of the model. You can adjust the temperature, top_p, stop sequences, and seed. These parameters allow you to fine-tune the randomness and determinism of the responses. The temperature controls the randomness of the output. A higher temperature results in more creative and varied responses.

The top_p parameter sets the cumulative probability threshold for token selection. This helps in controlling the diversity of the output. You can also specify stop sequences to halt generation at specific points. The seed parameter allows for reproducible results, which is useful for testing and debugging.

Additionally, you can use penalties to influence the likelihood of certain tokens. This can help in reducing repetition or encouraging specific styles. The API supports streaming over Server-Sent Events (SSE). This allows you to receive the output in real-time, which is beneficial for user experience in chat applications.

Function calling and JSON mode are also supported. This enables you to extract structured data from the model's output. These features are essential for building complex applications that require precise data extraction. By configuring these parameters correctly, you can optimize the API for your specific use case.

Payment and Credit Management

Our API uses a prepaid credit system. You can top up your account with crypto only. The accepted cryptocurrencies are USDT on the TRC20 network or USDC on the Base network. You can add any whole amount between $20 and $500. This flexibility allows you to manage your budget effectively without committing to a monthly subscription.

There is no monthly fee or subscription required. The prepaid credit never expires, so you can use it whenever you need it. Errors and refusals are free, meaning you are only charged for successful token usage. This is a significant advantage for developers who want to test the API without incurring costs for failed requests.

The pricing is straightforward: $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. This pricing model is transparent and easy to calculate. You can estimate your costs based on the token count of your requests. The API charges by real token usage, ensuring you pay only for what you use.

When you sign up, you receive $0.50 of trial credit. This allows you to test the API without any initial investment. No credit card is needed for the trial. This is a great way to evaluate the service before committing to a larger top-up. The trial credit is sufficient for initial testing and integration.

Handling Errors and Rate Limits

When integrating the API, you should handle errors gracefully. The API returns specific HTTP status codes to indicate the status of your request. A 401 error indicates an invalid key, while a 402 error means you have no credit. A 429 error signifies that you have hit the rate limit.

The rate limit is set at 300 requests per minute per key. This is a generous limit for most applications. However, if you are sending a high volume of requests, you should monitor your usage to avoid hitting the limit. You can implement exponential backoff in your SDK to handle rate limits automatically.

It is important to check the status code of each response. If you receive a 401 error, verify that your API key is correct. If you receive a 402 error, you need to top up your credit. If you receive a 429 error, you should wait before sending more requests. This ensures a smooth integration process.

By handling errors correctly, you can provide a better user experience. You can display appropriate messages to your users based on the error code. This helps in debugging and troubleshooting issues. The API is designed to be reliable, but proper error handling is essential for a reliable application.

When This API Is Not the Right Choice

While our API is powerful for text generation, it may not be the right choice for everyone. If you need embeddings, image generation, audio, or video generation, this API does not support these features. It is a text-only API, so you will need to use other services for multimodal tasks.

Similarly, if you require OCR, fine-tuning, or model routing, this API does not offer these capabilities. You can only send requests to the single uncensored model. There is no option to route requests to different models or to fine-tune the model yourself. This simplicity is a feature for some, but a limitation for others.

If you need an SLA guarantee, certifications like SOC2 or HIPAA, or on-prem deployment, this API does not provide these. It is a hosted service with no guaranteed uptime percentage. You should check the documentation for the current status of these features. If you need enterprise-grade support, you may need to consider other options.

Also, if you prefer to pay with credit cards, PayPal, or bank transfers, this API may not suit you. We only accept crypto top-ups. This is a specific design choice that limits the payment methods available. If you need flexibility in payment, you might want to explore other providers. However, for raw text generation, our API is a strong candidate.

Community Insights and Best Practices

Developers in the community often discuss the best ways to use uncensored models. Many users find that online providers are overly moderating, which can lead to disappointing results. Our API addresses this by providing a model that does not refuse lawful topics. This is a common theme in discussions on Reddit, where users seek more freedom in their interactions.

Some users suggest using a system prompt to enhance the uncensored experience. While our model is already uncensored, a well-crafted prompt can further guide the model's behavior. This is a common practice among developers who want to ensure the model stays on topic. You can experiment with different prompts to find the best fit for your application.

Another common topic is the comparison between local and online models. Users often compare the performance of local models like Qwen or Llama with online APIs. Our API offers a convenient alternative for those who do not want to manage local hardware. It provides the benefits of an uncensored model without the need for a powerful GPU.

Finally, users often ask about the best parameters for uncensored generation. While there is no one-size-fits-all answer, experimenting with temperature and top_p can yield better results. The community shares tips on how to balance creativity and coherence. By following these best practices, you can get the most out of the API.

Frequently asked questions

How do I get an API key?

You can sign up using Google or an email and password. The API key is shown immediately after signup. You can then use this key to authenticate your requests.

What payment methods are accepted?

We only accept crypto top-ups. You can pay with USDT on the TRC20 network or USDC on the Base network. Credit cards and PayPal are not accepted.

Is there a free trial?

Yes, every new account gets $0.50 of trial credit. No credit card is needed to start. This allows you to test the API before topping up.

What is the rate limit?

The rate limit is 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. You should implement backoff strategies in your SDK.