Is Pinaivu compatible with the OpenAI SDK?
Is Pinaivu compatible with the OpenAI SDK?
Yes. Pinaivu’s API is fully OpenAI-compatible. You only need to point
base_url at https://api.pinaivu.com/v1 and supply your Pinaivu API key — no other changes are required.How do I get an API key?
How do I get an API key?
Sign up or log in at https://api.pinaivu.com. Once you’re in the dashboard, navigate to API Keys and create a new key. Your key will be prefixed with
sk-pnv- — copy it immediately, as it won’t be shown again.What models are available?
What models are available?
Pinaivu currently serves open-source LLMs routed across its decentralized GPU network, including:The response follows the standard OpenAI model-list schema, so any tooling that already parses that format will work without modification.
llama3.2:1bllama3.2:3b
/v1/models endpoint:What is a routing receipt?
What is a routing receipt?
A routing receipt is a signed proof of inference that Pinaivu attaches to every completed request. It records which node handled your request, the model used, and a cryptographic attestation that the computation ran as declared.Every routing receipt includes a
request_id that you can use to look up the full record on the explorer. You can retrieve a receipt programmatically via the GET /v1/receipts/ endpoint. For a deeper explanation, see Routing Receipts.How do I verify my inference?
How do I verify my inference?
Every successful response includes a You can also retrieve the receipt directly via the API — see GET /v1/receipts/ and the Verifying Inference guide for full details.
request_id field. To verify the inference:Open the explorer
Navigate to https://explorer.pinaivu.com.
What happens if no nodes are available?
What happens if no nodes are available?
If all GPU nodes on the network are busy or temporarily unreachable, the API returns a
503 Service Unavailable error. The network is self-healing — nodes come back online quickly — so retrying with exponential backoff is usually sufficient.What does a 422 error mean?
What does a 422 error mean?
A
422 Unprocessable Entity response means your request was received and authenticated, but the body failed validation. This is different from a 400 Bad Request — your JSON was syntactically valid, but one or more fields had an incorrect type, an unrecognized value, or a missing required property.Common causes:- Passing an unsupported value for
model(check the exact ID viaGET /v1/models). - Sending
messagesin the wrong format (each entry must include bothroleandcontent). - Setting parameters outside their allowed range (for example, a negative
temperature).
detail field that identifies which field failed and why — read it carefully to pinpoint the problem before retrying.Is there a rate limit?
Is there a rate limit?
Yes. Pinaivu enforces per-key rate limits to keep the network stable for all users. When you exceed your limit, the API returns a
429 Too Many Requests error with a Retry-After header indicating how long to wait.If your use case requires higher throughput, contact support to discuss raising your limits.Can I use Pinaivu for streaming responses?
Can I use Pinaivu for streaming responses?
Yes. Streaming works exactly like it does with the OpenAI API. Set
stream: true (or stream=True in Python) in your request and consume the server-sent event stream as usual.Python
What is the difference between the API and the chat interface?
What is the difference between the API and the chat interface?
API (api.pinaivu.com/v1) | Chat (chat.pinaivu.ai) | |
|---|---|---|
| Access | Programmatic (SDK / HTTP) | Browser-based |
| State | Stateless — you manage conversation history | Cross-session memory built in |
| Auth | Bearer token (sk-pnv-...) | Account login |
| Best for | Applications, automation, batch workloads | Interactive exploration, prototyping |
How is billing calculated?
How is billing calculated?
Billing is calculated on a per-token basis. The rate depends on which model you use — smaller models like
llama3.2:1b cost less per token than larger ones.You can review your usage in two ways:- Dashboard — log in at https://api.pinaivu.com and open the Usage tab.
- API — query the usage endpoint programmatically: