Register your first model

Package a model as a small Python project, test it on your machine, and publish it to Kainguru with one command. The platform rebuilds your source, runs one test prediction and lists the model in the catalogue, where anyone (or only you) can run and fine-tune it.

Before you start

  • An account onapp.kainguru.com(access is by request: e-mail [email protected]).
  • Registration is in a controlled rollout: your account needs the model-registrar role. Ask for it at[email protected]with the e-mail you signed up with.
  • Linux or macOS (Windows: inside WSL 2), Python 3.10 or newer, and Docker for the local build and test.

1. Create an API key

In the web app openApplications, open (or create) an application, then API keys → Create key. The key is shown once: copy it now and keep it in a secret manager. Revoke it on the same page if it leaks.

2. Install the CLI

sh
curl -fsSL https://kainguru.com/install.sh | sh

It installs the kainguru command for your user only (through pipx when you have it, else into a private virtualenv in ~/.kainguru/venv linked from ~/.local/bin), and never needs root. Prefer to see what runs first? The script is athttps://kainguru.com/install.shand the wheel athttps://kainguru.com/cli/kainguru_cli-0.1.0-py3-none-any.whl; python3 -m pip install <wheel url> is the same thing by hand. Check with:

sh
kainguru --version

3. Sign in

sh
kainguru login

Paste the key when asked; it is checked against the API, stored readable by you alone, and never printed. On a server or in CI set KAINGURU_API_KEY instead and skip login.kainguru logout forgets the key; revoking it in the app ends it.

4. Write the model

A project is a folder with three files plus a banner. Create hello-kainguru/with:

Build file

Names the Python version, whether the model needs a GPU, and the predictor class. Save it under the file name on the first line of the sample.

yaml
# cog.yaml, the file name the build tooling requires
build:
  gpu: false
  python_version: "3.12"
predict: "predict.py:Predictor"

predict.py

python
from cog import BasePredictor, Input


class Predictor(BasePredictor):
    def setup(self):
        # Load weights here; it runs once when the model starts.
        self.prefix = "hello"

    def predict(self, text: str = Input(description="Text to greet")) -> str:
        return f"{self.prefix} {text}"

README.md

The model's page in the catalogue, written in Markdown.

markdown
# Hello Kainguru

Returns a greeting for the text you send. A minimal example model.

A PNG, JPEG or WebP shown in the catalogue (1200 × 630 works well). Download a sample with:

sh
curl -fsSLo banner.png https://kainguru.com/docs/sample-banner.png

setup() loads your weights once; predict() runs per request, its arguments are the model's inputs (typed, withInput(...) for descriptions and defaults, written as literals) and its return value the output (str, int, float, bool, a file Path, or a list of those). Everything in the folder is uploaded, except .git, caches and virtualenvs: keep weights out of it and download them insetup(), and list anything else to exclude in.kainguruignore. The source may be at most 100 MiB.

5. Build and test on your machine

sh
cd hello-kainguru
kainguru build
kainguru test -i text=world

build creates the same image the platform will build;test starts it and makes one prediction, printing hello world. A GPU model is tested only where Docker can see an NVIDIA GPU; elsewhere the test is skipped and the platform runs it after you push.

6. Publish

sh
kainguru push --name HELLO_KAINGURU --category text-generation \
  --banner banner.png --readme README.md \
  --description "Returns a greeting for the text you send."

Names are upper-case letters, digits and single underscores (MY_MODEL_V2), at most 64 characters, unique on the platform. Categories: text-generation, image-generation, image-editing, video-generation, video-editing, audio-generation, speech-recognition, vision-analysis, embeddings, 3d-generation, utilities. Add--private to keep the model to yourself (public is the default once it is registered), --tag for catalogue tags.

push registers the model, uploads the banner, README and source, starts the platform's build and prints the model id. Follow it:

sh
kainguru status <MODEL_ID> --wait

PENDING → building → REGISTERED (or FAILED, with the reason when the API has one). A CPU model is live in a few minutes, a GPU model in about twenty. Then it is on your dashboard and in the catalogue; run it from its page, or from code with the API reference on that page.

GPU models

Set build.gpu: true in the build file and pass--gpu-class mig1g, mig2g ormig3g (an A100 slice with 10, 20 or 40 GB of memory) to push.

Limits

One registration in progress at a time, and up to 10 models per account during the rollout;kainguru models lists yours.

sh
kainguru models

Use Kainguru from Claude, ChatGPT or Grok

Kainguru is an MCP server at https://mcp.kainguru.com/mcp. Connect it and your assistant can search the catalogue, read a model's inputs, run it, poll or cancel the run, and upload files for it, all billed to your own wallet. Sign in with your Kainguru API key as the bearer token (step 1 above); any MCP client that can send an Authorization header works today.

Claude Code

sh
claude mcp add --transport http kainguru https://mcp.kainguru.com/mcp \
  --header "Authorization: Bearer <your Kainguru API key>"

Then ask, for example: "find a speech-to-text model and transcribe this file", or "run KOKORO on this sentence and give me the audio".

Cursor, VS Code, Windsurf and other MCP clients

Add this to the client's MCP settings (for Cursor: .cursor/mcp.json; for VS Code: .vscode/mcp.json with "servers" instead of"mcpServers").

json
{
  "mcpServers": {
    "kainguru": {
      "url": "https://mcp.kainguru.com/mcp",
      "headers": { "Authorization": "Bearer <your Kainguru API key>" }
    }
  }
}

Claude Desktop

Claude Desktop does not send custom headers itself, so route it through themcp-remote bridge in claude_desktop_config.json:

json
{
  "mcpServers": {
    "kainguru": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.kainguru.com/mcp",
               "--header", "Authorization:Bearer <your Kainguru API key>"]
    }
  }
}

From the Anthropic, OpenAI or xAI APIs

Pass the server as a remote MCP tool. Anthropic Messages API (headeranthropic-beta: mcp-client-2025-04-04):

json
{
  "model": "claude-sonnet-5-5",
  "max_tokens": 1024,
  "messages": [{ "role": "user", "content": "Transcribe this recording with Whisper: https://example.com/call.wav" }],
  "mcp_servers": [{
    "type": "url",
    "url": "https://mcp.kainguru.com/mcp",
    "name": "kainguru",
    "authorization_token": "<your Kainguru API key>"
  }]
}

OpenAI Responses API (the xAI API accepts the same tool shape):

json
{
  "model": "gpt-5",
  "input": "Generate a 768x768 picture of a lighthouse at dusk with SDXL_BASE",
  "tools": [{
    "type": "mcp",
    "server_label": "kainguru",
    "server_url": "https://mcp.kainguru.com/mcp",
    "headers": { "Authorization": "Bearer <your Kainguru API key>" },
    "require_approval": "never"
  }]
}

What the assistant can do

  • kainguru_search_models, kainguru_get_model,kainguru_trending_models, kainguru_list_categories: browse the catalogue and read a model's inputs.
  • kainguru_run_model, kainguru_get_execution,kainguru_cancel_execution: start a run, wait for it (a cold model can take several minutes; the assistant polls with the execution id), read text inline or files as links.
  • kainguru_upload_file, kainguru_get_file: put a file (an https URL up to 20 MB, or base64 up to 5 MB) into your private storage so a model can use it.

The connector pages of claude.ai, ChatGPT and grok.com need OAuth sign-in rather than an API key; that is the next step on our side, and the same server will appear there once it lands. Until then use one of the clients above.

If something fails

  • 401: the key was not accepted — run kainguru login again. 403: the account has no model-registrar role yet.
  • The push stopped after registering (network, storage): run the same command with--resume <MODEL_ID>; it uploads the source again and starts the build. The same command rebuilds a FAILED model after you fix the project.
  • kainguru --help and kainguru push --help list every option. Questions:[email protected].