Title: Calling Open AI API
Last modified: September 17, 2022

---

# Calling Open AI API

 *  [jurislogic](https://wordpress.org/support/users/jurislogic/)
 * (@jurislogic)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/calling-open-ai-api/)
 * Hi everyone 🙂 I’m just starting to learn some developpement basics and i have
   a project in mind, but after spending a lot of time in research i find my self
   lost !
 * I would like to do the folowing on a simple wordpress page, using any theme (
   don’t think the theme here is relevant)
 * I would like to create a simple form (that i can do ahah)
 * then use the content inserted to replace the “prompt” in the curl request, to
   make an call to the OPEN AI API so i can generate content for my users.
 * This is the curl request provided ny OPEN AI :
 *     ```
       curl https://api.openai.com/v1/completions \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer $OPENAI_API_KEY" \
         -d '{
         "model": "text-davinci-002",
         "prompt": "Create an outline for an essay about Nikola Tesla and his contributions to technology:",
         "temperature": 0,
         "max_tokens": 150,
         "top_p": 1,
         "frequency_penalty": 0,
         "presence_penalty": 0
       }
       ```
   
 * But now i’m stuck. How can i make this call to the OPEN AI API from wordpress?
 * Any guidance, or reading i should do, or step by step explanation would be amazing!

The topic ‘Calling Open AI API’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [jurislogic](https://wordpress.org/support/users/jurislogic/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/calling-open-ai-api/)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
