DEVELOPER PLATFORM

PSH Agent API

Use the same self-hosted PSH Agent runtime from websites, bots, Roblox Studio, support systems and internal tooling. Conversations, model choice, focus mode, web research and controlled Pterodactyl tools use the same account-scoped backend as the web application.

Base URLhttps://ai.paradoxdev.site/api/v1

Authentication

Create a personal key in Settings → API Keys. Send the secret as a bearer token. The full key is displayed once and is never recoverable from PSH Agent.

Authorization: Bearer psh_live_YOUR_API_KEY

X-API-Key is also accepted. Account-security endpoints require a signed browser session instead of a personal API key.

Models and focus modes

GET/modelsPublic

The gateway exposes stable profile IDs instead of requiring clients to know local Ollama model names.

generalGeneral support, planning and daily work.
codingFast production software engineering using the dedicated coding model.
code-maxHighest-precision coding, frontend engineering, difficult debugging and repository-scale work.
minecraft-pluginsPaper, Spigot, Bukkit, Velocity and BungeeCord plugins.
minecraft-modsNeoForge, Forge and Fabric mods.
fivemFiveM Lua/JS/TS resources, frameworks and NUI.
robloxRoblox Studio, Luau, plugins, UI and client/server systems.

Every generation also accepts a focus mode:

instantFast response and compact verification.
mediumBalanced speed, reasoning and verification.
highDeep implementation and correctness pass for difficult work.

Web and documentation research

Set webSearch to true on /chat, or web_search on /chat/completions, to allow PSH Agent to search public documentation and fetch public pages. Technical profiles are instructed to prefer official documentation and primary sources. Private, loopback and local-network fetch targets are blocked.

Research is opt-in per conversation.

If web research is disabled, the agent does not receive the web-search or page-fetch tools for that request.

Distributed generation queue

The gateway can distribute generation across multiple PSH Seed Workers. If every configured generation slot is busy, the request waits in the gateway queue instead of starting another model on the same worker.

GET/queue/status?requestId=...agent:chat

Send your own X-Request-ID on the chat request, then poll this route to display live queue state and Nixie activity. The activity.steps array contains high-level progress such as queueing, seed assignment, documentation research, tool usage and finalization; it does not expose private model chain-of-thought.

curl.exe "%PSH_AGENT_URL%/api/v1/queue/status?requestId=%REQUEST_ID%" ^
  -H "Authorization: Bearer %PSH_API_KEY%"
{
  "enabled": true,
  "capacity": 2,
  "active": 2,
  "queued": 3,
  "request": { "status": "queued", "position": 2 }
}

Chat

POST/chatagent:chat

Set conversationId to continue a stored conversation. Model/focus/web settings are persisted with that conversation.

Request

{
  "message": "Build a production Roblox inventory UI and verify current Creator Hub APIs.",
  "conversationId": null,
  "model": "roblox",
  "mode": "high",
  "webSearch": true
}

Response

{
  "status": "completed",
  "requestId": "5a30...",
  "conversationId": "8d32...",
  "message": "...",
  "model": "roblox",
  "mode": "high",
  "webSearch": true,
  "usage": { "inputTokens": 421, "outputTokens": 166 }
}

OpenAI-shaped chat completions

POST/chat/completionsagent:chat

This convenience endpoint is stateful through conversation_id. Streaming is not exposed on this endpoint.

curl.exe -X POST "%PSH_AGENT_URL%/api/v1/chat/completions" ^
  -H "Authorization: Bearer %PSH_API_KEY%" ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"coding\",\"reasoning_effort\":\"high\",\"web_search\":true,\"messages\":[{\"role\":\"user\",\"content\":\"Build a production Express API\"}],\"conversation_id\":null}"

Conversations

Conversation data is isolated to the authenticated account.

GET/conversationsconversations:read
POST/conversationsconversations:write
GET/conversations/:id/messagesconversations:read
PATCH/conversations/:idconversations:write
DELETE/conversations/:idconversations:write

Scheduled tasks

GET/taskstasks:read
POST/taskstasks:write

Supported schedules are once, daily, weekly and interval.

{
  "name": "Daily server review",
  "prompt": "Check my servers and summarize anything requiring attention.",
  "scheduleType": "daily",
  "timezone": "Europe/Berlin",
  "timeOfDay": "09:00"
}
GET/tasks/:id/runstasks:read
DELETE/tasks/:idtasks:write

Protected-action approvals

Read-only tools can run automatically. State-changing Pterodactyl operations return approval_required and wait for explicit approval.

GET/approvalsapprovals:read
POST/approvals/:id/approveapprovals:write
POST/approvals/:id/rejectapprovals:write

Web account endpoints

These routes require a signed web-session JWT. Personal psh_live_ keys are deliberately rejected for account-security operations.

POST/auth/registerPublic
POST/auth/loginPublic
GET/auth/meSession
POST/auth/change-passwordSession
GET/account/api-keysSession
POST/account/api-keysSession
DELETE/account/api-keys/:idSession

Errors and request IDs

Every API request receives an X-Request-ID response header. You can provide your own UUID in the request header; this is also the ID used to inspect live generation queue state.

{ "error": "The generation queue is full. Please try again shortly.", "requestId": "f3f0..." }
400 invalid request401 invalid authentication403 forbidden / missing scope404 not found409 conflict429 rate limited / worker busy503 queue or generation unavailable

Windows CMD quick test

set "PSH_AGENT_URL=%PSH_AGENT_ORIGIN%"
set "PSH_API_KEY=psh_live_REPLACE_WITH_YOUR_KEY"
set "REQUEST_ID=11111111-2222-4333-8444-555555555555"

curl.exe -X POST "%PSH_AGENT_URL%/api/v1/chat" ^
  -H "Authorization: Bearer %PSH_API_KEY%" ^
  -H "X-Request-ID: %REQUEST_ID%" ^
  -H "Content-Type: application/json" ^
  -d "{\"message\":\"Create a production FiveM resource\",\"conversationId\":null,\"model\":\"fivem\",\"mode\":\"high\",\"webSearch\":true}"

Security model

Personal API keys are scoped and hashed at rest. User Pterodactyl Client API credentials are encrypted. Web research blocks obvious local/private destinations. Seed workers require a private shared secret and should be firewalled so only the gateway can reach them. The internal /api/v1/admin/ surface uses a separate service key and IP allowlist.

HTTPS is required for internet-facing traffic.

Use TLS for the gateway and keep seed-worker ports on a private network or strict firewall allowlist.