Skip to main content
The Pinaivu API gives you programmatic access to a peer-to-peer decentralized AI inference marketplace. You send requests using the same format you already use with OpenAI, and Pinaivu routes each request to an available GPU node on the network — returning results alongside a cryptographically signed receipt you can verify independently.

Base URL

Point every request at the following base URL:
https://api.pinaivu.com/v1

Authentication

All requests must include your API key as a Bearer token in the Authorization header:
Authorization: Bearer sk-pnv-...
See the Authentication guide for instructions on generating keys and keeping them secure.

OpenAI Compatibility

The Pinaivu API implements the same request and response schema as the OpenAI API. In practice, this means you can point any OpenAI SDK or compatible tooling directly at the Pinaivu base URL without changing your existing code:
from openai import OpenAI

client = OpenAI(
    api_key="sk-pnv-...",
    base_url="https://api.pinaivu.com/v1",
)
No other changes are required. All chat completion parameters, streaming, and response fields work exactly as documented in the OpenAI reference.

Response Format

Every response follows the OpenAI response schema. In addition, Pinaivu includes a request_id field at the top level of every response object:
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "request_id": "req_01j9z4kxm8vwqe3t5p6n7r2y0c",
  ...
}
You can use request_id to look up the routing receipt for any completed inference — including the node that served it, the payment settled, and a coordinator signature produced inside an AWS Nitro Enclave.

Errors

Pinaivu uses standard HTTP status codes. When a request fails, the response body contains an error object with a message field describing the problem.
StatusErrorDescription
400Bad RequestInvalid parameters — check your request body.
401UnauthorizedMissing or invalid API key.
403ForbiddenInsufficient permissions for this operation.
422UnprocessableMalformed request body — the server could not parse your JSON.
429Too Many RequestsRate limit exceeded — back off and retry.
503Service UnavailableNo GPU nodes are currently available to serve this model.

Endpoints

Chat Completions

POST /v1/chat/completions — run LLM inference and get a response.

Usage

GET /v1/usage — view token counts and request statistics.

Models

GET /v1/models — list LLMs currently available on the network.

Receipts

GET /v1/receipts/ — fetch a signed routing receipt.