Use this guide when an AI agent needs to onboard without browser prompts.
Prerequisites
- Base URL:
https://apigcp.trynia.ai/v2
nia-wizard installed or runnable with npx.
Flow Overview
New Users
- Create account with
POST /v2/auth/signup — returns a read-only API key and sends a 6-digit verification code to email.
- Verify the account with
POST /v2/auth/verify — upgrades the API key to full access.
- Install Nia skill in non-interactive mode using
nia-wizard skill add.
Returning Users
- Request a verification code with
POST /v2/auth/login.
- Exchange the code for a full-access API key with
POST /v2/auth/login/verify.
Create Account (API-First)
Response includes:
api_key (read-only until verified)
api_key_id
user_id
organization_id
verified (false)
Verify Account
Use the 6-digit code sent to your email:
On success, the API key is upgraded from read-only to full access.
Returning User Login (Passwordless)
Step 1: Request verification code
Step 2: Exchange code for API key
Response includes a fresh api_key with full access.
Install Nia Skill Non-Interactively
Optional target pinning:
End-To-End Script (Headless)
Handle credentials and generated API keys as secrets. Do not print them to shared logs.
Reference
See API Reference for these endpoints:
POST /auth/signup
POST /auth/verify
POST /auth/login
POST /auth/login/verify
POST /auth/resend-code