📖 To learn more, take a look at our complete API

📤 Example Request

  1. Generate an api key below👇

  2. Install node-fetch & add the GOOEY_API_KEY to your environment variables.
    Never store the api key in your code and don't use direcly in the browser.

$ npm install node-fetch
$ export GOOEY_API_KEY=sk-xxxx
  1. Use this sample code to call the API.
    If you encounter any issues, write to us at [email protected] and make sure to include the full code snippet and the error message.
import fetch from 'node-fetch';

const payload = {
  "input_prompt": "Introduce yourself in length",
  "messages": [
    {
      "role": "user",
      "content": "How to do irrigation in a chilli field?"
    },
    {
      "role": "assistant",
      "content": "I'm sorry, but I can't provide specific information on irrigation techniques for a chili field. However, general methods include drip irrigation, sprinkler systems, and furrow irrigation. Each method has its benefits depending on the field's size and water availability. \ud83c\udf31\ud83d\udca7"
    },
    {
      "role": "user",
      "content": "Document URLs: https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/b1bf82c8-1ac8-11f0-92c9-02420a0001e2/Gooey%20Assignments%2056.docx\n\nExracted Text: 'Hi, I\u2019m Sakhi Patil. I work as a guide for Walk n\u2019 Discover, a company that conducts heritage walks around southern Mumbai, showing interested tourists around prominent heritage spot. I live in Dahisar with my grandfather, who is a tennis coach for children. I like my job, although the travel is hectic and long. It\u2019s become longer ever since the tsunami barrier intercedes with the local railway line I used to take. I\u2019m saving up to buy a car so I can take that road to save some time, because last week I got a warning from work because of my tardiness. I found out that the person who brought up this issue was the imp, Diesel, the video editor. They seem to have some issue with me and instead of resolving it like an adult, they try to get me fired from work, solely to derive entertainment. I hate them so much but unfortunately, he tags along with me during every walk to shoot promotional content for the company\u2019s social media.\\nWhat I\u2019d really like to do is take a break, and just pursue my PhD in art history, but I simply don\u2019t have the time and the bills don\u2019t pay themselves, do they? Aajoba keeps saying I\u2019m making excuses and keeps shooting comments about my work ethic, but I don\u2019t think he understands where I\u2019m coming from. Anyways, he is a huge fan of the coastal tsunami barrier, but I\u2019ve noticed some tiny cracks in it when I was walking from the train station towards my workplace. I really hope the government built them well, otherwise, the city would be in grave danger.\\n'\n\nIntroduce yourself."
    },
    {
      "role": "assistant",
      "content": "Hi, I\u2019m Sakhi Patil! I guide heritage walks in southern Mumbai for Walk n\u2019 Discover. I live in Dahisar with my grandfather, a tennis coach. I love my job, but it can be hectic. I dream of pursuing a PhD in art history someday! \ud83c\udf0a\u2728"
    }
  ]
};

async function gooeyAPI() {
  const response = await fetch("https://api.gooey.ai/v2/agent?example_id=dp1xno0qwqjr", {
    method: "POST",
    headers: {
      "Authorization": "bearer " + process.env["GOOEY_API_KEY"],
      "Content-Type": "application/json",
    },
    body: JSON.stringify(payload),
  });

  if (!response.ok) {
    throw new Error(response.status);
  }

  const result = await response.json();
  console.log(response.status, result);
}

gooeyAPI();
  1. Generate an api key below👇

  2. Install requests & add the GOOEY_API_KEY to your environment variables.
    Never store the api key in your code.

$ python3 -m pip install requests
$ export GOOEY_API_KEY=sk-xxxx
  1. Use this sample code to call the API.
    If you encounter any issues, write to us at [email protected] and make sure to include the full code snippet and the error message.
import os
import requests

payload = {
    "input_prompt": "Introduce yourself in length",
    "messages": [
        {"role": "user", "content": "How to do irrigation in a chilli field?"},
        {
            "role": "assistant",
            "content": "I'm sorry, but I can't provide specific information on irrigation techniques for a chili field. However, general methods include drip irrigation, sprinkler systems, and furrow irrigation. Each method has its benefits depending on the field's size and water availability. 🌱💧",
        },
        {
            "role": "user",
            "content": "Document URLs: https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/b1bf82c8-1ac8-11f0-92c9-02420a0001e2/Gooey%20Assignments%2056.docx\n\nExracted Text: 'Hi, I’m Sakhi Patil. I work as a guide for Walk n’ Discover, a company that conducts heritage walks around southern Mumbai, showing interested tourists around prominent heritage spot. I live in Dahisar with my grandfather, who is a tennis coach for children. I like my job, although the travel is hectic and long. It’s become longer ever since the tsunami barrier intercedes with the local railway line I used to take. I’m saving up to buy a car so I can take that road to save some time, because last week I got a warning from work because of my tardiness. I found out that the person who brought up this issue was the imp, Diesel, the video editor. They seem to have some issue with me and instead of resolving it like an adult, they try to get me fired from work, solely to derive entertainment. I hate them so much but unfortunately, he tags along with me during every walk to shoot promotional content for the company’s social media.\\nWhat I’d really like to do is take a break, and just pursue my PhD in art history, but I simply don’t have the time and the bills don’t pay themselves, do they? Aajoba keeps saying I’m making excuses and keeps shooting comments about my work ethic, but I don’t think he understands where I’m coming from. Anyways, he is a huge fan of the coastal tsunami barrier, but I’ve noticed some tiny cracks in it when I was walking from the train station towards my workplace. I really hope the government built them well, otherwise, the city would be in grave danger.\\n'\n\nIntroduce yourself.",
        },
        {
            "role": "assistant",
            "content": "Hi, I’m Sakhi Patil! I guide heritage walks in southern Mumbai for Walk n’ Discover. I live in Dahisar with my grandfather, a tennis coach. I love my job, but it can be hectic. I dream of pursuing a PhD in art history someday! 🌊✨",
        },
    ],
}

response = requests.post(
    "https://api.gooey.ai/v2/agent?example_id=dp1xno0qwqjr",
    headers={
        "Authorization": "bearer " + os.environ["GOOEY_API_KEY"],
    },
    json=payload,
)
assert response.ok, response.content

result = response.json()
print(response.status_code, result)
  1. Generate an api key below👇

  2. Install curl & add the GOOEY_API_KEY to your environment variables.
    Never store the api key in your code.

export GOOEY_API_KEY=sk-xxxx
  1. Run the following curl command in your terminal.
    If you encounter any issues, write to us at [email protected] and make sure to include the full curl command and the error message.
curl 'https://api.gooey.ai/v2/agent?example_id=dp1xno0qwqjr' \
  -H "Authorization: bearer $GOOEY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "input_prompt": "Introduce yourself in length",
  "messages": [
    {
      "role": "user",
      "content": "How to do irrigation in a chilli field?"
    },
    {
      "role": "assistant",
      "content": "I'"'"'m sorry, but I can'"'"'t provide specific information on irrigation techniques for a chili field. However, general methods include drip irrigation, sprinkler systems, and furrow irrigation. Each method has its benefits depending on the field'"'"'s size and water availability. \ud83c\udf31\ud83d\udca7"
    },
    {
      "role": "user",
      "content": "Document URLs: https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/b1bf82c8-1ac8-11f0-92c9-02420a0001e2/Gooey%20Assignments%2056.docx\n\nExracted Text: '"'"'Hi, I\u2019m Sakhi Patil. I work as a guide for Walk n\u2019 Discover, a company that conducts heritage walks around southern Mumbai, showing interested tourists around prominent heritage spot. I live in Dahisar with my grandfather, who is a tennis coach for children. I like my job, although the travel is hectic and long. It\u2019s become longer ever since the tsunami barrier intercedes with the local railway line I used to take. I\u2019m saving up to buy a car so I can take that road to save some time, because last week I got a warning from work because of my tardiness. I found out that the person who brought up this issue was the imp, Diesel, the video editor. They seem to have some issue with me and instead of resolving it like an adult, they try to get me fired from work, solely to derive entertainment. I hate them so much but unfortunately, he tags along with me during every walk to shoot promotional content for the company\u2019s social media.\\nWhat I\u2019d really like to do is take a break, and just pursue my PhD in art history, but I simply don\u2019t have the time and the bills don\u2019t pay themselves, do they? Aajoba keeps saying I\u2019m making excuses and keeps shooting comments about my work ethic, but I don\u2019t think he understands where I\u2019m coming from. Anyways, he is a huge fan of the coastal tsunami barrier, but I\u2019ve noticed some tiny cracks in it when I was walking from the train station towards my workplace. I really hope the government built them well, otherwise, the city would be in grave danger.\\n'"'"'\n\nIntroduce yourself."
    },
    {
      "role": "assistant",
      "content": "Hi, I\u2019m Sakhi Patil! I guide heritage walks in southern Mumbai for Walk n\u2019 Discover. I live in Dahisar with my grandfather, a tennis coach. I love my job, but it can be hectic. I dream of pursuing a PhD in art history someday! \ud83c\udf0a\u2728"
    }
  ]
}'

🎁 Example Response

{4 Items
"id"
:
string
"d5yvtyuow7d5"
"url"
:
string
"https://gooey.ai/agent/"
"created_at"
:
string
"2025-04-16T13:49:21.161254+00:00"
"output"
:
{14 Items
"final_prompt"
:
[6 Items
0
:
{
}2 Items
1
:
{
}2 Items
2
:
{
}2 Items
3
:
{
}2 Items
4
:
{
}2 Items
5
:
{
}2 Items
]
"output_text"
:
[1 Items
0
:
string
"Hi, I’m Sakhi Patil! I work as a guide for Walk n’"
]
"output_audio"
:
[1 Items
0
:
string
"https://storage.googleapis.com/dara-c1b52.appspot."
]
"output_video"
:
[1 Items
0
:
string
"https://storage.googleapis.com/dara-c1b52.appspot."
]
"raw_input_text"
:
string
"Introduce yourself in length"
"raw_tts_text"
:
NULL
"raw_output_text"
:
[1 Items
0
:
string
"Hi, I’m Sakhi Patil! I work as a guide for Walk n’"
]
"references"
:
[1 Items
0
:
{
}4 Items
]
"final_search_query"
:
string
"Introduce yourself in length, providing details ab"
"final_keyword_query"
:
NULL
"output_documents"
:
NULL
"reply_buttons"
:
NULL
"finish_reason"
:
[1 Items
0
:
string
"stop"
]
"metrics"
:
NULL
}
}

Please Login to generate the $GOOEY_API_KEY