DocsGetting started

Quickstart

From zero to a tuned, served model. Sign in with Google (the studio never stores a password). That Google account is your tenant — jobs, files, and API keys stay inside it. Scripts then use a key you mint under that tenant.

1. Sign in and create an API key

Open the studio and sign in with Google. Then create a key under Studio → API keys. Anonymous key minting is disabled when Google sign-in is on.

curl
# After you copy the key from the studio:
export FT_KEY=sk-ft-…

curl -H "Authorization: Bearer $FT_KEY" https://ragnarok-ai.com/v1/models

2. Pick a method and upload a dataset

GET /v1/fine_tuning/methods returns every method (Hugin, Munin, LoRA, …), its CSV columns, and the hyperparameter schema with defaults, min, and max. Match your file to the dataset format for your task before uploading it.

curl
curl -X POST https://ragnarok-ai.com/v1/fine_tuning/files \
  -H "Authorization: Bearer sk-ft-…" \
  -F "method=hugin" -F "role=train" -F "[email protected]"

# → { "id": "a1b2c3…", "row_count": 1200, "train_rows": 1080, "test_rows": 120 }

3. Launch a tuning job

Choose the method, optional training hyperparameters, GPU, and the file id from step 2. Unknown hyperparameter keys are rejected.

curl
curl -X POST https://ragnarok-ai.com/v1/fine_tuning/jobs \
  -H "Authorization: Bearer sk-ft-…" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "hugin",
    "training_file": "a1b2c3…",
    "model": "qwen2.5-0.5b",
    "gpu_id": "t4-small",
    "hyperparameters": {
      "sft_steps": 200,
      "rl_steps": 80,
      "learning_rate": 2e-5
    },
    "benchmarks": ["heldout"],
    "run_name": "my-first-run"
  }'

# → { "id": "d4e5f6…", "status": "queued", "method": "hugin" }

4. Watch progress and read results

Poll GET /v1/fine_tuning/jobs/{id} for status, stage and progress. When status is done, GET /v1/fine_tuning/jobs/{id}/result returns scores and the served model id ft:{id}. You only ever see your own jobs.

5. Serve the tuned model

Open the job report to find the available artifact and inference options. For a model listed by your serving endpoint, use its ID in a chat completion. A verified Mjolnir merchant adapter has its own chat controls on the job page.

curl
curl https://ragnarok-ai.com/v1/chat/completions \
  -H "Authorization: Bearer sk-ft-…" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ft:d4e5f6…",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
Point any common chat SDK at /v1 (or /api/v1) with your Ragnarok AI key. Agents can skip curl entirely — connect MCP at /docs/mcp with the same key.