One API key. 82 categories of tools. Real compute, not hallucinated functions.
Auto-generate function definitions from /v1/openapi.json and drop them straight into your tools array.
The fastest path: fetch our OpenAPI spec, convert to OpenAI function definitions, pass to client.chat.completions.create(). Done.
Install the OpenAI Python SDK and Slopshop client. Or just use requests — Slopshop is a plain REST API.
Hit /v1/openapi.json to get the full spec. Our helper converts it to OpenAI's tools format in one call.
GPT returns tool_calls, you POST to Slopshop, return the result as a tool message. Loop until done.
Don't write function definitions by hand. Slopshop publishes a full OpenAPI 3.0 spec. One helper converts every tool into an OpenAI-compatible function definition, complete with JSON Schema parameter types.
# Convert Slopshop's OpenAPI spec into OpenAI function definitions # Every tool becomes a callable function GPT can invoke import requests def get_slopshop_tools(api_key: str, slugs: list[str] = None) -> list[dict]: """Fetch Slopshop tools as OpenAI function definitions.""" url = "https://slopshop.gg/v1/openapi.json" headers = {"Authorization": f"Bearer {api_key}"} spec = requests.get(url, headers=headers).json() tools = [] for path, methods in spec["paths"].items(): for method, op in methods.items(): if method != "post": continue slug = path.lstrip("/v1/") if slugs and slug not in slugs: continue # Extract parameter schema from requestBody schema = (op .get("requestBody", {}) .get("content", {}) .get("application/json", {}) .get("schema", {"type": "object", "properties": {}}) ) tools.append({ "type": "function", "function": { "name": slug.replace("-", "_"), "description": op.get("summary", op.get("description", "")), "parameters": schema, "strict": True } }) return tools
Copy-paste this. GPT calls the functions, you route to Slopshop, return results, loop. No custom tool implementations. No hallucinated outputs.
import os, json, requests from openai import OpenAI client = OpenAI() SLOP_KEY = os.environ["SLOPSHOP_API_KEY"] SLOP_URL = "https://slopshop.gg" def call_slopshop(tool_name: str, arguments: dict) -> str: """Execute a Slopshop tool and return the result as a string.""" slug = tool_name.replace("_", "-") # GPT uses underscores, Slopshop uses hyphens resp = requests.post( f"{SLOP_URL}/v1/{slug}", headers={ "Authorization": f"Bearer {SLOP_KEY}", "Content-Type": "application/json" }, json=arguments ) result = resp.json() # _engine: "real" = actual compute, not a language model guess assert result.get("_engine") == "real", "Expected real compute" return json.dumps(result) def run_agent(user_message: str, model: str = "gpt-4o") -> str: """Run a GPT agent with Slopshop tools until completion.""" tools = get_slopshop_tools(SLOP_KEY, slugs=[ "dns_lookup", "ssl_check", "http_request", "whois", "hash", "url_parse", "memory_set", "memory_get" ]) messages = [{"role": "user", "content": user_message}] while True: response = client.chat.completions.create( model=model, messages=messages, tools=tools, tool_choice="auto" ) msg = response.choices[0].message messages.append(msg) if msg.tool_calls: for tc in msg.tool_calls: result = call_slopshop( tc.function.name, json.loads(tc.function.arguments) ) messages.append({ "role": "tool", "tool_call_id": tc.id, "content": result }) else: return msg.content # Run it answer = run_agent( "Check the SSL cert for slopshop.gg, get its DNS records, and save a summary to memory" ) print(answer)
{
"id": "call_abc123",
"type": "function",
"function": {
"name": "dns_lookup",
"arguments": "{\"host\":\"slopshop.gg\"}"
}
}{
"A": ["34.120.177.34"],
"MX": ["mail.slopshop.gg"],
"NS": ["ns1.cloudflare.com"],
"TTL": 300,
"_engine": "real"
}Note: GPT uses underscores in function names (dns_lookup), Slopshop uses hyphens in slugs (dns-lookup). The call_slopshop() helper above handles this automatically.
Stop writing tool implementations. Every category GPT might reach for — already built, production-tested, and verified real.
DNS, SSL, HTTP, crypto, hashing, code execution, data transforms, web research, document generation. All backed by real compute.
Full /v1/openapi.json with JSON Schema for every parameter. Auto-generate function definitions in seconds.
GPT can write and read from Slopshop's memory store between calls. Zero credit cost. State persists across sessions.
Audit logs, per-call tracing, credit usage. Every function call GPT makes is logged with inputs, outputs, and latency.
Run the Slopshop server yourself. Zero external dependencies for compute APIs. Works in air-gapped environments.