Nucleus Sign in Create account

API

Nucleus speaks the OpenAI chat-completions format, so any OpenAI client library or tool works with it.

Getting started

  1. Sign in and create a key under Settings → API keys. It starts with nk_ and is shown only once.
  2. Send it as a bearer token: Authorization: Bearer nk_…
  3. Base URL: https://nucleus-ai.de/api/v1

Treat a key like a password. Anyone with it can use your daily API tokens. Revoke it in your settings if it leaks.

Examples

curl

curl https://nucleus-ai.de/api/v1/chat/completions \
  -H "Authorization: Bearer $NUCLEUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages": [{"role": "user", "content": "Why is the sky blue?"}], "max_tokens": 200}'

Python (openai library)

from openai import OpenAI

client = OpenAI(base_url="https://nucleus-ai.de/api/v1", api_key="nk_…")
stream = client.chat.completions.create(
    model="nucleus",
    messages=[{"role": "user", "content": "Why is the sky blue?"}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

Endpoints

EndpointWhat it does
GET /api/v1/modelsThe current model: version, context length (max_model_len) and whether it can see images.
POST /api/v1/chat/completionsA chat answer, as JSON or streamed (server-sent events).

Chat parameters

ParameterMeaning
messagesThe conversation: system, user, assistant and tool messages (up to 500).
max_tokens · max_completion_tokensLength limit of the answer (default 1024, at most 8192 and what is left of your daily tokens).
streamtrue streams the answer token by token. The last chunk carries usage.
temperature · top_p · top_k · seedSampling: randomness (0–2, default 0.7), nucleus sampling (default 0.95), top-k (0 = off), reproducible results.
stopUp to 4 strings that end the answer. They are not included in it.
frequency_penalty · presence_penalty−2 to 2. Positive values make repetitions less likely.
repetition_penalty1–2 (vLLM style). Above 1 discourages recently used tokens.
tools · tool_choiceFunction calling in the OpenAI format. tool_choice: auto, none, required or {"type": "function", "function": {"name": …}}. Calls are always valid JSON for one of your functions with the required arguments – the server only lets the model write what fits the schema.
response_format{"type": "json_object"} or {"type": "json_schema", "json_schema": {"schema": …}}: the answer is guaranteed to be JSON (matching the schema: types, properties, required, enum, items).
reasoning_effortnone (no thinking), low, medium, high – how long the model may think before it answers.

The model returns its thoughts, if it has any, as reasoning_content. Not supported yet, and refused with an error instead of being ignored: n greater than 1 and logprobs.

Limits and errors

  • 50,000 tokens per day and account (prompt and answer), reset at midnight (Berlin time). At most 120 requests per minute per key.
  • Errors use the OpenAI format: {"error": {"message": "…", "type": "…"}}.
    • 400 invalid request
    • 401 missing or revoked key
    • 403 account timed out, or the API is switched off
    • 429 limit reached
    • 503 model not available
  • The model is small and trained only on community texts, so its answers can be wrong. Don't use them for decisions that matter.