Grid · API Reference
Grid APIs. Payment is auth.
One base URL, OpenAI-style request shapes. Authenticate with an API key, or pay each request with x402.
Start here
Chat quickstart
The same call in three languages, billed to your credits.
curl -X POST https://grid.x402compute.cc/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $SGL_API_KEY" \
-d '{
"model": "llama-3.2-3b",
"messages": [{"role": "user", "content": "Explain TEEs in one sentence."}]
}'
Inference
Send work to the Grid. Pay per request with x402, or bill prepaid credits with an API key.
Models and capacity
Public, read-only. No auth needed.
Jobs
History and status for work you have sent.
Decision models
Singularity xMESH 0.8B answers typed questions about a state: noul, choice or score, up to 16 per request.
Live
POST /v1/systemonecurl https://grid.x402compute.cc/v1/systemone \
-H "X-API-Key: $SGL_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"singularity-layer/Singularity-xMESH-0.8B",
"state":"Summarize a transcript and store the brief. Budget $0.05.",
"questions":{
"need_enrich":{"type":"noul","instructions":"Does the request need outside data?"},
"pick_store":{"type":"choice","instructions":"Choose by capability, then price.",
"criteria":{"storage_1":"cap=object storage; price=0.010","email_1":"cap=email; price=0.001"}}}}'Errors
Failures use standard status codes with a JSON error body.
