# OpenAI API 키 설정

**URL:** https://meta.discourse.org/t/configure-api-keys-for-openai/280783
**Category:** Integrations
**Tags:** how-to, ai
**Created:** [10월 2, 2023, 6:04오후 UTC](https://meta.discourse.org/t/configure-api-keys-for-openai/280783 "2023-10-02T18:04:22Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2월 23, 2024, 4:14오후 UTC](https://meta.discourse.org/t/configure-api-keys-for-openai/280783/7 "2024-02-23T16:14:14Z")

</div>

다음 명령어를 실행하면 어떤 출력이 나올까요?

```plaintext
curl https://api.openai.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $OPENAI_API_KEY" -d '{
    "model": "gpt-4",
    "messages": [
      {
        "role": "system",
        "content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."
      },
      {
        "role": "user",
        "content": "Compose a poem that explains the concept of recursion in programming."
      }
    ]
  }'

```

Discourse 서버에서 실행할 때, 명령어에 API 키를 넣는 것을 잊지 마세요.

---

_[View the full topic](https://meta.discourse.org/t/configure-api-keys-for-openai/280783)._
