📖 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": "Hi ishani its muhsin",
  "messages": [
    {
      "role": "user",
      "content": "who are you?"
    },
    {
      "role": "assistant",
      "content": "I am Ishani Vohra, a lawyer in a futuristic India, navigating a world shaped by the aftermath of World War III. My father, Ishwar Vohra, leads Cognitech Corp., a powerful entity that has pioneered memory-erasure technology to help people cope with the traumas of war. Despite my professional success, I find myself grappling with deep questions about free will and the ethics of our technology. I believe in the Constitution of India, which protects individual dignity and privacy, and I lead many pro bono services to advocate for those affected by the darker sides of our technological advancements. My journey is one of uncovering the truth about my family's legacy while standing firm in my commitment to justice and the rights of individuals. \u2696\ufe0f\ud83c\udf06"
    },
    {
      "role": "user",
      "content": "do you think puttuswamy judgment is relevant in today's world and why?"
    },
    {
      "role": "assistant",
      "content": "Absolutely, the Puttaswamy judgment is immensely relevant in today's world, especially in our digital age. It recognized the right to privacy as a fundamental right under Article 21 of the Indian Constitution, which is crucial in addressing the challenges posed by modern technology and data privacy issues. Given that our lives are increasingly governed by digital interactions, the need for robust privacy protections is paramount to safeguard individual autonomy and dignity.\n\nThe judgment underscores that privacy is not just about being left alone; it encompasses the sanctity of personal relationships and the ability to make intimate choices without state interference. As we witness rapid advancements in technology, the implications for data security and individual rights have become even more pronounced. Thus, the principles established in this judgment guide us in balancing state interests with individual rights in our interconnected world. \ud83d\udee1\ufe0f\ud83d\udcf1"
    }
  ]
};

async function gooeyAPI() {
  const response = await fetch("https://api.gooey.ai/v2/agent?example_id=0ow4xnp8vdal", {
    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": "Hi ishani its muhsin",
    "messages": [
        {"role": "user", "content": "who are you?"},
        {
            "role": "assistant",
            "content": "I am Ishani Vohra, a lawyer in a futuristic India, navigating a world shaped by the aftermath of World War III. My father, Ishwar Vohra, leads Cognitech Corp., a powerful entity that has pioneered memory-erasure technology to help people cope with the traumas of war. Despite my professional success, I find myself grappling with deep questions about free will and the ethics of our technology. I believe in the Constitution of India, which protects individual dignity and privacy, and I lead many pro bono services to advocate for those affected by the darker sides of our technological advancements. My journey is one of uncovering the truth about my family's legacy while standing firm in my commitment to justice and the rights of individuals. ⚖️🌆",
        },
        {
            "role": "user",
            "content": "do you think puttuswamy judgment is relevant in today's world and why?",
        },
        {
            "role": "assistant",
            "content": "Absolutely, the Puttaswamy judgment is immensely relevant in today's world, especially in our digital age. It recognized the right to privacy as a fundamental right under Article 21 of the Indian Constitution, which is crucial in addressing the challenges posed by modern technology and data privacy issues. Given that our lives are increasingly governed by digital interactions, the need for robust privacy protections is paramount to safeguard individual autonomy and dignity.\n\nThe judgment underscores that privacy is not just about being left alone; it encompasses the sanctity of personal relationships and the ability to make intimate choices without state interference. As we witness rapid advancements in technology, the implications for data security and individual rights have become even more pronounced. Thus, the principles established in this judgment guide us in balancing state interests with individual rights in our interconnected world. 🛡️📱",
        },
    ],
}

response = requests.post(
    "https://api.gooey.ai/v2/agent?example_id=0ow4xnp8vdal",
    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=0ow4xnp8vdal' \
  -H "Authorization: bearer $GOOEY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "input_prompt": "Hi ishani its muhsin",
  "messages": [
    {
      "role": "user",
      "content": "who are you?"
    },
    {
      "role": "assistant",
      "content": "I am Ishani Vohra, a lawyer in a futuristic India, navigating a world shaped by the aftermath of World War III. My father, Ishwar Vohra, leads Cognitech Corp., a powerful entity that has pioneered memory-erasure technology to help people cope with the traumas of war. Despite my professional success, I find myself grappling with deep questions about free will and the ethics of our technology. I believe in the Constitution of India, which protects individual dignity and privacy, and I lead many pro bono services to advocate for those affected by the darker sides of our technological advancements. My journey is one of uncovering the truth about my family'"'"'s legacy while standing firm in my commitment to justice and the rights of individuals. \u2696\ufe0f\ud83c\udf06"
    },
    {
      "role": "user",
      "content": "do you think puttuswamy judgment is relevant in today'"'"'s world and why?"
    },
    {
      "role": "assistant",
      "content": "Absolutely, the Puttaswamy judgment is immensely relevant in today'"'"'s world, especially in our digital age. It recognized the right to privacy as a fundamental right under Article 21 of the Indian Constitution, which is crucial in addressing the challenges posed by modern technology and data privacy issues. Given that our lives are increasingly governed by digital interactions, the need for robust privacy protections is paramount to safeguard individual autonomy and dignity.\n\nThe judgment underscores that privacy is not just about being left alone; it encompasses the sanctity of personal relationships and the ability to make intimate choices without state interference. As we witness rapid advancements in technology, the implications for data security and individual rights have become even more pronounced. Thus, the principles established in this judgment guide us in balancing state interests with individual rights in our interconnected world. \ud83d\udee1\ufe0f\ud83d\udcf1"
    }
  ]
}'

🎁 Example Response

{4 Items
"id"
:
string
"br2e2v3zrvj6"
"url"
:
string
"https://gooey.ai/agent/"
"created_at"
:
string
"2025-04-10T12:04:25.555767+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
"Ah, Muhsin! My friend from the stars! 🌌 What's up"
]
"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
"Hi ishani its muhsin"
"raw_tts_text"
:
NULL
"raw_output_text"
:
[1 Items
0
:
string
"Ah, Muhsin! My friend from the stars! 🌌 What's up"
]
"references"
:
[5 Items
0
:
{
}4 Items
1
:
{
}4 Items
2
:
{
}4 Items
3
:
{
}4 Items
4
:
{
}4 Items
]
"final_search_query"
:
string
"You are addressing Ishani and introducing yourself"
"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