All docs

LiteLLM with 6bee.ai

LiteLLM reaches 6bee.ai through its OpenAI-compatible route: prefix the model with openai/ and pass the base URL.

Before you start

Create an account with a verified email address, add prepaid balance, then create a key on the console's API keys page. Keep the key secret.

Model IDs are listed in the console and returned by GET https://api.6bee.ai/v1/models. Replace <model id> with one of them.

Python SDK

app.py
from litellm import completion   # pip install litellm

reply = completion(model="openai/<model id>", api_base="https://api.6bee.ai/v1",
                   api_key="<your key>", max_tokens=2048,
                   messages=[{"role": "user", "content": "Explain this stack trace"}])
print(reply.choices[0].message.content)

The openai/ prefix selects the OpenAI-compatible route. It is not sent to the API.

LiteLLM proxy

config.yaml
model_list:
  - model_name: 6bee
    litellm_params:
      model: openai/<model id>
      api_base: https://api.6bee.ai/v1
      api_key: os.environ/SIXBEE_API_KEY

Start it with litellm --config config.yaml. Clients of the proxy then ask for the model 6bee.

Everything behind the proxy shares one 6bee.ai key, balance and set of limits. The Terms do not allow reselling access or sharing keys without permission.

Limits

Context
Input plus output up to the model’s window: 128K to 1M tokens, depending on the model.
Output
max_tokens up to the model’s output cap: 16,384 to 131,072, depending on the model. Larger values are lowered to the cap, not rejected. If omitted: 8,192 to 32,768.
Input tokens
1,000,000 uncached tokens per rolling minute. Cache hits don’t count.
Requests
60 per minute.
Concurrency
2 requests at a time.
Request body
Up to 8 MiB. n must be 1.

Over a limit you get HTTP 429 with Retry-After, or 400 when a request can’t fit the context. A lowered output cap is reported in the X-6bee-Output-Cap response header; on /v1/messages a thinking budget is lowered with it.

Troubleshooting

HTTP 401
The key is missing or wrong. Copy it again from the console, without spaces or quotes.
Model not found
The model ID does not match. List the valid IDs with GET /v1/models or check the console.
HTTP 429
You are over a per-account limit (requests, input tokens or concurrency). The Retry-After header says how long to wait.
HTTP 400 on long sessions
The request no longer fits the model’s context window. Compact or clear the conversation, or switch to a model with a larger window.
Request rejected for balance
Each request first reserves its input plus max_tokens of output. Top up, or lower max_tokens.