Skip to main content
The chat completions endpoint is OpenAI-compatible, so most OpenAI SDKs and tools work by changing only the base URL and API key. Enable inference first to mint your privateKey, then send requests.

Endpoint

For an OpenAI-compatible client, set the base URL to https://agents.pinata.cloud/v0/llm — the SDK appends /chat/completions itself.

Request

cURL
OpenAI SDK

Parameters

Other standard OpenAI sampling fields (temperature, top_p, etc.) are passed through to the underlying model.

Response

Streaming

Set "stream": true to receive server-sent events. Usage is included in the stream, and the final event is data: [DONE].

Errors

Error bodies follow the OpenAI error shape, e.g. { "error": { "message": "..." } }.