Get your API key
Generate an API key on our API page.Add Balance
If you haven’t deposited yet, add some funds to your balance. Minimum deposit is just $1, or $0.10 when using crypto.API usage examples
Text Generation
Text Generation
Here’s a simple example using our OpenAI-compatible chat completions endpoint:For more detailed examples and other text generation endpoints, check out our Text Generation Guide.
Image Generation
Image Generation
OpenAI-Compatible Endpoint (v1/images/generations)
You can also generate images using our OpenAI-compatible endpoint:Web Search
Web Search
You can use web search in two ways:Web search works with all models and provides:
POST /api/v1/chat/completionswith suffixes like:onlineand:online/linkup-deepPOST /api/webfor direct search control (query, output type, filters)
- Access to real-time information (updated less than a minute ago)
- 10x improvement in factuality
- Standard search: 10 results quickly
- Deep search: Iterative searching for comprehensive information
sourcedAnswer, structured, date/domain filters, and auth header variants), see Direct Web Search API.Check out our Chat Completion Guide for more examples.TEE Model Verification
TEE Model Verification
NanoGPT supports TEE-backed models for verifiable privacy. You can fetch attestation reports and signatures for chat completions made with these models.Here’s how to fetch an attestation report:After making a chat request with a TEE model, you can get its signature:For a complete Python example and more details, see the TEE Verification Guide.