# Polycracker Core AI Layer

High-throughput reasoning and workflow execution layer hosted at **https://polycracker.dev**. Three primary API surfaces: Universal Execute, Workflow Highway, and Sovereign Memory Vaults.

## Universal API Engine

- **Endpoint:** `POST https://polycracker.dev/api/v1/universal/execute` (documented; backend on portal infrastructure)
- **Purpose:** Direct programmatic LLM execution with deterministic JSON schemas and fixed HTTP envelopes.
- **Auth:** `X-API-Key: <key>` or `Authorization: Bearer <key>` (bare token not accepted).

### Request Fields

| Field | Cap |
|-------|-----|
| `model` | OpenAI or Anthropic model string |
| `system_prompt` | ≤ 50,000 chars |
| `user_input` | ≤ 200,000 chars |
| `response_schema` | Optional, ≤ 64,768 chars |

### Response Envelope

```json
{ "status": "success", "data": { }, "latency_ms": 1234 }
```

With schema → structured fields on `data`. Without schema → text at `data.result`.

### Model Routing & Pricing (prepaid wallet, per hit)

| Class | Fee | Examples | Tier gate |
|-------|-----|----------|-----------|
| Utility | $0.10 | gpt-4o-mini, claude-haiku-4-5 | Sandbox+ |
| Standard | $0.20 | gpt-4o, claude-sonnet-5 | Sandbox+ |
| Heavy | $1.00 | o3, claude-opus-5 | Apex / Enterprise |
| Frontier | $2.50 | o1, claude-fable-5 | Apex / Enterprise |

### Rate Limits (RPM per API key)

Sandbox 10 · Mimic 60 · Apex 200 · Enterprise 1,200

Combined payload caps by tier: 2k / 10k / 50k / 200k characters.

### Error Codes

401 auth · 402 insufficient wallet · 403 `insufficient_tier` · 413 payload · 429 rate limit

---

## Adaptive Workflow Pipelines

- **Endpoint:** `POST /highway/process`
- **Architecture:** 3–4 node orchestration replacing brittle multi-node canvases.

| Node | Function |
|------|----------|
| Parrot Integration Node | Global context, business rules, User Context field |
| Smart Node | Guided Path (structured) or Chameleon Path (autonomous self-morphing) |
| Parrot Gate | PII scrubbing, payload flattening, sanitization gates |

**Integrations:** n8n, Make, Zapier, React Flow, Salesforce, SAP.

**Workflow RPM:** Sandbox 1 · Mimic 5 · Apex 30 · Enterprise 120

Billing via Ecosystem Fuel credits (Chameleon > Guided weight).

---

## Sovereign Memory Vaults

- **Ingest:** `POST /v1/memory/ingest`
- **Recall:** `POST /v1/memory/recall`

Isolated vector compute with semantic chunking. Recall returns `injected_context[]`, `vector_distance`, `tokens_saved`.

| Tier | Vaults | Recall RPM |
|------|--------|------------|
| Mimic | 1 | 60 |
| Apex | 25 | 500 |
| Enterprise | Unlimited | 5,000 |

Data never enters public LLM training pipelines.

## Product Pages

- Universal API: https://polycracker.dev/universal-api
- Workflow API: https://polycracker.dev/workflow-api
- Memory API: https://polycracker.dev/memory-api
- Complete guide: https://polycracker.dev/docs
