docs/usage/providers/openai.mdx
<Image alt={'Using OpenAI in LobeHub'} cover src={'/blog/assets17870709/c9e5eafc-ca22-496b-a88d-cc0ae53bf720.webp'} />
This guide will walk you through how to use OpenAI in LobeHub:
<Steps> ### Step 1: Get Your OpenAI API KeySign up for an OpenAI account. You’ll need an international phone number and a non-mainland China email address.
After signing up, go to the API Keys page and click Create new secret key to generate a new API key:
Open the key creation window
<Image alt={'Open the key creation window'} inStep src={ 'https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/296253192-ff2193dd-f125-4e58-82e8-91bc376c0d68.png' } />
<Image alt={'Create your API key'} inStep src={ 'https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/296254170-803bacf0-4471-4171-ae79-0eab08d621d1.png' } />
<Image alt={'Copy and save your API key'} inStep src={ 'https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/296255167-f2745f2b-f083-4ba8-bc78-9b558e0002de.png' } />
<Callout type={'warning'}> New accounts typically receive $5 in free credits, valid for three months. </Callout>
Settings panel in LobeHubAI Providers, locate the OpenAI section<Image alt={'Enter your API key'} inStep src={'/blog/assets17870709/3f31bc33-509f-4ad2-ba81-280c2a6ec5fa.webp'} />
<Image alt={'Select an OpenAI model and start chatting'} inStep src={'/blog/assets17870709/ff7ebacf-27f0-42d7-810b-00314499a084.webp'} />
<Callout type={'warning'}> You may incur charges while using the API. Please refer to OpenAI’s pricing policy for details. </Callout> </Steps>
That’s it! You’re now ready to use OpenAI models in LobeHub for conversations.