v3.0

JriGPT API Documentation

JriGPT is a multi-agent orchestration platform that combines multiple AI models into a unified inference endpoint. It's fully compatible with the OpenAI API specification — use your existing SDKs and tools.

OpenAI Compatible Gemini CLI Compatible Streaming Support Multi-Agent

Base URL

https://jrigpt.my.id/api/v1

All API requests require an API key passed via the Authorization: Bearer header.


Architecture

JriGPT uses a hybrid agentic backbone. Two primary processing modes are available depending on the model you select.

Agent Mesh

Default mode. Dynamically routes to specialist sub-agents (Coder, Researcher, etc.) only when needed for token efficiency.

model: "jrigpt"

Singularity (MoA)

Mixture-of-Agents mode. Synchronizes 5 models simultaneously, then synthesizes results via an aggregator for maximum accuracy.

model: "jrigpt-singularity"


Available Models

JriGPT provides a rich ecosystem of core system models, collective intelligence architectures, and specialized agents. Point your API calls to these exact identifiers.

GET /v1/models

1. Core & System Models

jrigpt (JriGPT Standard Agent Mesh)
All Tiers

The default intelligent mesh. Automatically routes user queries dynamically to specialists (e.g., Coder, Researcher) only when necessary, saving compute costs while optimizing quality.

jrigpt-universal (JriGPT Universal)
All Tiers

Fast, general-purpose universal AI model. Powered directly by the custom-tuned JriGPT universal inference framework. Excellent for everyday conversation, direct explanations, and standard copywriting without agent overhead. Displays in UI as **JriGPT (Universal)**.

jrigpt-2 (JriGPT-2 Premium Neural Node)
All Tiers

Premium, long-context reasoning model. Powered by the MiniMax-M3 Sparse Attention (MSA) architecture. Offers an ultra-deep **1,000,000 token context window** (1M)—ideal for full repository auditing, complex document translation, and maintaining massive conversational memory. Displays in UI as **JriGPT-2 (Premium)**.

jrigpt-brutal (JriGPT Brutal)
Enterprise / Admin

Raw, ultimate reasoning powerhouse model. Utilizes JriGPT's advanced reasoning steps framework with unrestricted thinking tokens enabled. Designed strictly for complex calculations, advanced multi-step logical reasoning, and extreme debugging. Displays in UI as **JriGPT (Brutal)**.

2. Collective Intelligence

jrigpt-singularity (JriGPT Singularity MoA)
Enterprise / Admin

Our highly advanced Mixture-of-Agents (MoA) system. Automatically invokes **5 specialized expert models simultaneously** to analyze and draft solutions, then feeds them to a central synthesis aggregator for a flawless, hyper-accurate response. Displays in UI as **JriGPT Singularity (Collective Brain)**.

3. Specialized Intelligent Agents

JriCoder (The Coding Specialist)
Pro & Admin

Specialized in script writing, backend/frontend engineering, algorithmic problem solving, code auditing, and refactoring across all popular programming languages.

JriResearcher (Deep Investigation & News)
Pro & Admin

Handles detailed academic research, historical deep dives, real-time news syntheses, fact-checking, and long-form comprehensive report compilation.

JriSocial (Social Engagement & Copywriting)
Pro & Admin

Optimized for high-converting marketing copy, social media threads, brand stories, script outlines, and viral community engagement posts.

JriAnalyst (Financial & Business Strategy)
Enterprise / Admin

Formulates economic models, performs deep corporate market analysis, structures financial sheets, and builds comprehensive business growth strategies.

JriSecurity (Cybersecurity & Penetration Audit)
Enterprise / Admin

Specialized in auditing source code vulnerabilities, explaining exploit scenarios, preparing server hardiness guides, and designing secure network architectures.

How to Use Any Specific Model via API

To request a specific model or agent, simply replace the model field in your JSON payload with the model's identifier.

cURL Example using JriGPT (Universal)
curl -X POST "https://jrigpt.my.id/api/v1/chat/completions" \
  -H "Authorization: Bearer jrigpt-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jrigpt-universal",
    "messages": [
      {"role": "user", "content": "Explain cryptocurrency in 2 sentences."}
    ],
    "temperature": 0.7
  }'

Dynamic Get Models Response Structure

{
  "object": "list",
  "data": [
    { "id": "jrigpt", "object": "model", "owned_by": "jrigpt_system" },
    { "id": "jrigpt-universal", "object": "model", "owned_by": "jrigpt_system" },
    { "id": "jrigpt-2", "object": "model", "owned_by": "jrigpt_system" },
    { "id": "jrigpt-brutal", "object": "model", "owned_by": "jrigpt_system" },
    { "id": "jrigpt-singularity", "object": "model", "owned_by": "jrigpt_collective" },
    { "id": "JriCoder", "object": "model", "owned_by": "jrigpt_agent", "description": "Expert software architect" }
  ]
}

Chat Completions

The primary endpoint. Fully compatible with OpenAI's chat completion format — works with the official Python SDK and LangChain.

POST /v1/chat/completions
Python
from openai import OpenAI

client = OpenAI(
    api_key="jrigpt-YOUR_API_KEY",
    base_url="https://jrigpt.my.id/api/v1"
)

response = client.chat.completions.create(
    model="jrigpt",
    messages=[{"role": "user", "content": "Hello"}],
    stream=True
)
cURL
curl -X POST "https://jrigpt.my.id/api/v1/chat/completions" \
  -H "Authorization: Bearer jrigpt-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jrigpt",
    "messages": [{"role": "user", "content": "Hello"}],
    "stream": true
  }'

Image Generation

Compatible with OpenAI's DALL-E image generation API format. Generate images from text prompts.

POST /v1/images/generations
cURL
curl -X POST "https://jrigpt.my.id/api/v1/images/generations" \
  -H "Authorization: Bearer jrigpt-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A futuristic cyberpunk city at night, 8k",
    "n": 1,
    "size": "1024x1024"
  }'

Tools & Capabilities

Built-in capabilities that enhance the agent's reasoning and output.

Smart JSON Fallback

Fail-safe that activates when LLMs fail to produce proper tool_call JSON format. The broker scans raw text output recursively to detect hidden tool instructions.

Autonomous Image Generation

When asked to generate visuals, agents autonomously invoke the Pollinations.ai extension tool and render images inline within the chat stream.


Corporate Vault (Local RAG)

Zero-leakage document ingestion and retrieval system. Process highly confidential corporate data safely.

100% File-less Processing

Uploaded PDFs are read entirely in RAM. Text is extracted, vectorized via sentence-transformers, and the original file is instantly destroyed. No data is ever saved to the hard drive.

Local Vector DB (Chroma)

Embeddings are stored locally in ChromaDB. RAG queries never leave your VPC. No third-party APIs (OpenAI, Anthropic) are used for embedding generation.

POST /v1/vault/upload
cURL
curl -X POST "https://jrigpt.my.id/api/v1/vault/upload" \
  -H "Authorization: Bearer jrigpt-YOUR_API_KEY" \
  -F "file=@/path/to/confidential.pdf" \
  -F "is_global=false"

Economy

Each completed agent task earns credit stored autonomously. Balances are synced in real-time.

GET /v1/economy/balance
Response
{
  "balance": 10.0000,
  "currency": "SOL",
  "status": "synced"
}

SDK Integration

JriGPT works with any OpenAI-compatible SDK. Point the base URL to our endpoint.

Python (OpenAI SDK)

pip install openai
from openai import OpenAI

client = OpenAI(
    api_key="jrigpt-YOUR_API_KEY",
    base_url="https://jrigpt.my.id/api/v1"
)

response = client.chat.completions.create(
    model="jrigpt",
    messages=[{"role": "user", "content": "Help me fix a bug"}]
)

OpenClaw

JriGPT supports OpenClaw as an agentic driver for autonomous computer tasks. Configure it as a custom provider:

Setup
npx openclaw onboard

# Select: Manual → Custom Provider
# Base URL: https://jrigpt.my.id/api/v1
# Model ID: jrigpt

Tip: If you get a context overflow error, increase the limit:

sed -i 's/"contextWindow": 16000/"contextWindow": 128000/g' ~/.openclaw/openclaw.json

CLI Access

Use JriGPT directly from your terminal with Gemini CLI or aichat. No browser needed.

Gemini CLI

Recommended

Google's official Gemini CLI can be redirected to JriGPT using OpenAI-compatible mode. Full agent mesh support.

Install & Setup
# 1. Install Gemini CLI
brew install gemini

# 2. Set environment variables
export OPENAI_API_KEY="jrigpt-YOUR_API_KEY"
export OPENAI_BASE_URL="https://jrigpt.my.id/api/v1"

# 3. Launch and select "Use an OpenAI Compatible API"
gemini

Permanent Setup: Add the export lines to your ~/.zshrc or ~/.bashrc so Gemini CLI always connects to JriGPT.

aichat

Alternative

Lightweight CLI client with OpenAI-compatible backend support. Great for quick one-liners and pipe workflows.

Install & Configure
# 1. Install
brew install aichat

# 2. Create config
mkdir -p ~/Library/Application\ Support/aichat
cat > ~/Library/Application\ Support/aichat/config.yaml << 'EOF'
model: jrigpt:jrigpt
stream: false
clients:
  - type: openai-compatible
    name: jrigpt
    api_key: jrigpt-YOUR_API_KEY
    api_base: https://jrigpt.my.id/api/v1
    models:
      - name: jrigpt
        max_input_tokens: 131072
        max_output_tokens: 32768
EOF
Usage
# Quick chat
aichat "Apa itu machine learning?"

# Interactive mode
aichat

# Pipe input
echo "Explain this code" | aichat