Assistants

Create a new assistant

Create a new assistant with the provided details

POST/assistants
Authorization
Body
idstring
Example: "d290f1ee-6c54-4b01-90e6-d701748f0851"
detailsobject
credentialstring
Example: "7db93c02-8d5a-4117-a8f1-3dfb6721b339"
iconSrcstring
Example: "/images/assistant.png"
createdDatestring (date-time)
Example: "2024-08-24T14:15:22Z"
updatedDatestring (date-time)
Example: "2024-08-24T14:15:22Z"
Response

Assistant created successfully

Body
idstring
Example: "d290f1ee-6c54-4b01-90e6-d701748f0851"
detailsobject
credentialstring
Example: "7db93c02-8d5a-4117-a8f1-3dfb6721b339"
iconSrcstring
Example: "/images/assistant.png"
createdDatestring (date-time)
Example: "2024-08-24T14:15:22Z"
updatedDatestring (date-time)
Example: "2024-08-24T14:15:22Z"
Request
const response = await fetch('/assistants', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer JWT",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "details": {
    "id": "asst_zbNeYIuXIUSKVHjJkfRo6ilv",
    "name": "assistant",
    "description": "text",
    "model": "gpt-4",
    "instructions": "You are a helpful assistant, do your best to answer question and query",
    "temperature": 1,
    "top_p": 1,
    "tools": [
      "function",
      "code_interpreter",
      "file_search"
    ]
  },
  "credential": "7db93c02-8d5a-4117-a8f1-3dfb6721b339",
  "iconSrc": "/images/assistant.png",
  "createdDate": "2024-08-24T14:15:22Z",
  "updatedDate": "2024-08-24T14:15:22Z"
}

List all assistants

Retrieve a list of all assistants

GET/assistants
Authorization
Response

Successful operation

Body
idstring
Example: "d290f1ee-6c54-4b01-90e6-d701748f0851"
detailsobject
credentialstring
Example: "7db93c02-8d5a-4117-a8f1-3dfb6721b339"
iconSrcstring
Example: "/images/assistant.png"
createdDatestring (date-time)
Example: "2024-08-24T14:15:22Z"
updatedDatestring (date-time)
Example: "2024-08-24T14:15:22Z"
Request
const response = await fetch('/assistants', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer JWT"
    },
});
const data = await response.json();
Response
{
  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "details": {
    "id": "asst_zbNeYIuXIUSKVHjJkfRo6ilv",
    "name": "assistant",
    "description": "text",
    "model": "gpt-4",
    "instructions": "You are a helpful assistant, do your best to answer question and query",
    "temperature": 1,
    "top_p": 1,
    "tools": [
      "function",
      "code_interpreter",
      "file_search"
    ]
  },
  "credential": "7db93c02-8d5a-4117-a8f1-3dfb6721b339",
  "iconSrc": "/images/assistant.png",
  "createdDate": "2024-08-24T14:15:22Z",
  "updatedDate": "2024-08-24T14:15:22Z"
}

Get assistant by ID

Retrieve a specific assistant by ID

GET/assistants/{id}
Authorization
Path parameters
id*string

Assistant ID

Response

Successful operation

Body
idstring
Example: "d290f1ee-6c54-4b01-90e6-d701748f0851"
detailsobject
credentialstring
Example: "7db93c02-8d5a-4117-a8f1-3dfb6721b339"
iconSrcstring
Example: "/images/assistant.png"
createdDatestring (date-time)
Example: "2024-08-24T14:15:22Z"
updatedDatestring (date-time)
Example: "2024-08-24T14:15:22Z"
Request
const response = await fetch('/assistants/{id}', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer JWT"
    },
});
const data = await response.json();
Response
{
  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "details": {
    "id": "asst_zbNeYIuXIUSKVHjJkfRo6ilv",
    "name": "assistant",
    "description": "text",
    "model": "gpt-4",
    "instructions": "You are a helpful assistant, do your best to answer question and query",
    "temperature": 1,
    "top_p": 1,
    "tools": [
      "function",
      "code_interpreter",
      "file_search"
    ]
  },
  "credential": "7db93c02-8d5a-4117-a8f1-3dfb6721b339",
  "iconSrc": "/images/assistant.png",
  "createdDate": "2024-08-24T14:15:22Z",
  "updatedDate": "2024-08-24T14:15:22Z"
}

Update assistant details

Update the details of an existing assistant

PUT/assistants/{id}
Authorization
Path parameters
id*string

Assistant ID

Body
idstring
Example: "d290f1ee-6c54-4b01-90e6-d701748f0851"
detailsobject
credentialstring
Example: "7db93c02-8d5a-4117-a8f1-3dfb6721b339"
iconSrcstring
Example: "/images/assistant.png"
createdDatestring (date-time)
Example: "2024-08-24T14:15:22Z"
updatedDatestring (date-time)
Example: "2024-08-24T14:15:22Z"
Response

Assistant updated successfully

Body
any
Request
const response = await fetch('/assistants/{id}', {
    method: 'PUT',
    headers: {
      "Authorization": "Bearer JWT",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();

Delete an assistant

Delete an assistant by ID

DELETE/assistants/{id}
Authorization
Path parameters
id*string

Assistant ID

Response

Assistant deleted successfully

Request
const response = await fetch('/assistants/{id}', {
    method: 'DELETE',
    headers: {
      "Authorization": "Bearer JWT"
    },
});
const data = await response.json();

Last updated