Skip to content

Commit dc7dd27

Browse files
Ambika Joshigitbook-bot
authored andcommitted
GITBOOK-240: No subject
1 parent e6ae299 commit dc7dd27

File tree

3 files changed

+82
-4
lines changed

3 files changed

+82
-4
lines changed
299 KB
Loading
105 KB
Loading

api-reference/getting-started.md

Lines changed: 82 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,85 @@ description: You can interact with our APIs through node.js, python or curl
44

55
# Getting started
66

7-
## CREATE AN API KEY
7+
Use Gooey.AI's APIs to build fast! Get started by trying these simple setups - **No servers, API keys, or rate limits to manage.**
8+
9+
{% tabs %}
10+
{% tab title="Orchestration to webview in minutes" %}
11+
Embed your custom AI workflow on your website or app as a webview instantly. Customize the look and feel in seconds.
12+
13+
```javascript
14+
<div id="gooey-embed"></div>
15+
<script>
16+
function onLoadGooeyEmbed() {
17+
GooeyEmbed.mount({});
18+
}
19+
</script>
20+
<script async defer onload="onLoadGooeyEmbed()" src="
21+
https://gooey.ai/chat/gooey-base-copilot-Kbo/lib.js
22+
"></script>
23+
```
24+
25+
Pass custom in-app context
26+
27+
{% code overflow="wrap" %}
28+
```javascript
29+
GooeyEmbed.mount({ payload: { variables: { username: "John Appleseed" } } });
30+
```
31+
{% endcode %}
32+
33+
{% embed url="https://github.com/GooeyAI/gooey-web-widget" %}
34+
{% endtab %}
35+
36+
{% tab title="Stream AI Responses, Live in Your App" %}
37+
**Real-time results, zero infrastructure**\
38+
Stream AI responses directly to users with tool use, voice, image, and video — all client-side. No servers, API keys, or rate limits to manage.
39+
40+
{% code overflow="wrap" %}
41+
```javascript
42+
// create a stream on Gooey server
43+
let response = await fetch("https://api.gooey.ai/v3/integrations/stream/", {
44+
method: "POST",
45+
headers: {
46+
"Content-Type": "application/json",
47+
},
48+
body: JSON.stringify({
49+
// your integration's ID as shown in the Gooey.AI Integrations tab
50+
"integration_id": "Kbo",
51+
// the prompt for the bot
52+
"input_prompt": "Generate a QR code of the taj mahal",
53+
// full api here: https://api.gooey.ai/docs#tag/Copilot-Integrations/operation/video-bots__stream_create
54+
}),
55+
});
56+
// get the server-sent events URL
57+
let sseUrl = response.headers.get("Location");
58+
// start listening to the stream
59+
const evtSource = new EventSource(sseUrl);
60+
// handle the stream events
61+
evtSource.onmessage = (event) => {
62+
// log the message to the console
63+
console.log(data.type, data);
64+
};
65+
```
66+
{% endcode %}
67+
{% endtab %}
68+
69+
{% tab title="Extend with Functions as a service" %}
70+
**Write Python or JavaScript in our AI IDE — no setup required.**\
71+
Secure, fast code execution in V8 + Docker lets you build custom logic and connect to any service. No YAML, no OpenAPI specs, no DevOps.
72+
73+
Try it out here:
74+
75+
{% embed url="https://gooey.ai/functions/wttr-weather-wi8xj3k0mzbb/" %}
76+
77+
<figure><img src="../.gitbook/assets/FOR DEVELOPERS fold 3 (2).png" alt=""><figcaption></figcaption></figure>
78+
{% endtab %}
79+
{% endtabs %}
80+
81+
## Read the API Docs
82+
83+
{% embed url="https://api.gooey.ai/docs" %}
84+
85+
### Create an API Key
886

987
Gooey.AI allows single API key for several workflows. So whether you are including AI images in your app or making a highly customized AI Copilot, you can access our whole suite of workflows through a single API key.&#x20;
1088

@@ -26,7 +104,7 @@ Copy the key and use it for your API Requests.&#x20;
26104
Make sure you don't share your API KEY with anyone! 🚫
27105
{% endhint %}
28106

29-
## AUTHENTICATION&#x20;
107+
## Authentication
30108

31109
**Remember that your API key is a secret!** Do not share it with others or expose it in any client-side code (browsers, apps). Production requests must be routed through your own backend server where your API key can be securely loaded from an environment variable or key management service.
32110

@@ -36,9 +114,9 @@ All API requests should include your API key in an `Authorization` HTTP header a
36114
"Authorization": "Bearer " + GOOEY_API_KEY
37115
```
38116

39-
## MAKING A REQUEST
117+
## Making a request
40118

41-
Let's make an example request to the lipsyncTTS API
119+
Let's make an example request to the `lipsyncTTS API`
42120

43121
{% tabs %}
44122
{% tab title="node.js" %}

0 commit comments

Comments
 (0)