Skip to content
Docs
Docs/Connect

Connect OpenAI

Connect an OpenAI API key to your app, build a conversational feature and test its responses in the native preview.

4 min readUpdated Oct 1, 2026

Add an AI assistant or text-generation feature using your OpenAI API account. Start with a short text request so you can verify the connection before adding more complex inputs.

On this page

Create a key for the app

Sign in to the OpenAI API dashboard, select the intended project and create a key for this app. Keep the key private. The OpenAI quickstart links to the current key-creation flow.

Connect OpenAI to this app

  1. Open the app in Studio

    Select App options (+) → Connectors → OpenAI. A Connect OpenAI request in the conversation opens the same setup. Connections belong to the app you have open.

  2. Save the credential privately

    Paste your credential into API Key and select Save. Keep it out of the conversation and app source. RNBlocks stores the credential for this app; the saved value is masked in this form.

  3. Return to your conversation

    Close the connection panel and continue the feature you requested. Connected means a credential is saved; the feature still needs a successful request and a test in your app.

1 / 4 · App optionsThe actual App options menu above the + button. It contains separate Supabase, Connectors and App memory actions.

Connect OpenAI, step by step

The actual connection screens. Empty form and illustrative saved state; no credential is shown.

  1. Open App options (+) → Connectors in the app you want to connect.
  2. Choose OpenAI in the catalogue, then enter your API Key in its private form and select Save.
  3. Return to the conversation and test the feature. Connected means a credential is saved, not that a provider request has succeeded.
Connect OpenAI, step by step

The actual connection screens. Empty form and illustrative saved state; no credential is shown.

Try one complete conversation

  1. Give Studio a specific feature

    For example: “Add a recipe helper using OpenAI. Let me enter ingredients and get one recipe with preparation steps.”

  2. Test the native result

    In the iOS or Android preview, enter a few ingredients. Confirm the app shows a loading state and then a useful response.

  3. Try a follow-up

    Ask to change one ingredient. If your app promises saved conversations, reopen it and confirm the history remains. Tell Studio separately if you want persistent history.

When the first request fails

  • Check that the saved key belongs to the intended OpenAI project and has not expired or been revoked.

  • Review that project’s API quota, billing and model access. A key can save successfully while its first model request fails.

  • If a text request works but an attachment fails, give Studio the exact file type and visible error. File uploads, saved file IDs and every OpenAI endpoint are not interchangeable with the connector’s supported requests.

Costs and the information your app sends

Your connected provider handles its own API usage and billing. Those charges are separate from RNBlocks credits used while building your app. Review the provider’s quota and billing before testing with a large audience.

An AI feature sends the information needed for that request to its provider. Decide what your app should send, explain that clearly to your users, and test any permission and decline choices before release. Connecting a service does not automatically add a saved history, private file library or every feature in that provider’s API.

Update or disconnect

Open App options (+) → Connectors → OpenAI. To replace the saved credential, enter the new value and select Update, then test the feature again.

Disconnect removes this app’s saved OpenAI credential. Features that use it will need a working connection again. It does not close your provider account, cancel provider billing, revoke the original key at the provider, or erase data already sent there. Reopen Connectors to check the saved connection state.

Official references

Documentation
Open Studio