# Specify OPENAI API KEY as envsecret

**URL:** https://forum.weaviate.io/t/specify-openai-api-key-as-envsecret/4473
**Category:** Support
**Created:** [October 8, 2024, 9:29pm UTC](https://forum.weaviate.io/t/specify-openai-api-key-as-envsecret/4473 "2024-10-08T21:29:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![gmegh](https://avatars.discourse-cdn.com/v4/letter/g/5e9695/32.png) [@gmegh](https://forum.weaviate.io/u/gmegh)
#### Post date: [October 8, 2024, 9:29pm UTC](https://forum.weaviate.io/t/specify-openai-api-key-as-envsecret/4473/1 "2024-10-08T21:29:35Z")

</div>

How can I specify OPENAI API KEY as envsecret?

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [October 10, 2024, 7:17am UTC](https://forum.weaviate.io/t/specify-openai-api-key-as-envsecret/4473/2 "2024-10-10T07:17:11Z")

</div>

hi @gmegh !

You can define, as a env variable:

OPENAI\_APIKEY

Here you can find the mention in our docs:

> **[Text Embeddings | Weaviate](https://weaviate.io/developers/weaviate/model-providers/openai/embeddings#api-credentials)**
>
> For Azure OpenAI integration docs, see this page instead.

Let me know if this helps!

Thanks!
