@equos/node-sdk 2.2.3 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +390 -66
- package/dist/api/apis/AgentApi.d.ts +86 -0
- package/dist/api/apis/AgentApi.js +223 -0
- package/dist/api/apis/AvatarApi.d.ts +86 -0
- package/dist/api/apis/AvatarApi.js +223 -0
- package/dist/api/apis/BrainApi.d.ts +64 -0
- package/dist/api/apis/BrainApi.js +179 -0
- package/dist/api/apis/CharacterApi.d.ts +76 -0
- package/dist/api/apis/CharacterApi.js +213 -0
- package/dist/api/apis/FaceApi.d.ts +64 -0
- package/dist/api/apis/FaceApi.js +179 -0
- package/dist/api/apis/HealthApi.d.ts +26 -0
- package/dist/api/apis/HealthApi.js +79 -0
- package/dist/api/apis/KnowledgeBaseApi.d.ts +84 -0
- package/dist/api/apis/KnowledgeBaseApi.js +260 -0
- package/dist/api/apis/LimitsApi.d.ts +26 -0
- package/dist/api/apis/LimitsApi.js +82 -0
- package/dist/api/apis/SessionPassesApi.d.ts +44 -0
- package/dist/api/apis/SessionPassesApi.js +128 -0
- package/dist/api/apis/SessionsApi.d.ts +72 -0
- package/dist/api/apis/SessionsApi.js +187 -0
- package/dist/api/apis/VoiceApi.d.ts +64 -0
- package/dist/api/apis/VoiceApi.js +179 -0
- package/dist/api/apis/index.d.ts +11 -0
- package/dist/api/apis/index.js +29 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +21 -0
- package/dist/api/models/CreateEquosAgentRequest.d.ts +144 -0
- package/dist/api/models/CreateEquosAgentRequest.js +120 -0
- package/dist/api/models/CreateEquosAvatarRequest.d.ts +56 -0
- package/dist/api/models/CreateEquosAvatarRequest.js +64 -0
- package/dist/api/models/CreateEquosBrainRequest.d.ts +56 -0
- package/dist/api/models/CreateEquosBrainRequest.js +64 -0
- package/dist/api/models/CreateEquosCharacterRequest.d.ts +80 -0
- package/dist/api/models/CreateEquosCharacterRequest.js +68 -0
- package/dist/api/models/CreateEquosFaceRequest.d.ts +46 -0
- package/dist/api/models/CreateEquosFaceRequest.js +60 -0
- package/dist/api/models/CreateEquosSessionRequest.d.ts +90 -0
- package/dist/api/models/CreateEquosSessionRequest.js +74 -0
- package/dist/api/models/CreateEquosSessionRequestAgent.d.ts +23 -0
- package/dist/api/models/CreateEquosSessionRequestAgent.js +57 -0
- package/dist/api/models/CreateEquosSessionRequestAvatar.d.ts +23 -0
- package/dist/api/models/CreateEquosSessionRequestAvatar.js +57 -0
- package/dist/api/models/CreateEquosSessionResponse.d.ts +45 -0
- package/dist/api/models/CreateEquosSessionResponse.js +55 -0
- package/dist/api/models/CreateEquosVoiceRequest.d.ts +56 -0
- package/dist/api/models/CreateEquosVoiceRequest.js +64 -0
- package/dist/api/models/CreateSessionPassRequest.d.ts +76 -0
- package/dist/api/models/CreateSessionPassRequest.js +72 -0
- package/dist/api/models/EquosAgent.d.ts +180 -0
- package/dist/api/models/EquosAgent.js +154 -0
- package/dist/api/models/EquosAvatar.d.ts +92 -0
- package/dist/api/models/EquosAvatar.js +84 -0
- package/dist/api/models/EquosBrain.d.ts +74 -0
- package/dist/api/models/EquosBrain.js +76 -0
- package/dist/api/models/EquosCharacter.d.ts +132 -0
- package/dist/api/models/EquosCharacter.js +98 -0
- package/dist/api/models/EquosDocument.d.ts +74 -0
- package/dist/api/models/EquosDocument.js +78 -0
- package/dist/api/models/EquosFace.d.ts +107 -0
- package/dist/api/models/EquosFace.js +89 -0
- package/dist/api/models/EquosKnowledgeBase.d.ts +75 -0
- package/dist/api/models/EquosKnowledgeBase.js +77 -0
- package/dist/api/models/EquosLimitResponse.d.ts +68 -0
- package/dist/api/models/EquosLimitResponse.js +72 -0
- package/dist/api/models/EquosParticipantIdentity.d.ts +38 -0
- package/dist/api/models/EquosParticipantIdentity.js +54 -0
- package/dist/api/models/EquosResourceReference.d.ts +32 -0
- package/dist/api/models/EquosResourceReference.js +50 -0
- package/dist/api/models/EquosSession.d.ts +168 -0
- package/dist/api/models/EquosSession.js +118 -0
- package/dist/api/models/EquosSessionHost.d.ts +38 -0
- package/dist/api/models/EquosSessionHost.js +54 -0
- package/dist/api/models/EquosSessionServer.d.ts +32 -0
- package/dist/api/models/EquosSessionServer.js +50 -0
- package/dist/api/models/EquosVoice.d.ts +80 -0
- package/dist/api/models/EquosVoice.js +80 -0
- package/dist/api/models/HealthResponse.d.ts +38 -0
- package/dist/api/models/HealthResponse.js +54 -0
- package/dist/api/models/ListEquosAgentsResponse.d.ts +51 -0
- package/dist/api/models/ListEquosAgentsResponse.js +63 -0
- package/dist/api/models/ListEquosAvatarsResponse.d.ts +51 -0
- package/dist/api/models/ListEquosAvatarsResponse.js +63 -0
- package/dist/api/models/ListEquosBrainsResponse.d.ts +51 -0
- package/dist/api/models/ListEquosBrainsResponse.js +63 -0
- package/dist/api/models/ListEquosCharactersResponse.d.ts +51 -0
- package/dist/api/models/ListEquosCharactersResponse.js +63 -0
- package/dist/api/models/ListEquosFacesResponse.d.ts +51 -0
- package/dist/api/models/ListEquosFacesResponse.js +63 -0
- package/dist/api/models/ListEquosSessionsResponse.d.ts +51 -0
- package/dist/api/models/ListEquosSessionsResponse.js +63 -0
- package/dist/api/models/ListEquosVoicesResponse.d.ts +51 -0
- package/dist/api/models/ListEquosVoicesResponse.js +63 -0
- package/dist/api/models/UpdateEquosAgentRequest.d.ts +156 -0
- package/dist/api/models/UpdateEquosAgentRequest.js +128 -0
- package/dist/api/models/UpdateEquosAvatarRequest.d.ts +68 -0
- package/dist/api/models/UpdateEquosAvatarRequest.js +72 -0
- package/dist/api/models/UpdateEquosCharacterRequest.d.ts +68 -0
- package/dist/api/models/UpdateEquosCharacterRequest.js +60 -0
- package/dist/api/models/index.d.ts +36 -0
- package/dist/api/models/index.js +54 -0
- package/dist/api/runtime.d.ts +184 -0
- package/dist/api/runtime.js +349 -0
- package/dist/client.d.ts +38 -0
- package/dist/client.js +62 -0
- package/dist/index.d.ts +3 -10
- package/dist/index.js +7 -10
- package/dist/options.d.ts +7 -0
- package/package.json +4 -2
- package/dist/apis/agent.d.ts +0 -11
- package/dist/apis/agent.js +0 -40
- package/dist/apis/avatar.d.ts +0 -11
- package/dist/apis/avatar.js +0 -40
- package/dist/apis/knowledge-base.d.ts +0 -13
- package/dist/apis/knowledge-base.js +0 -50
- package/dist/apis/session.d.ts +0 -10
- package/dist/apis/session.js +0 -35
- package/dist/equos.d.ts +0 -32
- package/dist/equos.js +0 -47
- package/dist/types/agent.type.d.ts +0 -96
- package/dist/types/agent.type.js +0 -64
- package/dist/types/avatar.type.d.ts +0 -31
- package/dist/types/error.type.d.ts +0 -5
- package/dist/types/error.type.js +0 -14
- package/dist/types/knowledge-base.type.d.ts +0 -41
- package/dist/types/knowledge-base.type.js +0 -2
- package/dist/types/session.type.d.ts +0 -73
- package/dist/types/session.type.js +0 -2
- package/dist/utils/constants.utils.d.ts +0 -4
- package/dist/utils/constants.utils.js +0 -8
- package/dist/utils/error.utils.d.ts +0 -5
- package/dist/utils/error.utils.js +0 -11
- package/dist/utils/http.utils.d.ts +0 -12
- package/dist/utils/http.utils.js +0 -126
- /package/dist/{types/avatar.type.js → options.js} +0 -0
package/README.md
CHANGED
|
@@ -1,106 +1,430 @@
|
|
|
1
1
|
# @equos/node-sdk
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
[Equos.ai](https://www.equos.ai) official Node.js SDK - Build AI-powered avatars with lifelike faces, voices, and brains.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- ✅ **Full TypeScript Support** - Auto-generated types from OpenAPI specification
|
|
8
|
+
- ✅ **Automatic API Key Management** - API key automatically added to all requests
|
|
9
|
+
- ✅ **Character Management** - Create and manage AI characters with faces, voices, and brains
|
|
10
|
+
- ✅ **Resource Management** - Manage faces, voices, brains, and knowledge bases
|
|
11
|
+
- ✅ **Health & Limits** - Monitor API health and organization limits
|
|
3
12
|
|
|
4
13
|
## Prerequisites
|
|
5
|
-
- Go to [Equos Studio](https://studio.equos.ai).
|
|
6
|
-
- Create an organization.
|
|
7
|
-
- Create an API Key.
|
|
8
14
|
|
|
15
|
+
1. Go to [Equos Studio](https://studio.equos.ai)
|
|
16
|
+
2. Create an organization
|
|
17
|
+
3. Create an API Key
|
|
9
18
|
|
|
10
19
|
## Installation
|
|
20
|
+
|
|
11
21
|
```bash
|
|
12
22
|
npm install @equos/node-sdk
|
|
13
23
|
```
|
|
14
24
|
|
|
15
|
-
##
|
|
25
|
+
## Quick Start
|
|
16
26
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import { Equos } from '@equos/node-sdk';
|
|
27
|
+
```typescript
|
|
28
|
+
import { EquosClient } from '@equos/node-sdk';
|
|
20
29
|
|
|
21
|
-
|
|
30
|
+
// Create client with your API key
|
|
31
|
+
const client = EquosClient.create(process.env.EQUOS_API_KEY!);
|
|
32
|
+
|
|
33
|
+
// List all characters
|
|
34
|
+
const characters = await client.characters.characterControllerListV3({
|
|
35
|
+
take: 10,
|
|
36
|
+
skip: 0,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
console.log(`Found ${characters.total} characters`);
|
|
22
40
|
```
|
|
23
41
|
|
|
24
|
-
|
|
42
|
+
Don't have an API key? [Create one here](https://studio.equos.ai)
|
|
25
43
|
|
|
26
|
-
|
|
27
|
-
```ts
|
|
28
|
-
import { EquosAvatar, CreateEquosAvatarRequest } from '@equos/node-sdk';
|
|
44
|
+
## Configuration
|
|
29
45
|
|
|
46
|
+
### Default Configuration
|
|
30
47
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
48
|
+
```typescript
|
|
49
|
+
const client = EquosClient.create('your-api-key');
|
|
50
|
+
// Uses: https://api.equos.ai
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## API Reference
|
|
54
|
+
|
|
55
|
+
### Character Management
|
|
56
|
+
|
|
57
|
+
Characters are the main entities that combine faces, voices, brains, and knowledge bases.
|
|
58
|
+
|
|
59
|
+
#### Create a Character
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
import { CreateEquosCharacterRequest, EquosCharacter } from '@equos/node-sdk';
|
|
63
|
+
|
|
64
|
+
const characterData: CreateEquosCharacterRequest = {
|
|
65
|
+
name: 'AI Assistant',
|
|
66
|
+
livekitIdentity: 'ai-assistant-001',
|
|
67
|
+
faceId: 'face-id-here', // Optional
|
|
68
|
+
voiceId: 'voice-id-here', // Optional
|
|
69
|
+
brainId: 'brain-id-here', // Optional
|
|
70
|
+
knowledgeBaseId: 'kb-id', // Optional
|
|
71
|
+
search: false, // Enable web search
|
|
72
|
+
};
|
|
36
73
|
|
|
37
|
-
|
|
38
|
-
|
|
74
|
+
const character: EquosCharacter =
|
|
75
|
+
await client.characters.characterControllerCreateV3({
|
|
76
|
+
createEquosCharacterRequest: characterData,
|
|
77
|
+
});
|
|
39
78
|
|
|
40
|
-
console.log(
|
|
79
|
+
console.log('Created character:', character.id);
|
|
41
80
|
```
|
|
42
81
|
|
|
43
|
-
|
|
82
|
+
#### List Characters
|
|
44
83
|
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
84
|
+
```typescript
|
|
85
|
+
const response = await client.characters.characterControllerListV3({
|
|
86
|
+
take: 20, // Number of items to return (max 50)
|
|
87
|
+
skip: 0, // Number of items to skip
|
|
88
|
+
client: 'my-app', // Optional: filter by client identifier
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
console.log(`Total: ${response.total}`);
|
|
92
|
+
response.characters.forEach((char) => {
|
|
93
|
+
console.log(`- ${char.name} (${char.id})`);
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
#### Get Character by ID
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
const character = await client.characters.characterControllerGetByIdV3({
|
|
101
|
+
id: 'character-id',
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
console.log('Character:', character);
|
|
105
|
+
// Includes populated face, voice, brain, and knowledgeBase objects
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### Update a Character
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
import { UpdateEquosCharacterRequest } from '@equos/node-sdk';
|
|
112
|
+
|
|
113
|
+
const updates: UpdateEquosCharacterRequest = {
|
|
114
|
+
name: 'Updated Name',
|
|
115
|
+
voiceId: 'new-voice-id',
|
|
116
|
+
brainId: 'new-brain-id',
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const updated = await client.characters.characterControllerUpdateV3({
|
|
120
|
+
id: 'character-id',
|
|
121
|
+
updateEquosCharacterRequest: updates,
|
|
122
|
+
});
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
#### Delete a Character
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
const deleted = await client.characters.characterControllerSoftDeleteV3({
|
|
129
|
+
id: 'character-id',
|
|
130
|
+
});
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Face Management
|
|
134
|
+
|
|
135
|
+
Faces define the visual appearance of your AI characters.
|
|
136
|
+
|
|
137
|
+
#### Create a Face
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
import { CreateEquosFaceRequest } from '@equos/node-sdk';
|
|
141
|
+
|
|
142
|
+
const faceData: CreateEquosFaceRequest = {
|
|
143
|
+
identity: 'byron', // or 'emily' - from Equos Gallery
|
|
144
|
+
client: 'my-app', // Optional: client identifier
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const face = await client.faces.faceControllerCreateV3({
|
|
148
|
+
createEquosFaceRequest: faceData,
|
|
149
|
+
});
|
|
53
150
|
|
|
151
|
+
console.log('Face ID:', face.id);
|
|
152
|
+
console.log('Status:', face.status); // 'processing', 'ready', or 'error'
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
#### List Faces
|
|
54
156
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
157
|
+
```typescript
|
|
158
|
+
const faces = await client.faces.faceControllerListV3({
|
|
159
|
+
take: 10,
|
|
160
|
+
skip: 0,
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
faces.faces.forEach((face) => {
|
|
164
|
+
console.log(`${face.id}: ${face.status}`);
|
|
165
|
+
if (face.thumbnailUrl) {
|
|
166
|
+
console.log(` Thumbnail: ${face.thumbnailUrl}`);
|
|
62
167
|
}
|
|
63
|
-
}
|
|
168
|
+
});
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
#### Get Face by ID
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
const face = await client.faces.faceControllerGetByIdV3({
|
|
175
|
+
id: 'face-id',
|
|
176
|
+
});
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
#### Delete a Face
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
await client.faces.faceControllerSoftDeleteV3({
|
|
183
|
+
id: 'face-id',
|
|
184
|
+
});
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Voice Management
|
|
188
|
+
|
|
189
|
+
Voices define how your AI characters sound.
|
|
190
|
+
|
|
191
|
+
#### Create a Voice
|
|
64
192
|
|
|
65
|
-
|
|
66
|
-
|
|
193
|
+
```typescript
|
|
194
|
+
import { CreateEquosVoiceRequest } from '@equos/node-sdk';
|
|
195
|
+
|
|
196
|
+
const voiceData: CreateEquosVoiceRequest = {
|
|
197
|
+
name: 'Professional Voice',
|
|
198
|
+
description: 'Clear and professional tone',
|
|
199
|
+
voiceId: 'elevenlabs-voice-id',
|
|
200
|
+
sampleUrl: 'https://example.com/sample.mp3',
|
|
201
|
+
client: 'my-app', // Optional
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
const voice = await client.voices.voiceControllerCreateV3({
|
|
205
|
+
createEquosVoiceRequest: voiceData,
|
|
206
|
+
});
|
|
67
207
|
```
|
|
68
208
|
|
|
209
|
+
#### List Voices
|
|
210
|
+
|
|
211
|
+
```typescript
|
|
212
|
+
const voices = await client.voices.voiceControllerListV3({
|
|
213
|
+
take: 10,
|
|
214
|
+
skip: 0,
|
|
215
|
+
});
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
#### Get Voice by ID
|
|
219
|
+
|
|
220
|
+
```typescript
|
|
221
|
+
const voice = await client.voices.voiceControllerGetByIdV3({
|
|
222
|
+
id: 'voice-id',
|
|
223
|
+
});
|
|
224
|
+
```
|
|
69
225
|
|
|
70
|
-
|
|
71
|
-
This will create and start a session. The avatar will join the room as soon as possible.
|
|
226
|
+
#### Delete a Voice
|
|
72
227
|
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
228
|
+
```typescript
|
|
229
|
+
await client.voices.voiceControllerSoftDeleteV3({
|
|
230
|
+
id: 'voice-id',
|
|
231
|
+
});
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Brain Management
|
|
235
|
+
|
|
236
|
+
Brains define the personality and behavior of your AI characters.
|
|
237
|
+
|
|
238
|
+
#### Create a Brain
|
|
239
|
+
|
|
240
|
+
```typescript
|
|
241
|
+
import { CreateEquosBrainRequest } from '@equos/node-sdk';
|
|
242
|
+
|
|
243
|
+
const brainData: CreateEquosBrainRequest = {
|
|
244
|
+
name: 'Customer Support Brain',
|
|
245
|
+
instructions:
|
|
246
|
+
'You are a helpful customer support agent. Be friendly and professional.',
|
|
247
|
+
greetingMessage: 'Hello! How can I help you today?',
|
|
248
|
+
model: 'gemini-2.5-flash-native-audio-preview-09-2025',
|
|
249
|
+
client: 'my-app', // Optional
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
const brain = await client.brains.brainControllerCreateV3({
|
|
253
|
+
createEquosBrainRequest: brainData,
|
|
254
|
+
});
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
#### List Brains
|
|
258
|
+
|
|
259
|
+
```typescript
|
|
260
|
+
const brains = await client.brains.brainControllerListV3({
|
|
261
|
+
take: 10,
|
|
262
|
+
skip: 0,
|
|
263
|
+
});
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
#### Get Brain by ID
|
|
267
|
+
|
|
268
|
+
```typescript
|
|
269
|
+
const brain = await client.brains.brainControllerGetByIdV3({
|
|
270
|
+
id: 'brain-id',
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
console.log('Instructions:', brain.instructions);
|
|
274
|
+
console.log('Greeting:', brain.greetingMessage);
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
#### Delete a Brain
|
|
278
|
+
|
|
279
|
+
```typescript
|
|
280
|
+
await client.brains.brainControllerSoftDeleteV3({
|
|
281
|
+
id: 'brain-id',
|
|
282
|
+
});
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Health & Limits
|
|
286
|
+
|
|
287
|
+
#### Check API Health
|
|
288
|
+
|
|
289
|
+
```typescript
|
|
290
|
+
const health = await client.health.healthControllerCheckV3();
|
|
291
|
+
console.log('Status:', health.status);
|
|
292
|
+
console.log('Version:', health.version);
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
#### Get Organization Limits
|
|
296
|
+
|
|
297
|
+
```typescript
|
|
298
|
+
const limits = await client.limits.limitsControllerLimitV3();
|
|
299
|
+
|
|
300
|
+
if (limits) {
|
|
301
|
+
console.log('Concurrent sessions:', limits.concurrent);
|
|
302
|
+
console.log('Max duration:', limits.duration);
|
|
303
|
+
console.log('Suspended:', limits.suspended);
|
|
304
|
+
if (limits.reason) {
|
|
305
|
+
console.log('Reason:', limits.reason);
|
|
306
|
+
}
|
|
86
307
|
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## Complete Example
|
|
87
311
|
|
|
88
|
-
|
|
312
|
+
```typescript
|
|
313
|
+
import { EquosClient } from '@equos/node-sdk';
|
|
89
314
|
|
|
90
|
-
|
|
91
|
-
|
|
315
|
+
async function main() {
|
|
316
|
+
const client = EquosClient.create(process.env.EQUOS_API_KEY!);
|
|
317
|
+
|
|
318
|
+
// Create a face
|
|
319
|
+
const face = await client.faces.faceControllerCreateV3({
|
|
320
|
+
createEquosFaceRequest: {
|
|
321
|
+
identity: 'byron',
|
|
322
|
+
},
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
// Create a voice
|
|
326
|
+
const voice = await client.voices.voiceControllerCreateV3({
|
|
327
|
+
createEquosVoiceRequest: {
|
|
328
|
+
name: 'Professional Voice',
|
|
329
|
+
description: 'Clear professional tone',
|
|
330
|
+
voiceId: 'elevenlabs-voice-id',
|
|
331
|
+
sampleUrl: 'https://example.com/sample.mp3',
|
|
332
|
+
},
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
// Create a brain
|
|
336
|
+
const brain = await client.brains.brainControllerCreateV3({
|
|
337
|
+
createEquosBrainRequest: {
|
|
338
|
+
name: 'Support Agent',
|
|
339
|
+
instructions: 'You are a helpful support agent.',
|
|
340
|
+
greetingMessage: 'Hello! How can I help?',
|
|
341
|
+
model: 'gemini-2.5-flash-native-audio-preview-09-2025',
|
|
342
|
+
},
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
// Create a character with all components
|
|
346
|
+
const character = await client.characters.characterControllerCreateV3({
|
|
347
|
+
createEquosCharacterRequest: {
|
|
348
|
+
name: 'AI Support Agent',
|
|
349
|
+
livekitIdentity: 'support-agent-001',
|
|
350
|
+
faceId: face.id,
|
|
351
|
+
voiceId: voice.id,
|
|
352
|
+
brainId: brain.id,
|
|
353
|
+
search: false,
|
|
354
|
+
},
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
console.log('Created character:', character.id);
|
|
358
|
+
console.log('Face:', character.face?.status);
|
|
359
|
+
console.log('Voice:', character.voice?.name);
|
|
360
|
+
console.log('Brain:', character.brain?.name);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
main().catch(console.error);
|
|
92
364
|
```
|
|
93
365
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
366
|
+
## Error Handling
|
|
367
|
+
|
|
368
|
+
```typescript
|
|
369
|
+
try {
|
|
370
|
+
const character = await client.characters.characterControllerGetByIdV3({
|
|
371
|
+
id: 'non-existent-id',
|
|
372
|
+
});
|
|
373
|
+
} catch (error) {
|
|
374
|
+
if (error instanceof Error) {
|
|
375
|
+
console.error('Error:', error.message);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
97
378
|
```
|
|
98
379
|
|
|
99
|
-
##
|
|
100
|
-
- Equos Slack Community: [Join Equos Community Slack](https://join.slack.com/t/equosaicommunity/shared_invite/zt-3d8oy19au-jZpsJB0i~gdL0jbDswdzzQ)
|
|
101
|
-
- Support: [Support Form](https://docs.google.com/forms/d/e/1FAIpQLSdoK7LvORdQf7KOQKvhhlESStJcKc3bDB9HPsEet6LuOmVUfQ/viewform)
|
|
380
|
+
## TypeScript Support
|
|
102
381
|
|
|
103
|
-
|
|
382
|
+
All types are automatically generated from the OpenAPI specification:
|
|
383
|
+
|
|
384
|
+
```typescript
|
|
385
|
+
import {
|
|
386
|
+
EquosClient,
|
|
387
|
+
EquosCharacter,
|
|
388
|
+
EquosFace,
|
|
389
|
+
EquosVoice,
|
|
390
|
+
EquosBrain,
|
|
391
|
+
CreateEquosCharacterRequest,
|
|
392
|
+
UpdateEquosCharacterRequest,
|
|
393
|
+
ListEquosCharactersResponse,
|
|
394
|
+
} from '@equos/node-sdk';
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
## Deprecated APIs
|
|
398
|
+
|
|
399
|
+
> ⚠️ **Note**: The following APIs are deprecated and will be removed in a future version. Please migrate to the Character-based APIs above.
|
|
400
|
+
>
|
|
401
|
+
> - **Avatars API** (`client.avatars.*`) - Use Characters API instead
|
|
402
|
+
> - **Agents API** (`client.agents.*`) - Use Brains API instead
|
|
403
|
+
> - **Sessions API** (`client.sessions.*`) - Deprecated
|
|
404
|
+
> - **Session Passes API** (`client.sessionPasses.*`) - Deprecated
|
|
405
|
+
>
|
|
406
|
+
> These APIs are marked as `deprecated: true` in the OpenAPI specification.
|
|
407
|
+
|
|
408
|
+
## Regenerating the Client
|
|
409
|
+
|
|
410
|
+
The SDK is auto-generated from the OpenAPI specification. To regenerate after API changes:
|
|
411
|
+
|
|
412
|
+
1. Ensure your backend API is running on `http://localhost:3001`
|
|
413
|
+
2. Run:
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
npm run generate
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
This fetches the latest OpenAPI spec and regenerates all TypeScript code.
|
|
420
|
+
|
|
421
|
+
## Resources
|
|
104
422
|
|
|
105
423
|
- Official Documentation: [https://docs.equos.ai](https://docs.equos.ai)
|
|
106
|
-
- Equos NodeJS
|
|
424
|
+
- Equos NodeJS Examples: [GitHub Examples](https://github.com/EquosAI/equos-examples/tree/main/examples/equos-nextjs-integration)
|
|
425
|
+
- Equos Slack Community: [Join Slack](https://join.slack.com/t/equosaicommunity/shared_invite/zt-3d8oy19au-jZpsJB0i~gdL0jbDswdzzQ)
|
|
426
|
+
- Support: [Support Form](https://docs.google.com/forms/d/e/1FAIpQLSdoK7LvORdQf7KOQKvhhlESStJcKc3bDB9HPsEet6LuOmVUfQ/viewform)
|
|
427
|
+
|
|
428
|
+
## License
|
|
429
|
+
|
|
430
|
+
See [LICENSE](./LICENSE) for details.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Equos.ai API
|
|
3
|
+
* API documentation for Equos.ai live platform.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 3.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { CreateEquosAgentRequest, EquosAgent, ListEquosAgentsResponse, UpdateEquosAgentRequest } from '../models/index';
|
|
14
|
+
export interface AgentControllerArchiveV3Request {
|
|
15
|
+
id: string;
|
|
16
|
+
}
|
|
17
|
+
export interface AgentControllerCreateV3Request {
|
|
18
|
+
createEquosAgentRequest: CreateEquosAgentRequest;
|
|
19
|
+
}
|
|
20
|
+
export interface AgentControllerGetByIdV3Request {
|
|
21
|
+
id: string;
|
|
22
|
+
}
|
|
23
|
+
export interface AgentControllerListV3Request {
|
|
24
|
+
take?: number;
|
|
25
|
+
skip?: number;
|
|
26
|
+
client?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface AgentControllerUpdateV3Request {
|
|
29
|
+
id: string;
|
|
30
|
+
updateEquosAgentRequest: UpdateEquosAgentRequest;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
export declare class AgentApi extends runtime.BaseAPI {
|
|
36
|
+
/**
|
|
37
|
+
* Delete an Equos Agent. This action is irreversible.
|
|
38
|
+
* @deprecated
|
|
39
|
+
*/
|
|
40
|
+
agentControllerArchiveV3Raw(requestParameters: AgentControllerArchiveV3Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EquosAgent>>;
|
|
41
|
+
/**
|
|
42
|
+
* Delete an Equos Agent. This action is irreversible.
|
|
43
|
+
* @deprecated
|
|
44
|
+
*/
|
|
45
|
+
agentControllerArchiveV3(requestParameters: AgentControllerArchiveV3Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EquosAgent>;
|
|
46
|
+
/**
|
|
47
|
+
* Create a new Equos Agent.
|
|
48
|
+
* @deprecated
|
|
49
|
+
*/
|
|
50
|
+
agentControllerCreateV3Raw(requestParameters: AgentControllerCreateV3Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EquosAgent>>;
|
|
51
|
+
/**
|
|
52
|
+
* Create a new Equos Agent.
|
|
53
|
+
* @deprecated
|
|
54
|
+
*/
|
|
55
|
+
agentControllerCreateV3(requestParameters: AgentControllerCreateV3Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EquosAgent>;
|
|
56
|
+
/**
|
|
57
|
+
* Get Equos Agent by ID.
|
|
58
|
+
* @deprecated
|
|
59
|
+
*/
|
|
60
|
+
agentControllerGetByIdV3Raw(requestParameters: AgentControllerGetByIdV3Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EquosAgent>>;
|
|
61
|
+
/**
|
|
62
|
+
* Get Equos Agent by ID.
|
|
63
|
+
* @deprecated
|
|
64
|
+
*/
|
|
65
|
+
agentControllerGetByIdV3(requestParameters: AgentControllerGetByIdV3Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EquosAgent>;
|
|
66
|
+
/**
|
|
67
|
+
* List Equos Agents.
|
|
68
|
+
* @deprecated
|
|
69
|
+
*/
|
|
70
|
+
agentControllerListV3Raw(requestParameters: AgentControllerListV3Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListEquosAgentsResponse>>;
|
|
71
|
+
/**
|
|
72
|
+
* List Equos Agents.
|
|
73
|
+
* @deprecated
|
|
74
|
+
*/
|
|
75
|
+
agentControllerListV3(requestParameters?: AgentControllerListV3Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListEquosAgentsResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* Update an Equos Agent.
|
|
78
|
+
* @deprecated
|
|
79
|
+
*/
|
|
80
|
+
agentControllerUpdateV3Raw(requestParameters: AgentControllerUpdateV3Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EquosAgent>>;
|
|
81
|
+
/**
|
|
82
|
+
* Update an Equos Agent.
|
|
83
|
+
* @deprecated
|
|
84
|
+
*/
|
|
85
|
+
agentControllerUpdateV3(requestParameters: AgentControllerUpdateV3Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EquosAgent>;
|
|
86
|
+
}
|