Docs · HTTP API
HTTP API
Every endpoint, its fields and its errors.
Base URL: https://www.usewired.net/api/v1
- JSON in, JSON out. Open CORS: call it from a browser, a server or a script.
- No key. The API holds no keys and sends no transactions: it returns the ones to sign.
- Every answer about a model is computed by Robinhood Chain, not by the API. Lists are cached for 10 seconds at the edge; inferences are never cached.
- The OpenAPI spec describes all of it, for Postman, code generators or an AI agent.
Endpoints
| Endpoint | What it does |
|---|---|
GET /models | Every model in the registry, newest first. |
GET /models/{id} | One model. |
POST /models/{id}/infer | Asks the model, onchain. Details. |
GET /models/{id}/infer?input=… | The same from a URL. |
POST /compile | ONNX to a Wired int8 model (multipart). Details. |
POST /deploy | The transactions that put a model onchain. Details. |
GET /arena | Arena contract, match count, brain format. |
GET /arena/matches/{id} | One match: players, heads, grid, pot. |
GET /openapi.json | The OpenAPI 3.1 spec. |
A model
{
"id": "0x0fddc7aa3584b716fb13b93fd278b55f0a93205d1a745ba0bfbc195c64c3f6d1",
"name": "Digits 8x8",
"owner": "0x1A38c4De32717B5f521A9388EE38A832426C8cc5",
"inputLen": 64,
"outputLen": 10,
"labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
"input": { "shape": [8, 8], "scale": 0.12598425196850394, "encoding": "one byte per pixel, row by row: 0 = blank, 127 = full ink" },
"description": "Reads a handwritten digit drawn on an 8×8 grid. Trained on the scikit-learn digits set.",
"metrics": { "floatAccuracy": 0.9556, "int8Accuracy": 0.9556, "agreement": 1, "testSamples": 450 },
"registeredAt": "2026-11-20T12:57:29.000Z",
"decisions": 0,
"blobs": ["0x059A463D230c9e8025e0A07Ee364477cF9C054aE"],
"page": "https://www.usewired.net/models/0x0fddc7aa3584b716fb13b93fd278b55f0a93205d1a745ba0bfbc195c64c3f6d1"
}labels, input, description and metrics come from the metadata the owner published onchain; they are null when there is none. Large numbers (block, seed) are strings.
Errors
Errors come with an HTTP status and the same body:
{ "error": { "code": "bad_input_length", "message": "This model takes 64 values, got 3." } }| Code | Status | Meaning |
|---|---|---|
bad_model_id | 400 | Not 0x followed by 64 hex characters. |
unknown_model | 404 | No such model in the registry. |
bad_json | 400 | The body is not JSON. |
bad_input | 400 | input is not int8 values or hex, or values are not numbers. |
bad_input_length | 400 | Not the number of values the model takes. |
no_scale | 400 | values sent to a model that publishes no input scale. |
model_reverted | 422 | The registry reverted; the message decodes the error. |
bad_form, no_model | 400 | /compile needs multipart with the .onnx in model. |
no_input_range | 400 | /compile needs inputMin and inputMax, or inputScale. |
bad_npy, bad_test_set | 400 | A .npy could not be read, or testX came without testY. |
compile_failed | 422 | Not a valid ONNX, or a layer Wired does not compile. |
bad_from, bad_model | 400 | /deploy needs an address and a compiled model. |
register_would_revert | 422 | The registry would refuse this model. |
bad_match_id, unknown_match | 400, 404 | No such arena match. |
chain_unavailable | 502 | The Robinhood Chain RPC did not answer. Retry. |
Limits
Request bodies are limited to 4.5 MB. The API is free and fair use: if you call a model thousands of times a minute, call the registry on a Robinhood Chain node directly, as shown in Call a model.