Skip to main content

Your first request

Create an API key, add balance, and install the official Python SDK with pip install openai. Set NANOGPT_API_KEY in your environment. Keep the key on your server, outside source control. Use the exact SDK base URL https://api.nano-gpt.com/api/v1. The SDK appends /chat/completions, producing POST /api/v1/chat/completions. Do not append that endpoint to base_url yourself.
The request ID helps support find a failed request. Save it with your application logs. For streaming, errors, usage and tool calls, copy the tested Quickstart example.

Explore the API

For selected endpoints, you can also use Accountless x402 API Payments to receive a payment quote without an account or API key by including x-x402: true on the initial unauthenticated quote request. Check GET /api/v1/x402/endpoints for the current supported matrix.