API
/niua/docs/api
Quickstart
Create an API key
Keys live in Settings → Developer. Each key starts with niua_live_… and authorizes one client.
Check your first file
Upload, then one check. On fail, fix each failure and check again; on pass, keep the signed receipt. Checks are free.
# 1. Upload the file you built. The response carries r2_key.
curl -X POST https://api.ohao.tech/api/v1/upload \
-H "Authorization: Bearer $NIUA_API_KEY" \
-F "file=@lantern.glb;type=model/gltf-binary"
# 2. Check it against a contract: verdict, failures[] with a fix each, receipt on pass.
curl -X POST https://api.ohao.tech/api/v1/check \
-H "Authorization: Bearer $NIUA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"artifact":{"key":"<r2_key>"},"contract":"glb.prop@1"}'(Optional) Plug it into your AI agent
Connect by URL and sign in with Google or GitHub, no key to paste. For clients without native remote MCP support, use the stdio bridge.
https://mcp.ohao.tech/mcpYour agent can now list contracts, check what it builds with check_artifact, and verify receipts. Hosted media generation is a separate, legacy paid add-on, and NIUA does not generate images.