viivaev logo
viivaevPOWER SI ENGINE v3.0API DOCSRoot API /api-docs

PT / CT · Power Transformers · Switchgear 9×6 Matrix Engine

Developer Documentation

viivaev SI Engine REST API Reference

High-performance, edge-accelerated REST endpoints for compiling dynamic system instructions, querying the 54-strategy matrix, and triggering Gemini 3.8 Flash generation.

Available REST Endpoints

Base URL: https://viivaev.com
GET/api/v1/system-instruction
SI Engine Core

Compile & Dispatch Dynamic System Instruction

Dynamically compiles an authoritative electrical engineering System Instruction and 9-module structured strategy optimized for Google Gemini API based on the 9-digit Rubik's code and target power equipment parameter.

Query Parameters
ParameterTypeRequiredDescriptionDefault
codestringYes9-digit numeric state code (each digit 1-6), e.g. 645341264645341264
articleTitlestringOptional[Mutually Exclusive A] Engineering white paper title. Dispatches 1500-word in-depth white paper directive (exclusive with productName).0.2S Accuracy & Ferroresonance Suppression: Full-Lifecycle Deconstruction
productNamestringOptional[Mutually Exclusive B] Power equipment model and specifications. Dispatches 600-word product datasheet directive (exclusive with articleTitle).10kV Epoxy Resin Cast Potential Transformer (JDZ-10 / IEC 61869-3)
langstringOptionalTarget language: "en" (default) or "zh" (optional)en
Code Examples
curl -X GET "https://viivaev.com/api/v1/system-instruction?code=645341264&lang=en"
GET/api/v1/matrix
Matrix & Strategy

Get 9×6 Matrix Specification & Full 54 Strategies Dictionary

Exports all 9 electromagnetic engineering functional modules and the complete 54-strategy dictionary with color codes, normal vector mappings, and bilingual descriptions.

Code Examples
curl -X GET "https://viivaev.com/api/v1/matrix"
POST/api/v1/matrix/validate
Matrix & Strategy

Validate 9-Digit Code & Resolve Module Mapping

Validates whether a given code conforms to the 9-digit format (each digit 1-6) and returns the full 9-module selected variant breakdown.

Code Examples
curl -X POST "https://viivaev.com/api/v1/matrix/validate" \
  -H "Content-Type: application/json" \
  -d '{"code": "645341264"}'
POST/api/v1/matrix/random
Matrix & Strategy

Generate Seeded Random 9-Digit Matrix Code

Generates a pseudo-random 9-digit permutation, optionally pin-fixing specific module indices to predefined variants.

Code Examples
curl -X POST "https://viivaev.com/api/v1/matrix/random" \
  -H "Content-Type: application/json" \
  -d '{"fixed": {"1": 6}}'
POST/api/generate
Text Generation

Gemini 3.8 Flash End-to-End Document Generation

Direct server-side Google Gemini 3.8 Flash SDK call passing the compiled System Instruction and target parameters to generate bidding-grade technical documentation.

Code Examples
curl -X POST "https://viivaev.com/api/generate" \
  -H "Content-Type: application/json" \
  -d '{
    "systemInstruction": "...",
    "productName": "10kV JDZ-10",
    "language": "en"
  }'
GET/api/health
System

System Health & Engine Status Check

Returns Next.js App Router engine operational status, deployment environment, and live server timestamp.

Code Examples
curl -X GET "https://viivaev.com/api/health"