Download OpenAPI specification:Download
Creates a new AI specified by the given identifier.
| src required | string Url of the avatar image. |
| name required | string Display name of the AI |
| introduction | string Text the AI uses as the greeting |
| description required | string Short description of the AI |
| instructions required | string Instructions that define the AI. |
| seed | string A sample conversation between a human and the AI. |
| modelId | string Identifier of the LLM to use for this AI. |
| visibility | string (AIVisibility) Enum: "PRIVATE" "GROUP" "ORGANIZATION" "ANYONE_WITH_LINK" Visibility level controlling who can access the AI. PRIVATE: Only the owner can access. GROUP: Only specified groups can access. ORGANIZATION: Anyone in the organization can access. ANYONE_WITH_LINK: Anyone with the link can access. |
| listInOrgCatalog | boolean Whether to list this AI in the organization's catalog |
| generateCitations | boolean Whether the AI should generate citations for its responses |
| chatLogsVisible | boolean Whether chat logs should be visible to company admins. |
| intermediateStepsVisible | boolean Whether intermediate reasoning steps should be visible during chat. |
object (AIModelOptions) Configuration options for the AI model's behavior | |
object (AIProfile) |
{- "src": "string",
- "name": "string",
- "introduction": "string",
- "description": "string",
- "instructions": "string",
- "seed": "string",
- "modelId": "string",
- "visibility": "PRIVATE",
- "listInOrgCatalog": true,
- "generateCitations": true,
- "chatLogsVisible": true,
- "intermediateStepsVisible": true,
- "options": {
- "temperature": [
- 0
], - "topP": [
- 0
], - "topK": [
- 0
], - "maxTokens": [
- 0
], - "maxInputTokens": [
- 0
], - "frequencyPenalty": [
- 0
], - "presencePenalty": [
- 0
]
}, - "profile": {
- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "showCharacter": true,
- "showTraining": true,
- "showPersonality": true
}
}{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "description": "string",
- "src": "string",
- "profile": {
- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "showCharacter": true,
- "showTraining": true,
- "showPersonality": true
}, - "userName": "string",
- "categoryId": "string",
- "messageCount": 0,
- "rating": 0,
- "ratingCount": 0
}Retrieves details of the AI specified by the given identifier.
| aiId required | string The identifier of the AI whose details are to be retrieved. |
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "description": "string",
- "src": "string",
- "profile": {
- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "showCharacter": true,
- "showTraining": true,
- "showPersonality": true
}, - "userName": "string",
- "categoryId": "string",
- "messageCount": 0,
- "rating": 0,
- "ratingCount": 0
}Retrieves a list of all chat sessions associated with the given AI identifier.
| aiId required | string The identifier of the AI whose chats are to be retrieved. |
{- "data": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "userId": "string",
- "pinPosition": 0,
- "ai": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}
}
]
}Creates a new chat session associated with the given AI identifier and returns the created chat session data.
| aiId required | string The identifier of the AI with which the chat session is to be associated. |
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "userId": "string",
- "pinPosition": 0,
- "ai": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}
}Retrieves a list of data sources associated with the given AI identifier.
| aiId required | string The identifier of the AI whose data sources are to be retrieved. |
{- "data": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "lastIndexedAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "type": "API",
- "refreshPeriod": "NEVER",
- "indexStatus": "INITIALIZED",
- "indexPercentage": "string"
}
]
}Associates an existing data source with the specified AI.
| aiId required | string The unique identifier for the AI to which the data source is to be added. |
| dataSourceId required | string The unique identifier of the existing data source to be added. |
{- "dataSourceId": "string"
}{- "aiId": "string",
- "dataSource": {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "lastIndexedAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "type": "API",
- "refreshPeriod": "NEVER",
- "indexStatus": "INITIALIZED",
- "indexPercentage": "string"
}
}Adds a new API data source with a specified name and JSON payload for the given AI.
| aiId required | string The unique identifier for the AI. |
| name required | string Name of the data source. |
| data required | object The JSON payload to be used as the data source's knowledge. |
{- "name": "string",
- "data": { }
}{- "aiId": "string",
- "dataSourceId": "string"
}| aiId required | string The unique identifier for the AI. |
| file | string <binary> |
{- "aiId": "string",
- "dataSourceId": "string"
}Retrieves the chat session with the specified ID.
| chatId required | string The unique identifier of the chat session to retrieve. |
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "userId": "string",
- "pinPosition": 0,
- "ai": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "messages": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "content": "string",
- "role": "string"
}
]
}Send a message to a chat session with an AI.
| chatId required | string The unique identifier of the chat session. |
| date required | string <date-time> The date and time of the chat from the perspective of the user. This may be different from the server time for the AI. |
required | string or (Array of ComplexMessageContent (TextMessageContent (object) or IdMessageContent (object) or UrlMessageContent (object))) Message to send to the AI. Can be a string for simple text messages, or a ComplexMessageContent array that includes text and file references (images, documents, audio, video). |
{- "date": "2024-01-15T10:30:00Z",
- "prompt": "Hello, how are you?"
}Creates a duplicate of the chat session with the specified ID.
| chatId required | string The unique identifier of the chat session to duplicate. |
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "userId": "string",
- "pinPosition": 0,
- "ai": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "messages": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "content": "string",
- "role": "string"
}
]
}Resets the chat session with the specified ID, clearing its current state or content.
| chatId required | string The unique identifier of the chat session to reset. |
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "userId": "string",
- "pinPosition": 0,
- "ai": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "messages": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "content": "string",
- "role": "string"
}
]
}When the AI requests user input through tool calls (e.g., asking the user to fill in form fields), use this endpoint to submit the user's responses. The AI will receive these outputs and continue the conversation. Listen for 'tool.call' events in the chat stream to know when input is needed.
| chatId required | string The unique identifier of the chat session. |
| systemMessageId required | string The ID of the system message that requested the tool outputs (the message containing the tool calls). |
required | Array of objects (ToolOutput) Array of tool outputs, one for each tool call that needs a response. |
object (ChatOptions) |
Example of submitting a user's name when the AI requests it.
{- "systemMessageId": "msg_abc123",
- "outputs": [
- {
- "toolCallId": "call_xyz789",
- "status": "success",
- "output": "John Doe"
}
]
}Uploads a file that can be referenced in messages sent to this chat. Max file size: 5MB. After uploading, use the returned file ID to reference it in the prompt field using ComplexMessageContent.
| chatId required | string The unique identifier of the chat session. |
| file required | string <binary> The file to upload. |
| source | string Enum: "USER" "SYSTEM" The source of the file. Defaults to USER if not specified. |
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "source": "USER",
- "filename": "string",
- "size": 0,
- "mimeType": "string",
- "url": "string",
- "metadata": { },
- "deletedAt": "2019-08-24T14:15:22Z",
- "status": "UPLOADED"
}Retrieves a list of all files associated with the specified chat session.
| chatId required | string The unique identifier of the chat session. |
{- "data": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "source": "USER",
- "filename": "string",
- "size": 0,
- "mimeType": "string",
- "url": "string",
- "metadata": { },
- "deletedAt": "2019-08-24T14:15:22Z",
- "status": "UPLOADED"
}
]
}Retrieves a list of data sources associated which the user has access to.
| name | string The name of the data source. |
| type | string Enum: "WEB_URL" "GOOGLE_DRIVE" "ONEDRIVE" "FILE_UPLOAD" "API" The type of the data source. One of: WEB_URL, GOOGLE_DRIVE, ONEDRIVE, FILE_UPLOAD, API. |
| orderBy | string^[+-](createdAt|lastIndexedAt|usageCount)$ Order by field and direction. Prefix field name with '+' for ascending or '-' for descending order. Allowed fields: createdAt, lastIndexedAt, usageCount. |
{- "data": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "lastIndexedAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "type": "API",
- "refreshPeriod": "NEVER",
- "indexStatus": "INITIALIZED",
- "indexPercentage": "string"
}
]
}This endpoint refreshes the specified data source.
| dataSourceId required | string The unique identifier of the data source to be refreshed. |
| forceRefresh | boolean Indicates if the data source should be refreshed even if the content has not been updated |
Creates a new group with the specified details.
| name required | string Name of the group. |
| availability required | string (GroupAvailability) Enum: "EVERYONE" "RESTRICTED" Availability status of the group. |
| memberEmails required | string A comma-separated list of emails of users who should be added to the group. |
{- "name": "string",
- "availability": "EVERYONE",
- "memberEmails": "string"
}{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "orgId": "string",
- "ownerUserId": "string",
- "name": "string",
- "availability": "EVERYONE",
- "users": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userId": "string",
- "email": "string"
}
]
}Updates the details of a specific group and manages its member list.
| groupId required | string The unique identifier of the group to update. |
| name | string Name of the group. |
| availability | string (GroupAvailability) Enum: "EVERYONE" "RESTRICTED" Availability status of the group. |
| memberEmailsToAdd | string A comma-separated list of emails of users to be added to the group. |
| memberEmailsToRemove | Array of strings A comma-separated list of emails of users to be removed from the group. |
{- "name": "string",
- "availability": "EVERYONE",
- "memberEmailsToAdd": "string",
- "memberEmailsToRemove": [
- "string"
]
}{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "orgId": "string",
- "ownerUserId": "string",
- "name": "string",
- "availability": "EVERYONE",
- "users": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userId": "string",
- "email": "string"
}
]
}| scope | string (ListAIsRequestScope) Enum: "PRIVATE" "OWNED" "GROUP" "SHARED" "ORGANIZATION" "PUBLIC" "ALL" The scope to filter results by |
| groupId | string The id of a group to filter results by |
| categoryId | string The id of a category to filter results by |
| approvedByOrg | boolean Filter results by whether the AI has been approved by the organization. |
| search | string Search term |
{- "data": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "description": "string",
- "src": "string",
- "profile": {
- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "showCharacter": true,
- "showTraining": true,
- "showPersonality": true
}, - "userName": "string",
- "categoryId": "string",
- "messageCount": 0,
- "rating": 0,
- "ratingCount": 0
}
]
}Retrieves a list of all chat sessions associated with the current user
{- "data": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "userId": "string",
- "pinPosition": 0,
- "ai": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}
}
]
}Retrieves a list of groups associated with the current user.
[- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "orgId": "string",
- "ownerUserId": "string",
- "name": "string",
- "availability": "EVERYONE"
}
]Returns the usage metrics of the organization broken down by AI.
{- "orgUsage": {
- "orgId": "string",
- "dataTokensUsed": 0,
- "dataUsageTokenLimit": 0,
- "apiTokensUsed": 0,
- "apiUsageTokenLimit": 0
}, - "aiUsages": [
- {
- "aiId": "string",
- "aiDataTokensUsed": 0,
- "aiApiTokensUsed": 0
}
]
}This endpoint supports two modes: 1) Create a file record with metadata (application/json), or 2) Upload a file directly (multipart/form-data). When creating a record, you'll need to upload the actual file separately. When uploading directly, the file is uploaded immediately.
This endpoint supports two modes: Create a file record with metadata (application/json), or upload a file directly (multipart/form-data).
| filename required | string The name of the file. |
| size required | integer The size of the file in bytes. |
| mimeType required | string The MIME type of the file. |
| metadata | object or null Additional metadata associated with the file. |
{- "filename": "string",
- "size": 0,
- "mimeType": "string",
- "metadata": { }
}{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "source": "USER",
- "filename": "string",
- "size": 0,
- "mimeType": "string",
- "url": "string",
- "metadata": { },
- "deletedAt": "2019-08-24T14:15:22Z",
- "status": "UPLOADED"
}Creates a completion for the chat message
required | Array of objects A list of messages comprising the conversation so far |
| model required | string ID of the Devs.ai AI or the LLM model to use for completion |
| stream | boolean Default: false Whether to stream the response or not |
| flowOverride | object Optional flow override settings |
| tools | Array of objects Optional list of tools to use |
{- "messages": [
- {
- "role": "system",
- "content": "string"
}
], - "model": "string",
- "stream": false,
- "flowOverride": { },
- "tools": [
- { }
]
}{- "choices": [
- {
- "index": 0,
- "message": {
- "role": "assistant",
- "content": "string"
}, - "finish_reason": "stop"
}
], - "chatId": "string"
}