API

API keys

Generate up to 5 API keys to use NanoGPT in other applications. If you require more keys, please contact us at support@nano-gpt.com and we will help you out.

Authenticate by including your API key as a HTTP header: x-api-key: API_KEY

NameStatusCreatedAPI Key

Get notified about API updates.

We will only use this to contact you updates to how the API works. You can unsubscribe at any time.

API Reference

Documentation is not yet complete. The below example code can be used in Python, NanoGPTjs is a great starting point for JS users.

If you encounter issues or need further information please contact support@nano-gpt.com

Text models
POST https://nano-gpt.com/api/talk-to-gpt
NameModelDescription
ChatGPT 4ochatgpt-4o-latestOpenAI's current recommended model, the well-known ChatGPT.
Gemini Experimentalgemini-exp-1114Google's newest experimental model as of 14 November 2024. Tops the leaderboards on many independent benchmarks.
OpenAI o1o1-previewOpenAI's new flagship series of reasoning models for solving hard problems. Useful when tackling complex problems in science, coding, math, and similar fields
OpenAI o1-minio1-miniA fast, cost-efficient version of OpenAI's o1 reasoning model tailored to coding, math, and science use cases.
Gemini 1.5 Progoogle/gemini-pro-1.5Google's next-generation model with a breakthrough 4 million context window. Comparable to GPT-4o.
Gemini 1.5 Pro Expgoogle/gemini-pro-1.5-expExperimental version of Google's next-generation model with a breakthrough 4 million context window. Comparable to GPT-4o.
Grok 2x-ai/grok-betaGrok-2 is xAI's frontier language model, the one used on X. Claims state-of-the-art reasoning capabilities, best for complex and multi-step use cases.
Claude 3.5 Sonnetclaude-3-5-sonnet-20241022Anthropic's updated most intelligent model, offering even better results on many subjects than GPT-4o.
Claude 3.5 Sonnet Oldclaude-3-5-sonnet-20240620Anthropic's most intelligent model, offering even better results on many subjects than GPT-4o.
Claude 3.5 Haikuclaude-3-5-haiku-20241022Anthropic's updated faster and cheaper model, offering good results on chatbots and coding.
Claude 3 Opusclaude-3-opus-20240229Anthropic's flagship model, outperforming GPT-4 on most benchmarks.
Yi Lightningyi-lightningChinese-developed multilingual (English, Chinese and others) model by 01.ai that's very fast and cheap, yet scores high on independent leaderboards.
GPT 4o minigpt-4o-miniOpenAI's most cost-efficient small model. Cheaper and smarter than GPT-3.5 (the original ChatGPT), but less performant than gpt-4o
GLM-4 Plusglm-4-plusGLM high-intelligence flagship model with 128K context window
Nvidia Nemotronnvidia/llama-3.1-nemotron-70b-instructNvidia's latest Llama fine-tune optimized for instruction following. Early results hints that it might outperform models such as GPT-4o and Claude 3.5 Sonnet.
Llama 3.1 LargeMeta-Llama-3-1-405B-Instruct-FP8Note: comes with a 90% discount currently, enjoy! Meta's largest Llama 3.1 405B model. Open-source, run through an open permissionless crypto network (no central provider).
Hermes 3 Largenousresearch/hermes-3-llama-3.1-405bLlama 3.1 405b with the brakes taken off. An uncensored model, aligned to the user.
Qwen Turboqwen-turboAlibaba's fastest and cheapest model. Suitable for simple tasks, fast and low cost, with a 1 million token context window.
Qwen Maxqwen-maxAlibaba's flagship model. Suitable for complex tasks, with the strongest reasoning ability
Qwen Plusqwen-plusAlibaba's balanced model. Fast, cheap, yet still very powerful.
Qwen Long 10Mqwen-longAlibaba's huge context window model. Takes in up to 10 million tokens, which is equivalent to dozens of books.
Qwen 2.5 Coder 32bqwen/qwen-2.5-coder-32b-instructThe latest series of Code-Specific Qwen large language models.
Yi Largeyi-largeLarge version of Yi Lightning with a 32k context window, but more expensive.
Yi Medium 200kyi-medium-200kMedium version of Yi Lightning with a huge 200k context window
Yi Mediumyi-mediumMedium version of Yi.
Yi Sparkyi-sparkSmall and powerful, lightweight and fast model. Provides enhanced mathematical operation and code writing capabilities.
Mistral Large 2411mistralai/mistral-largeUpgrade to Mistral's flagship model. It is fluent in English, French, Spanish, German, and Italian, with high grammatical accuracy, with a long context window.
Lumimaid v0.2neversleep/llama-3.1-lumimaid-70bUpgrade to Llama 3 Lumimaid 70B. A Llama 3.1 70B finetune trained on curated roleplay data. Extremely uncensored and suitable for NSFW.
Inflection 3 Piinflection/inflection-3-piA chatbot with emotional intelligence. Has access to recent news, excels in scenarios like customer support and roleplay. Mirrors your conversation style.
Inflection 3 Productivityinflection/inflection-3-productivityOptimized for instruction following. Good at tasks that require precise adherence to provided guidelines. Has access to recent news.
WizardLM-2 8x22Bmicrosoft/wizardlm-2-8x22bMicrosoft's advanced Wizard model. The most popular role-playing model.
SorcererLM 8x22Braifle/sorcererlm-8x22bAdvanced roleplaying model with reasoning and emotional intelligence for engaging interactions, contextual awareness and enhanced narrative depth
Llama 3.1 Largeaccounts/fireworks/models/llama-v3p1-405b-instructMeta's largest and most capable Llama model. Competitive with GPT-4o and Claude 3.5 Sonnet.
GPT 4ogpt-4o-2024-08-06OpenAI's precusor to ChatGPT-4o. Great on English text and code, with significant improvements on text in non-English languages.
Llama 3.2 Mediummeta-llama/llama-3.2-90b-vision-instructMedium-size (and capability) version of Meta's newest model (3.2 series).
Llama 3.1 Mediumaccounts/fireworks/models/llama-v3p1-70b-instructMeta's updated version of their medium Llama model. Slightly lesser performance than Llama Large, but cheaper.
Llama 3.1 Mediumllama-3.1-70b-instructMeta's GPT-4 level model. Cheaper than GPT-4 and Claude 3, with similar performance according to most.
Perplexity Onlinellama-3.1-sonar-huge-128k-onlineThe bigger version of the Perplexity model that is able to browse the web and access up-to-date information.
Llama 3.1 Largemeta-llama/llama-3.1-405b-instructMeta's largest and most capable Llama model. Competitive with GPT-4o and Claude 3.5 Sonnet.
Gemini 1.5 Flashgoogle/gemini-flash-1.5-expExperimental version of Google's fastest multimodal model with great performance for diverse, repetitive tasks and a 2 million words context window.
Gemini 1.5 Flashgoogle/gemini-flash-1.5Google's fastest multimodal model with great performance for diverse, repetitive tasks and a 2 million words context window.
Perplexity Online Mediumllama-3.1-sonar-large-128k-onlineA Perplexity model that is able to browse the web and access up-to-date information.
MythoMax 13Bgryphe/mythomax-l2-13bOne of the highest performing and most popular fine-tunes of Llama 2 13B, with rich descriptions and roleplay.
DeepSeek V2.5deepseek/deepseek-chatCombination of DeepSeek V2 Chat and Coder, integrating capabilities from both.
GLM-4glm-4High-intelligence model with 128K context window
GLM-4 Longglm-4-longExtended context model supporting up to 1M tokens
Yi Large Turboyi-large-turboSuper cost-effective, excellent performance. Balanced high-precision tuning based on performance, inference speed, and cost.
Qwen2.5 72Bqwen/qwen-2.5-72b-instructGreat multilingual support, strong at mathematics and coding, supports roleplay and chatbots.
EVA Qwen2.5 32Beva-unit-01/eva-qwen-2.5-32bFull-parameter finetune of Qwen2.5-32B on mixture of synthetic and natural data. It uses Celeste 70B 0.1 data mixture, greatly expanding it to improve versatility, creativity and flavor of the resulting model.
EVA Qwen2.5 14Beva-unit-01/eva-qwen-2.5-14bBased on Qwen2.5-14b, specializing in RP and creative writing, fine-tuned with a mix of synthetic and natural data.
Dolphin 2.6 Mixtral 8x7bcognitivecomputations/dolphin-mixtral-8x7bDesigned for instruction following, conversational, and coding.
GPT 4 Turbogpt-4-turbo-previewCan take in the largest messages (up to 300 pages of context), and all round seen as one of the best in class models.
GPT 4ogpt-4oOpenAI's most advanced model. It matches GPT-4 Turbo performance on text in English and code, with significant improvement on text in non-English languages, while also being much faster and 50% cheaper.
GPT 3.5 Turbogpt-3.5-turboOlder model. Brought ChatGPT to the mainstream, seen as dated nowadays. 90% cheaper than GPT-4-Turbo, recommended for very simple tasks.
Gemini 1.5 Flashgemini-1.5-flash-001Google's fastest multimodal model with great performance for diverse, repetitive tasks and a 1 million context window.
Gemini 1.5 Progemini-1.5-pro-001Google's next-generation model with a breakthrough 1 million context window. Comparable to GPT-4o.
Playgroundfree-modelUse a randomly selected free model to test our service.
Magnum v4 72Banthracite-org/magnum-v4-72bUpgraded model of Magnum V2 72B. From the creators of Goliath. Aimed at achieving prose quality similar to Claude Opus 3, trained on 55 million tokens of curated Roleplay data.
Rocinante 12Bthedrummer/rocinante-12bDesigned for engaging storytelling and rich prose. Expanded vocabulary with unique and expressive word choices, enhanced creativity and captivating stories.
Dolphin 2.9.2 Mixtral 8x22Bcognitivecomputations/dolphin-mixtral-8x22bSuccessor to Dolphin 2.6 Mixtral 8x7b. Great for instruction following, conversational, and coding.
Llama 3.1 70b Instructmeta-llama/llama-3.1-70b-instructOptimized for high quality dialogue usecases.
Llama 3.1 8b Instructmeta-llama/llama-3.1-8b-instructFast and efficient for simple purposes.
L3 Euryale 70Bsao10k/l3-euryale-70bA 70B parameter model from SAO10K, offering high-quality text generation.
Mistral Tinymistralai/mistral-tinyPowered by Mistral-7B-v0.2, best used for large batch processing tasks where cost is a significant factor but reasoning capabilities are not crucial.
Mistral 7B Instructmistralai/mistral-7b-instructOptimized for speed with decent context length
Llama 3 70b Instructmeta-llama/llama-3-70b-instructOptimized for high quality dialogue usecases.
WizardLM-2 7Bmicrosoft/wizardlm-2-7bFinetune of Mistral 7B Instruct, very fast.
Cohere: Command Rcohere/command-r35B parameter model that performs conversational language tasks at a higher quality, more reliably, and with a longer context than previous models. It can be used for complex workflows like code generation, retrieval augmented generation (RAG), tool use, and agents
Nous Hermes 3 70B Instructnousresearch/hermes-3-llama-3.1-70bGeneralist language model including advanced agentic capabilities, much better roleplaying, reasoning, multi-turn conversation, long context coherence, and improvements across the board.
Mistral Nemomistralai/mistral-nemo12B parameter model with multilingual support.
Llama 3.2 3b Instructmeta-llama/llama-3.2-3b-instructSmall model optimized for advanced natural language processing tasks like dialogue generation, reasoning, and summarization
Llama 3 Lumimaid 70Bneversleep/llama-3-lumimaid-70bA Llama 3 70B finetune trained on curated roleplay data. Extremely uncensored and suitable for NSFW.
Magnum v2 72Banthracite-org/magnum-v2-72bFrom the creators of Goliath. Aimed at achieving prose quality similar to Claude Opus 3, trained on 55 million tokens of curated Roleplay data.
Llama 3.1 8B (decentralized)Meta-Llama-3-1-8B-Instruct-FP8Meta's Llama 3.1 8B model via an open permissionless network
GLM-4 AirXglm-4-airxFastest GLM-4 variant with 8K context window
GLM-4 Airglm-4-airHigh-performance model with 128K context window
GLM-4 FlashXglm-4-flashxFast and cost-effective model with 128K context window
GLM-4 Flashglm-4-flashExtremely cheap model with 128K context window

Note! The endpoint for the Gemini models is /api/talk-to-gemini

Image models
POST https://nano-gpt.com/api/generate-image
NameModelDescription
Recraft V3recraft-v3The current best scoring model across all image models tested.
Flux Pro V1.1flux-pro/v1.1Excellent image quality, prompt adherence, and output diversity.
Flux Pro V1.1 Ultraflux-pro/v1.1-ultra4K version of Flux Pro V1.1. Excellent image quality, prompt adherence, and output diversity.
Flux Schnellflux/schnellFast and high-quality image generation - the cheaper version of the Flux range of models.
SD 3.5 Largestable-diffusion-v35-largeStable Diffusion's newest model. Generates a wide variety of images reflecting different styles without complex prompting.
Ideogram V2ideogram-ai/ideogram-v2An excellent image model with state of the art inpainting, prompt comprehension and especially text rendering.
Ideogram V2 Turboideogram-ai/ideogram-v2-turboA fast image model with state of the art inpainting, prompt comprehension and especially text rendering.
Flux Realismflux-realismIncredibly photorealistic image generation. Generate people, animals, landscapes that are hard to distinguish from reality.
DALL-E-3dall-e-3OpenAI's most well-known image model.
DALL-E-3 HDdall-e-3-hdOpenAI's most well-known image model, now in HD quality.
SD 3.5 Large Turbostable-diffusion-v35-large/turboTurbo version of Stable Diffusion's newest model. Faster and cheaper performance while still maintaining great prompt adherence and quality.
Playground V2.5playground-v25Playground V2.5 outperforms SDXL in many user tests. Suitable for a broad range of images.
Proteusproteus-v0.2A versatile image generation model with high-quality outputs.
PromptchanpromptchanThe best NSFW image generation. High-quality image generation with lots of customization options.
Uber RealisticuberRealisticPornMerge_urpmv12_4979.safetensorsGenerates realistic-looking NSFW images.
Stable Diffusion 3 Mediumsd3_base_medium.safetensorsExcels at photorealism, typography, and prompt following. Works best in 1024x1024.
Dreamshaper XLdreamshaper_8_93211.safetensorsDreamshaper generates realistic and anime/illustration-style images, and is best suited to sci-fi and fantasy scenes.
ReV AnimatedrevAnimated_v122.safetensorsReV Animated specialized in fantasy, anime and semi-realistic landscapes.
Stable Diffusion XLfast-sdxlCheap and powerful text-to-image model that generates pictures rapidly.
Flux Pro V1flux-proOlder version of Flux V1.1. Exceptional quality and prompt adherence.