SDK examples

Copy. Paste. Ship.

Bare-minimum snippets for calling the factory’s public surfaces. The public demo SSE stream is live (rate-limited, no auth); signup-via-API is roadmap — today signup lives in the in-app form at /factory/signup.

Sign up via API (planned)

Roadmap surface. No /api/factory/signup endpoint exists today — the in-app form at /factory/signup does a best-effort POST and falls back to a success state regardless of response. These snippets document the planned shape; they won't return data until the endpoint ships. Email [email protected] for early access.

POST /api/factory/signup (planned)
cURLsignup.sh
curl -X POST https://ooretz.space/api/factory/signup \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "orgName": "Your company",
    "tier": "pro"
  }'
🟢Node.js (fetch)signup.mjs
const res = await fetch('https://ooretz.space/api/factory/signup', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    email: '[email protected]',
    orgName: 'Your company',
    tier: 'pro',
  }),
})
const data = await res.json()
process.stdout.write(JSON.stringify(data))
🐍Python (requests)signup.py
import requests

resp = requests.post(
    "https://ooretz.space/api/factory/signup",
    json={
        "email": "[email protected]",
        "orgName": "Your company",
        "tier": "pro",
    },
)
print(resp.json())
🐹Go (net/http)signup.go
package main

import (
    "bytes"
    "fmt"
    "io"
    "net/http"
)

func main() {
    body := bytes.NewBufferString(`{"email":"[email protected]","orgName":"Your company","tier":"pro"}`)
    resp, err := http.Post("https://ooretz.space/api/factory/signup",
        "application/json", body)
    if err != nil { panic(err) }
    defer resp.Body.Close()
    out, _ := io.ReadAll(resp.Body)
    fmt.Println(string(out))
}
💎Ruby (net/http)signup.rb
require 'net/http'
require 'json'

uri = URI('https://ooretz.space/api/factory/signup')
req = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
req.body = { email: '[email protected]', orgName: 'Your company', tier: 'pro' }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |h| h.request(req) }
puts res.body
🦀Rust (reqwest)signup.rs
use reqwest::blocking::Client;
use serde_json::json;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let body = json!({
        "email": "[email protected]",
        "orgName": "Your company",
        "tier": "pro",
    });
    let resp = Client::new()
        .post("https://ooretz.space/api/factory/signup")
        .json(&body)
        .send()?;
    println!("{}", resp.text()?);
    Ok(())
}

Run the public demo

Server-Sent Events stream of build progress. No auth required. Rate-limited to 3 builds per 5 minutes per IP.

POST /api/factory/public-demo (text/event-stream)
cURL (streaming)demo.sh
curl -N -X POST https://ooretz.space/api/factory/public-demo \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Build a check writer with two-approver workflow"}'

# -N disables buffering so SSE events stream to your terminal as they arrive
🟢Node.js (EventSource)demo.mjs
import { EventSource } from 'eventsource'

const params = new URLSearchParams({
  prompt: 'Build a check writer with two-approver workflow',
})

// The public-demo endpoint uses POST → use a fetch-streaming polyfill
// for SSE. node-fetch + Readable.from-async also works.
const res = await fetch('https://ooretz.space/api/factory/public-demo', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    prompt: 'Build a check writer with two-approver workflow',
  }),
})
const reader = res.body!.getReader()
const decoder = new TextDecoder()
while (true) {
  const { done, value } = await reader.read()
  if (done) break
  process.stdout.write(decoder.decode(value))
}
🐍Python (sseclient)demo.py
import requests
import json

# pip install requests
with requests.post(
    "https://ooretz.space/api/factory/public-demo",
    json={"prompt": "Build a check writer with two-approver workflow"},
    stream=True,
) as resp:
    for line in resp.iter_lines(decode_unicode=True):
        if line.startswith("data: "):
            event = json.loads(line[6:])
            print(event)

Authentication for private endpoints

Public endpoints (manifest, openapi, postman, public-templates, public-demo, signup, status) require no authentication. Private endpoints require a per-tenant API key sent as the X-API-Key header. Manage keys at /admin/factory/settings/api-keys.

curl https://ooretz.space/api/v1/factory/jobs/abc-123 \
  -H "X-API-Key: <YOUR_API_KEY>"

v1 routes ship Q3 2026 per the roadmap. See roadmap.

First-class SDK packages?

\`@ooretz/factory\` for Node + \`ooretz-factory\` for Python are on the roadmap. Until then, the snippets above use stdlib + standard HTTP libraries so you avoid a vendor dependency.

See roadmap
© 2026 OOretz Factory · Copy. Paste. Ship.