SnappStart free
All Posts

How to Add API Keys (OpenAI, Claude, and More)

Securely add API keys like OPENAI_API_KEY or CLAUDE_API_KEY to your app, and learn how to keep secret keys safe.

SNAPP TeamJune 24, 20263 min read81 views
How to Add API Keys (OpenAI, Claude, and More)

How to Add API Keys (OpenAI, Claude, and More)

Building an AI feature, a weather screen, or anything that talks to an outside service? Those services need an API key: a secret code that lets your app use them. Snapp gives you one place to store keys like OPENAI_API_KEY or CLAUDE_API_KEY, and your app uses them from there.

Animated guide, API keys. Steps: copy, open, add, save, use

Here's how.

---

Step by step

1. Get your key from the provider, for example: - OpenAI: platform.openai.com/api-keys (starts with sk-proj-) - Anthropic (Claude): console.anthropic.com (starts with sk-ant-)

2. Open your app's keys screen: - In the Snapp app: open your app's settings (the gear icon at the top of the chat) and tap Environment. The screen is called API keys and secrets. - On the web: click Keys and secrets (the key icon next to the preview).

3. Tap Add a key.

4. Fill in the form: - Name (on the web: Key Name): for example OPENAI_API_KEY. - Value (on the web: Key Value): paste your key. - Optional, under More details in the app: Service Name (for example OpenAI) and Description, a note to your future self.

5. Tap Save key (on the web: Save).

Now ask Snapp to use it, for example: "Use my OpenAI key to summarize the user's notes."

Shortcut: when Snapp builds a feature that needs a key you haven't added yet, its reply shows an Add button with the key's name (for example Add OPENAI_API_KEY). Tap it and the form opens with the name already filled in. Keys that still need a value show Needs a value on the keys screen.

---

Naming your keys

Key names use uppercase letters, numbers and underscores only. Snapp formats the name as you type, so openai api key becomes OPENAI_API_KEY.

Common keys:

  • OPENAI_API_KEY: OpenAI models
  • CLAUDE_API_KEY: Anthropic (Claude) models
  • GOOGLE_MAPS_API_KEY: Google Maps in your published Android app
  • ...or any key your chosen service needs
  • ---

    Are my API keys safe?

    Your secret keys are protected by Snapp Vault. They are stored encrypted on Snapp's servers and do not go inside your app or your website. When your app calls a service like OpenAI, Snapp adds the key on its side, so people who download your app or visit your site can't dig it out. You don't have to set anything up: tell Snapp what you want and it uses the secure path.

    Keys that are designed to be public, like a Supabase project URL or a Stripe Payment Link, stay in the app as they are meant to. Each key on the keys screen shows a label, so you can see which ones stay in Snapp Vault.

    Target address. A secret key is only sent to the service it belongs to, and the keys screen shows where, for example "Sent only to api.openai.com". If a key says No target address set, tap it and type the service's address (for example api.openweathermap.org).

    Best practices

  • Set spending limits in your provider's dashboard. It is the most reliable safety net against a surprise bill.
  • Use restricted keys where the provider offers them. For example, limit a Google Maps key to the "Maps SDK for Android" API.
  • If you ever paste a key somewhere public by mistake, revoke it in the provider's dashboard, create a new one, and update it on your app's keys screen.
  • ---

    Common questions

    Where do I find my key again later?

    On your app's keys screen (Environment in the app, Keys and secrets on the web). Tap a key to change it. To delete it, open it and tap Delete key, or long-press it in the app. Snapp never shows the saved value again; to change it, enter a new one.

    Can I add more than one provider?

    Yes. Add as many keys as you need.

    My API calls fail with an auth error.

    Check the key value (no extra spaces) and make sure the key is active and funded in the provider's dashboard. Then check that the target address matches the service.

    ---

    What's next

  • Learn how Snapp Vault protects your keys.
  • Connect Supabase to give your app a real database.
  • Share your app once your AI feature works.

---

Share:

SNAPP Team

Articles and content from the SNAPP team

Related Posts

Build Your Own App with SNAPP

Develop mobile apps with AI, no coding required

Start Free