EN ▾
Get API key

API Documentation for uncensored model

Get started with our uncensored LLM API in minutes using standard OpenAI SDK code. Authenticate with your key and send requests to our base URL to receive unrestricted text generation.

Authentication and base URL

Use your API key for every request sent to our base URL.

Chat Completions endpoint

Send messages to POST /v1/chat/completions to generate text responses. The model accepts standard message structures and returns completions without content refusals for lawful adult use.

Only the uncensored model is available; we do not route between vendors or offer embeddings and image generation.

curl https://api.glmapikeys.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "what is the current exchange rate for usd to jpy"}]
  }'

Ensure your payload includes the model ID and your message array to receive a response.

Model listing endpoint

Retrieve available models via GET /v1/models. This endpoint confirms the model ID uncensored is ready for requests.

The response lists the model details, ensuring your client can verify compatibility before sending larger payloads.

Parameters: temperature, top_p, seed

Control generation randomness using temperature, top_p, and seed. These parameters allow you to adjust creativity and reproducibility.

Set temperature for variance, top_p for nucleus sampling, and seed for deterministic outputs. These settings work alongside stop sequences and penalty values.

from openai import OpenAI

client = OpenAI(base_url="https://api.glmapikeys.com/v1", api_key="YOUR_KEY")

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)

Configure these in your SDK client to fine-tune the output style.

Streaming and usage data

Enable streaming via SSE to receive tokens in real-time. The final chunk includes usage data, reporting input and output token counts.

Streaming helps reduce perceived latency for long responses. Ensure your client handles the final chunk correctly to access billing metrics.

stream = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Tell the story in second person."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Parse the stream to integrate the response into your application interface.

Error handling and limits

Handle specific errors: 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. The context window is 100,000 tokens total, with a max output of 16,000 tokens per request.

Requests exceeding 8 MB or 300 per minute will trigger limits. Errors and refusals do not consume credit.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.glmapikeys.com/v1", apiKey: process.env.API_KEY });

const resp = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);

Implement retry logic for 429 errors and check your balance for 402 responses.

Common questions

What is the base URL for the GLM API?

The base URL is HTTPS://api.glmapikeys.com/v1. Use this endpoint with the official OpenAI SDKs or any compatible client by updating the base URL configuration.

Which payment methods do you accept?

Crypto only: USDT on TRC20 or USDC on Base, any whole amount from $20 to $500. Bonus credit applies from $50.

What are the rate limits and context window?

You are limited to 300 requests per minute per key and 8 concurrent requests. The context window is 100,000 tokens, with a maximum output of 16,000 tokens per request.

Get your key instantly

Sign up, copy the token, update the base URL. That is the entire process.

Get API keyView documentation