Skip to content

Commit e81cea8

Browse files
authored
docs: Update AI endpoints
1 parent 107f299 commit e81cea8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/pages/product/apis-integrations/chat-api.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The Chat API is available in Cube Cloud on [Premium and above](https://cube.dev/
1111
## Endpoint
1212

1313
```
14-
https://ai-engineer.cubecloud.dev/api/v1/public/{tenantName}/agents/{agentId}/chat/stream-chat-state
14+
https://ai.gcp-us-central1.cubecloud.dev/api/v1/public/{tenantName}/agents/{agentId}/chat/stream-chat-state
1515
```
1616

1717

@@ -153,9 +153,11 @@ The attributes passed during session generation become available as `userAttribu
153153

154154
## Endpoint Reference
155155

156+
Endpoint URL can be found in settings of an Agent but typically it would be defined as following:
157+
156158
**POST** `/api/v1/public/{tenantName}/agents/{agentId}/chat/stream-chat-state`
157159

158-
**Base URL:** `https://ai-engineer.cubecloud.dev`
160+
**Base URL:** `https://ai.gcp-us-central1.cubecloud.dev`
159161

160162
### Path Parameters
161163

@@ -746,7 +748,7 @@ When an error occurs, the `result` property of the toolCall will contain an `err
746748
<CodeTabs>
747749

748750
```bash cURL
749-
curl -X POST "https://ai-engineer.cubecloud.dev/api/v1/public/cloud/agents/2/chat/stream-chat-state" \
751+
curl -X POST "https://ai.gcp-us-central1.cubecloud.dev/api/v1/public/cloud/agents/2/chat/stream-chat-state" \
750752
-H "Content-Type: application/json" \
751753
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
752754
-d '{
@@ -790,7 +792,7 @@ const { token } = await tokenResponse.json();
790792

791793
// Now use the token to make the chat request
792794
const response = await fetch(
793-
'https://ai-engineer.cubecloud.dev/api/v1/public/cloud/agents/2/chat/stream-chat-state',
795+
'https://ai.gcp-us-central1.cubecloud.dev/api/v1/public/cloud/agents/2/chat/stream-chat-state',
794796
{
795797
method: 'POST',
796798
headers: {
@@ -857,7 +859,7 @@ token_response = requests.post(token_url, headers=session_headers, json={"sessio
857859
token = token_response.json()["token"]
858860

859861
# Now use the token to make the chat request
860-
url = "https://ai-engineer.cubecloud.dev/api/v1/public/cloud/agents/2/chat/stream-chat-state"
862+
url = "https://ai.gcp-us-central1.cubecloud.dev/api/v1/public/cloud/agents/2/chat/stream-chat-state"
861863
headers = {
862864
"Content-Type": "application/json",
863865
"Authorization": f"Bearer {token}"

0 commit comments

Comments
 (0)