| name | AI Compute |
| description | Pay-per-call AI inference for agents — 200+ LLMs, decentralized Bittensor models, image generation, embeddings, and GPU workloads. OpenAI-compatible, settled in USDC via x402 with no API keys or accounts. Powered by Spraay Protocol. |
| license | MIT |
| version | 1.0.0 |
| homepage | https://github.com/plagtech/spraay-skills |
AI Compute
Run inference and GPU workloads without provider API keys or accounts. This skill wraps the Spraay x402 Gateway (gateway.spraay.app): OpenAI-compatible chat completions across 200+ models, decentralized inference via Bittensor, image generation, embeddings, and arbitrary GPU jobs. The agent pays per call in USDC over x402 — useful when you want a single wallet to cover compute across many providers.
When to use this skill
- Call an LLM (chat completions, function calling, vision) without holding an OpenAI/Anthropic key
- Run inference on decentralized Bittensor models (SN64 Chutes, SN19 Nineteen)
- Generate images or embeddings
- Submit a GPU job (image, video, audio, or LLM workloads via Replicate) and poll for results
OpenAI-compatible endpoints accept the standard request body, so existing SDKs work by pointing baseURL at the gateway path.
Setup
npm install x402-client
export EVM_PRIVATE_KEY=0x...
import { createClient } from "x402-client";
const client = createClient({
baseUrl: "https://gateway.spraay.app",
privateKey: process.env.EVM_PRIVATE_KEY,
});
Endpoints
Inference (200+ models)
| Method | Path | Price | Description |
|---|
| POST | /api/v1/chat/completions | $0.04 | OpenAI-compatible chat completions. 200+ models via BlockRun + OpenRouter. Streaming, function calling, vision. |
| GET | /api/v1/models | $0.001 | List available models with pricing and capability metadata. |
Bittensor — decentralized AI
| Method | Path | Price | Description |
|---|
| GET | /bittensor/v1/models | $0.001 | List decentralized models. OpenAI /v1/models compatible. |
| POST | /bittensor/v1/chat/completions | $0.03 | Chat completions via Bittensor SN64 (Chutes). 43+ models. |
| POST | /bittensor/v1/images/generations | $0.05 | Image generation via Bittensor SN19 (Nineteen AI). |
| POST | /bittensor/v1/embeddings | $0.005 | Text embeddings via Bittensor. OpenAI-compatible. |
GPU workloads
| Method | Path | Price | Description |
|---|
| POST | /api/v1/gpu/run | $0.06 | Run GPU inference via Replicate — image, video, audio, LLM. |
| GET | /api/v1/gpu/status/:id | $0.005 | Check status of a GPU prediction job by ID. |
| GET | /api/v1/gpu/models | FREE | Curated GPU model shortcuts (Flux, SDXL, Whisper, ...). |
Examples
Chat completion (OpenAI-shaped body):
const out = await client.post("/api/v1/chat/completions", {
model: "gpt-4o-mini",
messages: [{ role: "user", content: "Summarize Base in one sentence." }],
});
Decentralized inference on Bittensor:
const out = await client.post("/bittensor/v1/chat/completions", {
model: "chutes/...",
messages: [{ role: "user", content: "..." }],
});
GPU image job, then poll:
const job = await client.post("/api/v1/gpu/run", { model: "flux", input: { prompt: "..." } });
const status = await client.get(`/api/v1/gpu/status/${job.id}`);
Notes