api guide

Bring your own key.

You choose who powers your assistant. Connect a key from whichever provider you trust, and that's the model answering — full control over the brains behind Niya, set up in a few minutes.

Gemini Live

Free tier, Google account, real-time voice — built for Conversation Mode.

View setup guide

OpenRouter

Pay-as-you-go access to a wide range of models, on your own terms.

View setup guide

Gemini Live

Google AI Studio · free tier · ~3 minutes
Gemini Live is Google's free real-time voice API — the same tech Niya uses for Conversation Mode. No credit card, no Cloud Console.
1

Open the AI Studio link and sign in

Tap aistudio.google.com/app/apikey, then sign in with any Google account. You won't be asked for a card.

accounts.google.com/signin
Recreated — real Google sign-in theme gemini-step1-mock.svg
2

Accept the terms

First time in AI Studio, you'll see this once. Check both boxes and continue.

aistudio.google.com/app/apikey
Google AI Studio
Google AI Studio and the Gemini API enable developers to build with the latest Google AI models. Prompts and responses may be reviewed to train Google AI — don't submit sensitive info.
I acknowledge I'm building with Google AI Studio and the Gemini API, and accept the terms and privacy policy.
I'd like to receive emails about model updates and news.
Continue
Recreated — real AI Studio theme gemini-step2-mock.svg
3

Copy your default key

AI Studio already made one for you — you don't need to create a new key. Copy Default Gemini API Key using the copy icon.

aistudio.google.com/app/apikey
API Keys
Create API key
All projects
● API Key Project
…TXaw
Default Gemini API Key
ProjectDefault Gemini Project
Billing tierFree tier
Recreated — real AI Studio theme gemini-step3-mock.svg
Don't see a key listed? Click Create API key top-right, keep the default name and project, then Create key. A key details panel opens with your new key ready to copy — same copy icon as above.
Create a new key
Name your key
Gemini API Key
Choose an imported project
Default Gemini Project ⌄
Cancel Create key
4
Final step — same for every provider

Paste it into Niya

Open Niya → tap (top-left) → AI & Model Settings → scroll to Conversation Mode (Gemini Live) → select Set your own → paste your key into the field that appears.

Niya home screen
Open Niya
Niya menu, AI & Model Settings highlighted
☰ → AI & Model Settings
AI & Model Settings, Text and Vision API
Scroll to Conversation Mode
Conversation Mode set to Set your own, Gemini API key field
Set your own → paste key

Troubleshooting

  • Key starts with "AIza" instead of "AQ.Ab" — that's the legacy format Google is phasing out. Delete it and create a fresh one from the same page (see the callout above).
  • In the EEA, UK, or Switzerland — the free tier won't activate without billing enabled under Google's current terms. This is a Google restriction, not a Niya one.
  • Hitting rate limits fast — free tier is intentionally tight (roughly 10 requests/min on Flash). That's Google's limit, not a bug in Niya.

OpenRouter

openrouter.ai · pay-as-you-go · ~3 minutes
OpenRouter gives you access to many models through one key — useful if you want to try more than Gemini. Sign in with whatever's fastest for you.
1

Sign up — any method works

Go to openrouter.ai/sign-up. Continue with GitHub, Google, or X — or fill in the email form. No card required.

openrouter.ai/sign-up
Gemini 3.7 Flash is 50% off for a limited time. See all discounted models here
Sign Up
G
or
First nameOptional
First name
Email address
Enter your email address
Password
Create a password
I agree to the Terms of Service, Privacy Policy, and Model Terms.
Continue
Recreated — real OpenRouter theme
2

You'll land here once signed in

OpenRouter's homepage — the model marketplace. The button you want is top and center: Get API Key.

openrouter.ai
Gemini 3.7 Flash is 50% off for a limited time. See all discounted models here
🔍
A

The Unified Interface For Every Model

Better prices, better uptime, no subscriptions.

Get API Key
Discover Models ✦
200T+Monthly Tokens
10M+Global Users
80+Providers
500+Models
Recreated — real OpenRouter theme
3

Click "Get API Key"

This drops you on the API Keys page. It's empty the first time — that's expected.

openrouter.ai/settings/keys
Gemini 3.7 Flash is 50% off for a limited time. See all discounted models here
🔍
A
API Keys
Create and manage your API keys. ⓘ
+ New Key
🔑
No API keys yet
Create your first API key to start using OpenRouter
Recreated — real OpenRouter theme
4

New Key → fill it in → Create

Name is optional but worth setting (e.g. "Niya"). Leave expiration and credit limit at their defaults unless you have a reason not to.

openrouter.ai/settings/keys
Name
e.g. "Niya"
Expiration
No expiration ⌄
Key limit
Credit limit (optional)
Leave blank for unlimited
Reset limit every...
N/A ⌄
Create
Recreated — real OpenRouter theme
5

Copy your new key

OpenRouter shows it exactly once. Copy it now — you'll paste it straight into Niya in the next step.

openrouter.ai/settings/keys
Your new key:
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
Please copy it now and write it down somewhere safe. You will not be able to see it again.
You can use it with OpenAI-compatible apps, or your own code.
Recreated — real OpenRouter theme
Back on the Keys page, your new key now shows up masked (sk-or-v1-03d…) with a "No guardrails" tag and a running key count at the bottom — that's just confirmation it saved. The masked value there is not usable; only the one you just copied is.
6
Final step — same for every provider

Paste it into Niya

Open Niya → tap (top-left) → AI & Model Settings → under Text API, select Set your own → paste your OpenRouter key into API Key. Set API Endpoint URL to https://openrouter.ai/api/v1, and put the model slug you picked (step 8) into Model Name.

Niya home screen
Open Niya
Niya menu, AI & Model Settings highlighted
☰ → AI & Model Settings
AI & Model Settings, Text API section
Text API → Set your own
Text API set to Set your own, endpoint URL, API key, and model name fields showing openai/gpt-5.6-sol
Fill endpoint, key, model
7

Back on OpenRouter — open Discover Models

Tap the OpenRouter logo top-left to get back to the homepage, then tap Discover Models. This is the model marketplace/leaderboard — where you'll pick which model Niya actually talks to.

openrouter.ai/rankings
Gemini 3.7 Flash is 50% off for a limited time. See all discounted models here
🔍
A
3
Grok 4.6
SpaceXAI
61
4
Gemini 3.5 Fl…
Google
52
#1 on OpenRouter ⓘ
DeepSeek V4 Flash 0731
Best value ⓘ
Ling-3.0-flash — $0.02/M tokens
Fastest ⓘ
gpt-oss-120b — 747tok/s
Recreated — real OpenRouter theme (rankings page)
8

Pick a model, then copy its slug from the Playground

Click into any model here and open its Playground tab — that's where you'll find the exact model string (e.g. openai/gpt-5.6-sol) to paste into Niya's Model Name field back in step 6.

openrouter.ai/playground?models=openai/gpt-5.6-sol
🔍
A
Playground
openai/gpt-5.6-sol
Hey, quick test
Loud and clear — this is gpt-5.6-sol replying via OpenRouter.
Slug shown in the URL and model chip: openai/gpt-5.6-sol
Recreated — real OpenRouter theme (playground page)
9
Also works for Vision API

Same steps, Vision API instead

Everything above — sign up, add credit, create a key, copy it — is identical for Vision API. The only difference is where you paste it in Niya: open AI & Model Settings → scroll to Vision API → select Set your own → paste your OpenRouter key, with the same https://openrouter.ai/api/v1 endpoint — then put a vision-capable model's slug in the Model Name field there instead.

Not every model on OpenRouter accepts images, so filter by vision support on the Discover Models page (step 7) when picking one. A few common vision-capable slugs to try:

  • openai/gpt-5.6-sol
  • google/gemini-2.5-flash
  • anthropic/claude-sonnet-4
  • meta-llama/llama-4-maverick

Troubleshooting

  • "Insufficient credit" error — add balance under Settings → Credits; OpenRouter is prepaid and meters usage per-request.
  • 402 Payment Required — same root cause as above; check your balance before debugging the key itself.
  • Key not recognized — make sure there's no trailing space pasted in from copy, and that the endpoint is exactly https://openrouter.ai/api/v1.
  • Model not responding — some models route through third-party hosts and occasionally rate-limit; pick a different model from the rankings page.
  • Vision requests failing — double-check the chosen model actually supports image input; text-only models will reject or ignore image content.
Thank you
Your download should be starting now.
⚠️ Google Play Protect may flag this download — that's expected for apps outside the Play Store. If it warns you, you can safely let it continue. Niya doesn't contain spyware or malware.
Didn't start? Click here