MaaS AHOP Docs
Home Demo llms.txt
Language EN KO JA

Working with a coding agent? Copy the Markdown version of this page or hand over the full docs bundle.

Open llms-full.txt
API Reference

API Reference

This page lists the hosted MaaS endpoints that matter for onboarding and runtime use.

This page lists the hosted MaaS endpoints that matter for onboarding and runtime use.

Onboarding endpoint

POST /api/v1/billing/maas/checkout-session

Create the hosted checkout session.

curl -X POST https://maas.nunchiai.com/api/v1/billing/maas/checkout-session \
  -H 'Content-Type: application/json' \
  -d '{
    "company_name": "Acme Studio",
    "admin_email": "[email protected]",
    "pricing_model": "enterprise_usage",
    "service_source": "maas-enterprise"
  }'
{
  "checkout_session_id": "cs_test_123",
  "url": "https://checkout.stripe.com/c/pay/cs_test_123",
  "success_url": "https://maas.nunchiai.com/billing/maas/success?checkout_session_id={CHECKOUT_SESSION_ID}",
  "cancel_url": "https://maas.nunchiai.com/billing/maas/cancel",
  "service_source": "maas-enterprise"
}

Errors

  • 400 invalid request body
  • 402 billing paused
  • 500 Stripe price configuration missing

Runtime endpoints

All runtime calls use:

  • Authorization: Bearer <API_KEY> or x-api-key: <API_KEY>
  • X-Workspace-Id: <WORKSPACE_ID>

POST /v1/anchors

Create a reusable memory scope.

curl -X POST https://maas.nunchiai.com/v1/anchors \
  -H "Authorization: Bearer mk_maas_example" \
  -H "X-Workspace-Id: acme-prod" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Character Pair",
    "type": "chat-log",
    "metadata": {
      "lane": "user-42:aria",
      "service_source": "enterprise-tutor"
    }
  }'
{
  "anchor_id": "be2d5afd-8ec2-44d1-bfb3-e1eb4cb2c9b1",
  "name": "Character Pair",
  "type": "chat-log",
  "metadata": {
    "lane": "user-42:aria",
    "service_source": "enterprise-tutor"
  }
}

POST /v1/atoms

Store durable memory inside an anchor.

curl -X POST https://maas.nunchiai.com/v1/atoms \
  -H "Authorization: Bearer mk_maas_example" \
  -H "X-Workspace-Id: acme-prod" \
  -H 'Content-Type: application/json' \
  -d '{
    "anchor_id": "be2d5afd-8ec2-44d1-bfb3-e1eb4cb2c9b1",
    "content": "User likes rainy jazz playlists.",
    "source_type": "prd",
    "metadata": {
      "atom_type": "preference",
      "user_external_id": "user-42"
    },
    "chunking": { "enabled": false }
  }'
{
  "atom_ids": ["dc3b98c4-c6af-478f-88c2-6582d95d5a11"],
  "stored_count": 1,
  "service_source": "enterprise-tutor"
}

POST /v1/recall

Recall memory for a single anchor.

curl -X POST https://maas.nunchiai.com/v1/recall \
  -H "Authorization: Bearer mk_maas_example" \
  -H "X-Workspace-Id: acme-prod" \
  -H 'Content-Type: application/json' \
  -d '{
    "anchor_id": "be2d5afd-8ec2-44d1-bfb3-e1eb4cb2c9b1",
    "query": "What music does the user like?",
    "limit": 5
  }'
{
  "items": [
    {
      "atom_id": "dc3b98c4-c6af-478f-88c2-6582d95d5a11",
      "content": "User likes rainy jazz playlists.",
      "score": 0.9121
    }
  ],
  "session_id": "e6d339b8-a71d-4413-88ab-cbd982cf9765"
}

POST /v1/feedback

Reinforce memory that actually influenced the output.

curl -X POST https://maas.nunchiai.com/v1/feedback \
  -H "Authorization: Bearer mk_maas_example" \
  -H "X-Workspace-Id: acme-prod" \
  -H 'Content-Type: application/json' \
  -d '{
    "session_id": "e6d339b8-a71d-4413-88ab-cbd982cf9765",
    "success": true,
    "used_memory_atom_ids": ["dc3b98c4-c6af-478f-88c2-6582d95d5a11"]
  }'
{
  "ok": true
}

Memory convenience endpoints

POST /v1/memory/ingest

Bulk ingest memory with user_external_id and session_id.

POST /v1/memory/recall

Recall memory for end-user products, including enterprise-tutor.

POST /v1/memory/hydrate

Return bounded prompt context from stored memory.

Common runtime errors

  • 400 invalid key or missing workspace header
  • 402 billing blocked
  • 403 access policy denied
  • 404 anchor not found
  • 429 rate limited