
Build with your API key
Build a website with your Perplexity API key
Facts last verified: . Provider pricing and free tiers change — check their site for current numbers.
Yes — Perplexity's Sonar API works with OpenThorn for website generation, with a twist: Sonar models are search-grounded, so generated content can draw on current web information. Create a key at perplexity.ai/settings/api, paste it into OpenThorn (free, encrypted server-side), and pay Perplexity's per-token rates directly.
Get your key
Official pricing
Free tier
No standing free tier; Perplexity Pro subscribers receive a monthly API credit allowance.
Recommended models
- Sonar Pro — The strongest Sonar model — best for complete website builds.
- Sonar — Cheaper and faster for simpler sites.
- Sonar Reasoning Pro — Adds explicit reasoning for complex structures.
How to build your website
- Create a Perplexity API keySign in at perplexity.ai, open Settings → API, add credit (Pro subscribers get a monthly allowance), and generate a key.
- Mind the request pricingSonar models bill per token plus a small per-search fee — check the pricing docs so costs stay predictable.
- Connect the key to OpenThornSign up free at openthorn.app, open the Providers page, choose Perplexity, and paste your key. It is encrypted server-side with AES-256-GCM and never exposed raw.
- Describe your website and ship itCreate a project, pick a Sonar model, and describe the site. Preview it live, iterate, then deploy to Netlify or export the source.
What it costs
Sonar per-token rates are competitive with mid-tier models; search-grounded requests add a small per-request fee. A typical site costs under a dollar.
Common questions
Why use Perplexity to build a website?
Sonar models are search-grounded — they can pull current facts from the web while generating, which helps for content-heavy sites that reference real, up-to-date information. For pure code generation, a dedicated coding model may be a better fit.
Do Perplexity Pro subscribers get API credit?
Yes — Perplexity Pro includes a monthly API credit allowance, which is enough to build several websites in OpenThorn without separate billing.
Is my Perplexity API key safe in OpenThorn?
Keys are encrypted server-side with AES-256-GCM using per-user derived keys and are never exposed raw to the browser. You can revoke the key in your Perplexity settings at any time.
New here? Read how to build a website with AI using your own key, how to get an AI API key, or compare model pricing. Other providers: OpenAI · Anthropic · Google Gemini · DeepSeek · Mistral AI · Groq · Together AI · xAI · Cohere · OpenRouter · Ollama · Fireworks AI · Cerebras · Azure OpenAI · Amazon Bedrock · NVIDIA NIM
