Developer Console
Unified model routing API
ConsolePlaygroundStructured generation tester

Generate Playground

Test OneAI tasks, standard chat completions, model routing, usage, and traces.

Commercial presets

Load a real OneAI business task with recommended mode, model, input JSON, and cost guard.

Free tasks can run immediately. Pro/Team presets show paid-plan behavior.

Request

Turn a business goal into practical strategy, milestones, risks, next actions, and success metrics.

Selected task
business_strategy
Tier
free
Maturity
STABLE

cURL Preview

Same payload for external API callers.

curl -s https://oneai-saas-api-production.up.railway.app/v1/generate \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"type":"business_strategy","input":{"goal":"Launch a B2B AI API product in 30 days","audience":"SaaS builders and small teams","constraints":["Keep it practical","Prioritize fast validation","Include risks"]},"options":{"debug":true,"llm":{"mode":"balanced","provider":"openai","model":"gpt-4o-mini","maxCostUsd":0.03}}}' | jq

Production Code

Copy server-side examples after your Playground request works.

Node.js
const res = await fetch("https://oneai-saas-api-production.up.railway.app/v1/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.ONEAI_API_KEY,
  },
  body: JSON.stringify({
  "type": "business_strategy",
  "input": {
    "goal": "Launch a B2B AI API product in 30 days",
    "audience": "SaaS builders and small teams",
    "constraints": [
      "Keep it practical",
      "Prioritize fast validation",
      "Include risks"
    ]
  },
  "options": {
    "debug": true,
    "llm": {
      "mode": "balanced",
      "provider": "openai",
      "model": "gpt-4o-mini",
      "maxCostUsd": 0.03
    }
  }
}),
});

const data = await res.json();
if (!res.ok || data.success === false) {
  throw new Error(data.error || "OneAI request failed");
}

console.log(data);
Python
import os
import requests

res = requests.post(
    "https://oneai-saas-api-production.up.railway.app/v1/generate",
    headers={
        "Content-Type": "application/json",
        "x-api-key": os.environ["ONEAI_API_KEY"],
    },
    json={
    "type": "business_strategy",
    "input": {
        "goal": "Launch a B2B AI API product in 30 days",
        "audience": "SaaS builders and small teams",
        "constraints": [
            "Keep it practical",
            "Prioritize fast validation",
            "Include risks"
        ]
    },
    "options": {
        "debug": True,
        "llm": {
            "mode": "balanced",
            "provider": "openai",
            "model": "gpt-4o-mini",
            "maxCostUsd": 0.03
        }
    }
}
)

data = res.json()
if not res.ok or data.get("success") is False:
    raise RuntimeError(data.get("error", "OneAI request failed"))

print(data)
Keep ONEAI_API_KEY on the server. Do not expose it in browser or mobile client code.

Response

Ready to send a request.

Idle
Request ID
-
Attempts
-
Latency
-
Cost
-
Run a request to see structured output, usage, and llmTrace.