# How to associate Custom instructions with an API key?

**URL:** <https://community.openai.com/t/how-to-associate-custom-instructions-with-an-api-key/328849>\
**Category:** API\
**Created:** [August 24, 2023, 6:33pm UTC](https://community.openai.com/t/how-to-associate-custom-instructions-with-an-api-key/328849 "2023-08-24T18:33:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![k9rescue](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/k9rescue/32/528347_2.png) [@k9rescue](https://community.openai.com/u/k9rescue)\
**Post date:** [August 24, 2023, 6:33pm UTC](https://community.openai.com/t/how-to-associate-custom-instructions-with-an-api-key/328849/1 "2023-08-24T18:33:25Z")

</div>

I’m using an API key to access text-davinci-003. Is there a way to associate custom instructions with the key?

---

<div class="post-metadata">

**Author:** ![novaphil](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/novaphil/32/130934_2.png) [@novaphil](https://community.openai.com/u/novaphil)\
**Post date:** [August 24, 2023, 6:35pm UTC](https://community.openai.com/t/how-to-associate-custom-instructions-with-an-api-key/328849/2 "2023-08-24T18:35:45Z")

</div>

No, the API does not have any sort of instruction/prompt/history storage. You’ll need to handle this in your code and send the full prompt with each request.

---

<div class="post-metadata">

**Author:** ![k9rescue](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/k9rescue/32/528347_2.png) [@k9rescue](https://community.openai.com/u/k9rescue)\
**Post date:** [August 24, 2023, 6:40pm UTC](https://community.openai.com/t/how-to-associate-custom-instructions-with-an-api-key/328849/3 "2023-08-24T18:40:28Z")

</div>

Ah - too bad! That would make a great feature 🙂

---

<div class="post-metadata">

**Author:** ![\_j](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/32/766292_2.png) [@\_j](https://community.openai.com/u/_j)\
**Post date:** [August 24, 2023, 7:02pm UTC](https://community.openai.com/t/how-to-associate-custom-instructions-with-an-api-key/328849/4 "2023-08-24T19:02:25Z")

</div>

The API allows you to program the AI any way you want, even per-turn.

> **[Chat Completions API system message vs Custom Instructions in UI | OpenAI...](https://help.openai.com/en/articles/8234522-chat-completions-api-system-message-vs-custom-instructions-in-ui)**
>
> Relationship between custom instructions in the ChatGPT UI and achieving a similar effect in the OpenAI API.

text-davinci-003 doesn’t take specific formatted role messages like newer gpt-xxx models. You can simply insert more text for the completion to follow if you have prompt-engineered the equivalent of a “system message”.
