mukiai
Sign inBeta access
FROM ZERO TO YOUR FIRST RESPONSE

Built to feel familiar.

Your existing OpenAI SDK. A new base URL. That’s the starting point.

Get an API key
QUICK START

A few lines. Plenty of possibility.

Get a private-beta account from the administrator, add verified credit, and create an API key. Install the OpenAI Python SDK with pip install openai, then:

Python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["MUKI_API_KEY"],
    base_url="https://ai.muki.co.ke/v1",
)

response = client.chat.completions.create(
    model="muki-coder",
    messages=[{"role": "user", "content": "Write a Python binary search."}],
    max_tokens=1024,
)
print(response.choices[0].message.content)

Set MUKI_API_KEY in your server environment. Never embed a secret key in browser JavaScript, a mobile app, screenshots, or a public repository.

cURL · POSIX shell
curl https://ai.muki.co.ke/v1/chat/completions \
  -H "Authorization: Bearer $MUKI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "muki-coder",
    "messages": [{"role": "user", "content": "Hello, Muki!"}],
    "max_tokens": 256
  }'

One key for each application.

All API endpoints require Authorization: Bearer YOUR_MUKI_KEY. Keys are shown once and stored as SHA-256 hashes. Each has a lifetime spending cap; you can revoke a key at any time.

GET/v1/modelsList available models
POST/v1/chat/completionsGenerate a completion

The public model ID is muki-coder. Other OpenAI API endpoints are not implemented.

Text, conversations, and tool calls.

Supported parameters: messages, max_tokens (or max_completion_tokens), temperature, top_p, stop, seed, tools, tool_choice, and response_format, subject to Ollama’s support. Only one completion per request is supported.

Use standard JSON function tools. The model returns tool_calls; your application validates and executes the tool, then sends its result back. Muki AI does not execute customer tools.

Streaming in this beta
stream: true returns OpenAI-compatible SSE chunks, including tool calls and [DONE]. Generation is buffered until completion and settlement, so this is not live token-by-token streaming. Set stream_options.include_usage: true for a final usage chunk.

The context window is 65,536 tokens, with up to 8,192 output tokens per request. Ollama validates the fully rendered prompt with the model’s tokenizer, including tools. There is no byte-based prompt estimate. Automatic input truncation and context shifting are disabled; actual overflow is rejected rather than silently discarding messages.

For OpenCode, use an OpenAI-compatible provider with your Muki base URL, model ID muki-coder, tools enabled, a 65,536 context limit, and a 8,192 output limit. Start a new conversation after changing model limits.

Credit first. Actual usage second.

Input: $1.00/million tokens. Output: $3.00/million tokens. These are provisional beta rates, not validated profitability targets.

  1. Available balance must cover a conservative maximum request reservation.
  2. The hold and API-key budget check are atomic, including concurrent requests.
  3. When trustworthy usage returns, actual input and output are charged and the unused hold is released.
  4. Failed requests are not charged. Missing or inconsistent usage holds the reservation for administrator review.

Charges are rounded up to the nearest $0.000001 per request. Non-stream responses include a muki object with request ID and USD cost. Playground requests use the same balance and pricing. A reservation covers the full input context plus the requested output maximum; the final charge uses actual token counts.

Current limits: 10 admitted requests per minute per account, 1 concurrent request across the platform, a 1 MB request body, and a 300-second model timeout. New accounts start at $0. No automatic credit purchases are enabled.

Errors that tell you what to do next.

HTTPMeaningNext step
400 / 413Invalid or oversized requestShorten or correct the request.
401Missing, invalid or revoked keyCheck your Bearer token.
402Insufficient credit or key budgetAdd credit or use another budgeted key.
429Rate limit or GPU busyBack off and respect Retry-After.
502Invalid usage or gateway errorCheck usage; contact admin for held reservations.
503GPU offline or timeoutRetry later; no completed response was charged.

Retries are new billable requests. This beta does not implement idempotency keys. Avoid retrying a completed or ambiguously disconnected request blindly; inspect your usage first.

Know where your request goes.

Muki AI stores account details, hashed keys, payment references, token usage and billing metadata. Prompts and responses are not stored in its database. The GPU host processes your messages, and infrastructure providers may have their own logging policies. Do not send sensitive production data until you have reviewed those arrangements.

This is a single-GPU private beta with no availability SLA, automated payment collection, password recovery, or email verification. Account verification, abuse controls, provider policies, backups and operating economics must be addressed before a public commercial launch.