Overview
The NanoGPT API allows you to generate text, images and video using any AI model available. Our implementation for text generation generally matches the OpenAI standards. For API-key integrations, usehttps://api.nano-gpt.com as your API host. It accepts larger requests and allows longer-running requests than the website host, which matters for attachments and long model calls. See API Hosts for SDK base URLs and the website flows that should stay on nano-gpt.com.
Partner domains such as ai.bitcoin.com, bcashgpt.com, and cake.nano-gpt.com may use the same API paths and request formats. Their request size and runtime limits can differ from
api.nano-gpt.com.Main API Endpoints
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.
Chat Completion example
Here’s a simple python example using our OpenAI-compatible chat completions endpoint:Quick Start
The quickest way to get started with our API is to explore our Endpoint Examples. Each endpoint page provides comprehensive documentation with request/response formats and example code. The Chat Completion endpoint is a great starting point for text generation.Documentation Sections
For detailed documentation on each feature, please refer to the following sections:- Text Generation - Complete guide to text generation APIs including OpenAI-compatible endpoints and legacy options
- Image Generation - Learn how to generate images using various models like Recraft, Flux, and Stable Diffusion.
- Video Generation - Create high-quality videos with our video generation API