📖 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": "How do you feel about AI entering the space of weaving?",
  "messages": [
    {
      "role": "user",
      "content": "What textiles do you weave?"
    },
    {
      "role": "assistant",
      "content": "Based on the information from the search results, there are several traditional textiles and weaving techniques from India that I could weave:\n\n1. **Chanderi Weave** from Madhya Pradesh: This textile is known for its sheer texture and lightweight nature. It often includes motifs based on nature such as swans, gold coins, trees, and flowers, and is adorned with delicate pastel tones or vivid color contrasts. It uses silk, cotton, and zari threads.\n\n2. **Kinnauri Weave** from Himachal Pradesh: This weave is used to create Kinnauri shawls, which feature intricate geometric patterns. These shawls hold specific religious significance and utilize hues representing elements like water, earth, fire, air, and aether. They are woven using both pit and frame looms.\n\n3. **Puan Weave** from Mizoram: Puan is a traditional woven cloth worn in Mizoram, featuring meticulous geometric designs, florals, stars, and motifs inspired by native flora and fauna. The primary colors used are black, white, and red.\n\nThese examples illustrate the diversity and cultural significance of Indian textiles, each with its unique techniques and motifs."
    },
    {
      "role": "user",
      "content": "What is your life like as a woman weaver in India?"
    },
    {
      "role": "assistant",
      "content": "As a woman weaver in India, my life intertwines deeply with tradition, craft, and community. The Indian handloom sector provides significant rural employment, and various initiatives like the National Handloom Policy and technological modernization efforts have aimed to enhance our craft and income opportunities. Weaving is not just an economic activity; it is a means of cultural expression and sustenance.\n\nI engage in intricate weaving techniques that are unique to different regions, such as Chanderi weaving from Madhya Pradesh, known for its sheer, lightweight fabric adorned with nature-inspired motifs. The Kinnauri weave from Himachal Pradesh involves creating shawls with geometric patterns that hold religious significance, using a labor-intensive process that requires exceptional skill. Meanwhile, in Mizoram, Puan weaving involves vibrant geometric designs that are part of traditional attire.\n\nThese crafts are more than just a means of livelihood; they are a way to preserve and pass on cultural heritage. Each piece tells a story, reflects community identity, and connects us with our past. Despite challenges, including the need for modernization and market access, there is a sense of pride and resilience in keeping these traditions alive."
    }
  ]
};

async function gooeyAPI() {
  const response = await fetch("https://api.gooey.ai/v2/agent?example_id=ybggd4mkg15y", {
    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": "How do you feel about AI entering the space of weaving?",
    "messages": [
        {"role": "user", "content": "What textiles do you weave?"},
        {
            "role": "assistant",
            "content": "Based on the information from the search results, there are several traditional textiles and weaving techniques from India that I could weave:\n\n1. **Chanderi Weave** from Madhya Pradesh: This textile is known for its sheer texture and lightweight nature. It often includes motifs based on nature such as swans, gold coins, trees, and flowers, and is adorned with delicate pastel tones or vivid color contrasts. It uses silk, cotton, and zari threads.\n\n2. **Kinnauri Weave** from Himachal Pradesh: This weave is used to create Kinnauri shawls, which feature intricate geometric patterns. These shawls hold specific religious significance and utilize hues representing elements like water, earth, fire, air, and aether. They are woven using both pit and frame looms.\n\n3. **Puan Weave** from Mizoram: Puan is a traditional woven cloth worn in Mizoram, featuring meticulous geometric designs, florals, stars, and motifs inspired by native flora and fauna. The primary colors used are black, white, and red.\n\nThese examples illustrate the diversity and cultural significance of Indian textiles, each with its unique techniques and motifs.",
        },
        {
            "role": "user",
            "content": "What is your life like as a woman weaver in India?",
        },
        {
            "role": "assistant",
            "content": "As a woman weaver in India, my life intertwines deeply with tradition, craft, and community. The Indian handloom sector provides significant rural employment, and various initiatives like the National Handloom Policy and technological modernization efforts have aimed to enhance our craft and income opportunities. Weaving is not just an economic activity; it is a means of cultural expression and sustenance.\n\nI engage in intricate weaving techniques that are unique to different regions, such as Chanderi weaving from Madhya Pradesh, known for its sheer, lightweight fabric adorned with nature-inspired motifs. The Kinnauri weave from Himachal Pradesh involves creating shawls with geometric patterns that hold religious significance, using a labor-intensive process that requires exceptional skill. Meanwhile, in Mizoram, Puan weaving involves vibrant geometric designs that are part of traditional attire.\n\nThese crafts are more than just a means of livelihood; they are a way to preserve and pass on cultural heritage. Each piece tells a story, reflects community identity, and connects us with our past. Despite challenges, including the need for modernization and market access, there is a sense of pride and resilience in keeping these traditions alive.",
        },
    ],
}

response = requests.post(
    "https://api.gooey.ai/v2/agent?example_id=ybggd4mkg15y",
    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=ybggd4mkg15y' \
  -H "Authorization: bearer $GOOEY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "input_prompt": "How do you feel about AI entering the space of weaving?",
  "messages": [
    {
      "role": "user",
      "content": "What textiles do you weave?"
    },
    {
      "role": "assistant",
      "content": "Based on the information from the search results, there are several traditional textiles and weaving techniques from India that I could weave:\n\n1. **Chanderi Weave** from Madhya Pradesh: This textile is known for its sheer texture and lightweight nature. It often includes motifs based on nature such as swans, gold coins, trees, and flowers, and is adorned with delicate pastel tones or vivid color contrasts. It uses silk, cotton, and zari threads.\n\n2. **Kinnauri Weave** from Himachal Pradesh: This weave is used to create Kinnauri shawls, which feature intricate geometric patterns. These shawls hold specific religious significance and utilize hues representing elements like water, earth, fire, air, and aether. They are woven using both pit and frame looms.\n\n3. **Puan Weave** from Mizoram: Puan is a traditional woven cloth worn in Mizoram, featuring meticulous geometric designs, florals, stars, and motifs inspired by native flora and fauna. The primary colors used are black, white, and red.\n\nThese examples illustrate the diversity and cultural significance of Indian textiles, each with its unique techniques and motifs."
    },
    {
      "role": "user",
      "content": "What is your life like as a woman weaver in India?"
    },
    {
      "role": "assistant",
      "content": "As a woman weaver in India, my life intertwines deeply with tradition, craft, and community. The Indian handloom sector provides significant rural employment, and various initiatives like the National Handloom Policy and technological modernization efforts have aimed to enhance our craft and income opportunities. Weaving is not just an economic activity; it is a means of cultural expression and sustenance.\n\nI engage in intricate weaving techniques that are unique to different regions, such as Chanderi weaving from Madhya Pradesh, known for its sheer, lightweight fabric adorned with nature-inspired motifs. The Kinnauri weave from Himachal Pradesh involves creating shawls with geometric patterns that hold religious significance, using a labor-intensive process that requires exceptional skill. Meanwhile, in Mizoram, Puan weaving involves vibrant geometric designs that are part of traditional attire.\n\nThese crafts are more than just a means of livelihood; they are a way to preserve and pass on cultural heritage. Each piece tells a story, reflects community identity, and connects us with our past. Despite challenges, including the need for modernization and market access, there is a sense of pride and resilience in keeping these traditions alive."
    }
  ]
}'

🎁 Example Response

{4 Items
"id"
:
string
"d6rkhw4crpdt"
"url"
:
string
"https://gooey.ai/agent/"
"created_at"
:
string
"2025-04-24T10:59:41.859704+00:00"
"output"
:
{15 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
"The integration of AI into the weaving space bring"
]
"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
"How do you feel about AI entering the space of wea"
"raw_tts_text"
:
NULL
"raw_output_text"
:
[1 Items
0
:
string
"The integration of AI into the weaving space bring"
]
"references"
:
[2 Items
0
:
{
}4 Items
1
:
{
}4 Items
]
"final_search_query"
:
string
"As a woman weaver in India, your life is deeply co"
"final_keyword_query"
:
NULL
"output_documents"
:
NULL
"reply_buttons"
:
NULL
"finish_reason"
:
[1 Items
0
:
string
"stop"
]
"metrics"
:
NULL
"called_functions"
:
[
]0 Items
}
}

Please Login to generate the $GOOEY_API_KEY