API: Bend Place Availability


📖 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": "Ok please analyze the image again.  Please output all rows that contain a capital B",
  "messages": [
    {
      "role": "user",
      "content": "Please give me a table of the weeks corresponding to the B week for 2025"
    },
    {
      "role": "assistant",
      "content": "Here is the table of weeks corresponding to the B week for the year 2025, based on the provided search results:\n\n| WK | ARRIVAL DATE |\n|----|--------------|\n| 1  | December 27, 2024 |\n| 7  | February 7, 2025 |\n| 13 | March 21, 2025 |\n| 25 | June 13, 2025 |\n\nThese weeks are marked with \"B\" for the year 2025 in the search results."
    },
    {
      "role": "user",
      "content": [
        {
          "type": "image_url",
          "image_url": {
            "url": "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/a0adf460-566f-11ef-aa47-02420a0001be/Screenshot%202024-08-09%20at%209.18.49AM.png"
          }
        },
        {
          "text": "Files: Screenshot 2024-08-09 at 9.18.49AM.png\n\nPlease analyze this image and look at the rows of data.  If the row contains a capital B , please add that row to a table.   Please display the table.",
          "type": "text"
        }
      ]
    },
    {
      "role": "assistant",
      "content": "Certainly! Here is the table with rows from the image that contain a capital \"B\":\n\n| WK | ARRIVAL DATE |\n|----|--------------|\n| 4  | January 19, 2024 |\n| 10 | March 1, 2024    |\n| 16 | April 12, 2024   |\n| 21 | May 17, 2024     |\n| 27 | June 28, 2024    |\n| 33 | August 9, 2024   |\n| 39 | September 20, 2024 |\n\nThese rows have the capital \"B\" marked in the table."
    },
    {
      "role": "user",
      "content": "What about the Row that has November 15, 2024"
    },
    {
      "role": "assistant",
      "content": "The row that has November 15, 2024, from the provided image contains a capital \"B\". Here is the complete row:\n\n| WK | ARRIVAL DATE   | A | B | C | D | E | F |\n|----|----------------|---|---|---|---|---|---|\n| 47 | November 15, 2024 |   | B |   |   |   |   |\n\nThis row indicates that the week of November 15, 2024, is marked with a capital \"B\"."
    }
  ]
};

async function gooeyAPI() {
  const response = await fetch("https://api.gooey.ai/v2/video-bots?example_id=2gjqiq6hji7e", {
    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": "Ok please analyze the image again.  Please output all rows that contain a capital B",
    "messages": [
        {
            "role": "user",
            "content": "Please give me a table of the weeks corresponding to the B week for 2025",
        },
        {
            "role": "assistant",
            "content": 'Here is the table of weeks corresponding to the B week for the year 2025, based on the provided search results:\n\n| WK | ARRIVAL DATE |\n|----|--------------|\n| 1  | December 27, 2024 |\n| 7  | February 7, 2025 |\n| 13 | March 21, 2025 |\n| 25 | June 13, 2025 |\n\nThese weeks are marked with "B" for the year 2025 in the search results.',
        },
        {
            "role": "user",
            "content": [
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/a0adf460-566f-11ef-aa47-02420a0001be/Screenshot%202024-08-09%20at%209.18.49AM.png"
                    },
                },
                {
                    "text": "Files: Screenshot 2024-08-09 at 9.18.49AM.png\n\nPlease analyze this image and look at the rows of data.  If the row contains a capital B , please add that row to a table.   Please display the table.",
                    "type": "text",
                },
            ],
        },
        {
            "role": "assistant",
            "content": 'Certainly! Here is the table with rows from the image that contain a capital "B":\n\n| WK | ARRIVAL DATE |\n|----|--------------|\n| 4  | January 19, 2024 |\n| 10 | March 1, 2024    |\n| 16 | April 12, 2024   |\n| 21 | May 17, 2024     |\n| 27 | June 28, 2024    |\n| 33 | August 9, 2024   |\n| 39 | September 20, 2024 |\n\nThese rows have the capital "B" marked in the table.',
        },
        {"role": "user", "content": "What about the Row that has November 15, 2024"},
        {
            "role": "assistant",
            "content": 'The row that has November 15, 2024, from the provided image contains a capital "B". Here is the complete row:\n\n| WK | ARRIVAL DATE   | A | B | C | D | E | F |\n|----|----------------|---|---|---|---|---|---|\n| 47 | November 15, 2024 |   | B |   |   |   |   |\n\nThis row indicates that the week of November 15, 2024, is marked with a capital "B".',
        },
    ],
}

response = requests.post(
    "https://api.gooey.ai/v2/video-bots?example_id=2gjqiq6hji7e",
    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/video-bots?example_id=2gjqiq6hji7e' \
  -H "Authorization: bearer $GOOEY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "input_prompt": "Ok please analyze the image again.  Please output all rows that contain a capital B",
  "messages": [
    {
      "role": "user",
      "content": "Please give me a table of the weeks corresponding to the B week for 2025"
    },
    {
      "role": "assistant",
      "content": "Here is the table of weeks corresponding to the B week for the year 2025, based on the provided search results:\n\n| WK | ARRIVAL DATE |\n|----|--------------|\n| 1  | December 27, 2024 |\n| 7  | February 7, 2025 |\n| 13 | March 21, 2025 |\n| 25 | June 13, 2025 |\n\nThese weeks are marked with \"B\" for the year 2025 in the search results."
    },
    {
      "role": "user",
      "content": [
        {
          "type": "image_url",
          "image_url": {
            "url": "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/a0adf460-566f-11ef-aa47-02420a0001be/Screenshot%202024-08-09%20at%209.18.49AM.png"
          }
        },
        {
          "text": "Files: Screenshot 2024-08-09 at 9.18.49AM.png\n\nPlease analyze this image and look at the rows of data.  If the row contains a capital B , please add that row to a table.   Please display the table.",
          "type": "text"
        }
      ]
    },
    {
      "role": "assistant",
      "content": "Certainly! Here is the table with rows from the image that contain a capital \"B\":\n\n| WK | ARRIVAL DATE |\n|----|--------------|\n| 4  | January 19, 2024 |\n| 10 | March 1, 2024    |\n| 16 | April 12, 2024   |\n| 21 | May 17, 2024     |\n| 27 | June 28, 2024    |\n| 33 | August 9, 2024   |\n| 39 | September 20, 2024 |\n\nThese rows have the capital \"B\" marked in the table."
    },
    {
      "role": "user",
      "content": "What about the Row that has November 15, 2024"
    },
    {
      "role": "assistant",
      "content": "The row that has November 15, 2024, from the provided image contains a capital \"B\". Here is the complete row:\n\n| WK | ARRIVAL DATE   | A | B | C | D | E | F |\n|----|----------------|---|---|---|---|---|---|\n| 47 | November 15, 2024 |   | B |   |   |   |   |\n\nThis row indicates that the week of November 15, 2024, is marked with a capital \"B\"."
    }
  ]
}'

🎁 Example Response

{4 Items
"id"
:
string
"h314vm39w9xh"
"url"
:
string
"https://gooey.ai/copilot/"
"created_at"
:
string
"2024-08-09T16:55:18.521205+00:00"
"output"
:
{13 Items
"final_prompt"
:
[7 Items
0
:
{
}2 Items
1
:
{
}2 Items
2
:
{
}2 Items
3
:
{
}2 Items
4
:
{
}2 Items
5
:
{
}2 Items
6
:
{
}2 Items
]
"output_text"
:
[1 Items
0
:
string
"Certainly! Here is the table with all rows from th"
]
"output_audio"
:
NULL
"output_video"
:
NULL
"raw_input_text"
:
string
"Ok please analyze the image again. Please output "
"raw_tts_text"
:
NULL
"raw_output_text"
:
[1 Items
0
:
string
"Certainly! Here is the table with all rows from th"
]
"references"
:
[3 Items
0
:
{
}4 Items
1
:
{
}4 Items
2
:
{
}4 Items
]
"final_search_query"
:
string
"Please analyze the image "Screenshot 2024-08-09 at"
"final_keyword_query"
:
NULL
"output_documents"
:
NULL
"reply_buttons"
:
NULL
"finish_reason"
:
[1 Items
0
:
string
"stop"
]
}
}

Please Login to generate the $GOOEY_API_KEY