Emergent

Building Your App › Integrations

OpenAI (ChatGPT) Integration

Add AI chat and text generation to your app with ChatGPT

What is OpenAI?

OpenAI is the company behind ChatGPT. You can add the same AI technology to your own app - for chatbots, content writing, answering questions, and more.

Perfect for:

  • AI chatbots and assistants
  • Generating content (blog posts, emails, etc.)
  • Answering customer questions
  • Helping users with tasks
  • Creative writing tools

The Easy Way: Emergent Universal Key

Note

Good news! You don't need to create an OpenAI account. Emergent provides a Universal Key that works with OpenAI, Claude, and Google AI - all in one! TLDR: View our article on the Universal Key to get started.

How to Get It

1

Click Your Profile

In Emergent, click your profile picture (top right)

2

Go to Universal Key

Select Universal Key from the menu

3

View Your Key

Your key is displayed there

4

Add Credits

Click Add Balance to add credits (starts at $10)

5

Done!

You're ready to use AI!

Pricing: Pay only for what you use (about $0.01 per 750 words)

Tell the Agent What You Want

Just describe what you're building! Here are examples:

Example 1: Customer Support Chatbot

I want to add an AI chatbot to help customers.

The chatbot should:
- Answer questions about my product
- Be friendly and helpful
- Remember the conversation
- Show typing indicator while thinking

Use Emergent Universal Key for OpenAI.
Use GPT-4 (the smart one).

Please set this up for me.

Example 2: Content Writer

I need a tool that writes blog posts.

Users should be able to:
- Enter a topic
- Choose blog length (short, medium, long)
- Click "Generate" and get a complete blog post
- Copy the result

Use Emergent Universal Key for OpenAI.
Use GPT-4.

Please set this up for me.

Example 3: Q&A Assistant

I want users to ask questions and get AI answers.

Features:
- Simple question box
- AI provides detailed answer
- Show sources if possible
- Keep history of past questions

Use Emergent Universal Key for OpenAI.

Please set this up for me.

Tip

That's it! Just tell the agent what you want in plain English. No technical knowledge needed.


Choose Your AI Model

Think of models like different versions of AI - some are smarter but cost more:

Not sure which to choose? Start with GPT-4 Turbo - it's the best balance.

Test Your AI

After the agent sets it up:

1

Click Preview

In Emergent, click the Preview button

2

Try It Out

If it's a chat: Send a message

If it's a generator: Enter some text and click generate

3

Wait for AI

The AI will think for a few seconds, then respond

4

Test Different Things

Try asking different questions

Test if the conversation memory works

5

Check It Makes Sense

Make sure the AI responses are helpful and accurate

Tip: If the AI isn't responding the way you want, tell the agent:

The AI responses are [too long/too short/not helpful enough].
Can you adjust it to be more [specific/concise/friendly]?

Managing Your Credits

Check Your Balance

  1. Profile → Universal Key
  2. See remaining credits
  3. View usage history

Add More Credits

  1. Click Add Balance
  2. Choose amount (10, 25, 50, or custom)
  3. Complete payment
  4. Credits added instantly!

Set Up Auto-Recharge (Optional)

  1. Profile → Universal Key
  2. Enable Auto-recharge
  3. Choose amount and trigger point
  4. Never run out of credits!

Example: Auto-add 5 credits when running out of balance.

How Much Does It Cost?

Very affordable! Here's what you get:

GPT-4 Turbo (recommended):

  • About $0.01 per 750 words
  • A full conversation (10 messages): ~$0.05
  • 1,000 customer questions: ~$10

GPT-3.5 (cheaper option):

  • About $0.002 per 750 words
  • A full conversation: ~$0.01
  • 1,000 customer questions: ~$2

Note

With the Emergent Universal Key, you only pay for what you use. No monthly fees!

Common Questions

No! Just use the Emergent Universal Key. It's simpler and you can use it for multiple AI providers.

Yes! Tell the agent:

I want the AI to know about my business:
- We sell [products/services]
- Our pricing is [details]
- Common customer questions are [list]

Please train it on this information.

AI isn't perfect. Tell the agent:

The AI is giving incorrect information about [topic].
It should say [correct information] instead.
Can you fix this?

Yes! Tell the agent:

The AI responses are too long. 
Can you make them more concise (2-3 sentences max)?

Yes. Conversations are private and not used to train OpenAI's models (when using their API).

Something Not Working?

AI Not Responding

Tell the agent:

The AI isn't responding when I send a message.
Can you check the OpenAI integration?

"Out of Credits" Error

Solution:

  1. Go to Profile → Universal Key
  2. Add more credits
  3. Try again

Responses Are Too Slow

Tell the agent:

The AI is taking too long to respond.
Can you make it faster or show a better loading indicator?

AI Personality Isn't Right

Tell the agent:

I want the AI to be more [professional/friendly/casual/technical].
Can you adjust its personality?

Real Examples

Example 1: Recipe Generator

Build a recipe generator where users:
1. Enter ingredients they have
2. Click "Generate Recipe"
3. Get a complete recipe with instructions

Use Emergent Universal Key with GPT-4.
Make the recipes creative and easy to follow.

Please build this for me.

Example 2: Email Writer

I need a tool that writes professional emails.

Users enter:
- What the email is about
- Tone (formal, casual, friendly)
- Key points to include

The AI generates a complete email they can copy.

Use Emergent Universal Key with GPT-4.

Please build this.

Example 3: Study Buddy

Create a study assistant where students can:
- Ask questions about any topic
- Get explained answers
- Request practice questions
- Get homework help

Make it encouraging and patient.
Remember the conversation topic.

Use Emergent Universal Key with GPT-4.

Please build this.

Making Your AI Better

Give It Personality

Make the AI chatbot sound like:
- A friendly expert
- Professional but warm
- Enthusiastic and encouraging

Add these traits to my AI.

Add Knowledge

Teach the AI about:
- My product features
- Common customer issues  
- Company policies
- FAQ answers

Here's the information: [paste details]

Set Boundaries

The AI should NOT:
- Make promises about pricing
- Give medical/legal advice
- Share personal information
- Discuss competitors

Please add these restrictions.

Tips for Best Results

Start Simple

Begin with basic features

Add complexity later

Test Thoroughly

Try many different questions

Find edge cases

Monitor Usage

Check credit usage regularly

Optimize if needed

Get Feedback

Ask users what they think

Improve based on feedback

Alternative: Use Your Own OpenAI Key

If you prefer to use your own OpenAI account:

1

Create OpenAI Account

2

Add Payment Method

OpenAI requires a credit card on file

3

Create API Key

Go to API Keys → Create new key

4

Copy Key

Starts with sk-proj-

5

Tell Agent

Use my OpenAI API key instead of Emergent Universal Key:
sk-proj-xxxxxxxxxxxxx

Quick Checklist

Before going live:

  • Tested AI with many different questions
  • AI responses are helpful and accurate
  • Added enough credits to Universal Key
  • Set up auto-recharge (optional)
  • Tested on different devices
  • AI has the right personality/tone
  • Taught AI about your business (if needed)

Get Help

Universal Key

Profile → Universal Key

Manage credits and usage

Ask the Agent

Describe what's not working

Agent will fix it

Support

support@emergent.sh

We're here to help

Use Emergent Universal Key - It's the easiest way

Start with GPT-4 Turbo - Best balance of cost and quality

Test everything before launching to users

Monitor your credits - Set up auto-recharge if needed

Keep improving - Tell the agent what to adjust based on user feedback

Info

Stuck? Just tell the agent: "I need help with my AI chatbot" and explain what you want to change or fix.

Made with Emergent