curl --request GET \
--url https://api.langdock.com/assistant/v1/get \
--header 'Authorization: Bearer <token>'{
"status": "success",
"assistant": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"emojiIcon": "<string>",
"model": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"temperature": 0.5,
"inputType": "PROMPT",
"webSearchEnabled": true,
"imageGenerationEnabled": true,
"codeInterpreterEnabled": true,
"canvasEnabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"instruction": "<string>",
"conversationStarters": [
"<string>"
],
"actions": [
{
"actionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresConfirmation": true
}
],
"inputFields": [
{
"slug": "<string>",
"type": "TEXT",
"label": "<string>",
"required": true,
"order": 1,
"description": "<string>",
"options": [
"<string>"
],
"fileTypes": [
"<string>"
]
}
],
"attachments": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}Retrieve details of an existing assistant
curl --request GET \
--url https://api.langdock.com/assistant/v1/get \
--header 'Authorization: Bearer <token>'{
"status": "success",
"assistant": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"emojiIcon": "<string>",
"model": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"temperature": 0.5,
"inputType": "PROMPT",
"webSearchEnabled": true,
"imageGenerationEnabled": true,
"codeInterpreterEnabled": true,
"canvasEnabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"instruction": "<string>",
"conversationStarters": [
"<string>"
],
"actions": [
{
"actionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresConfirmation": true
}
],
"inputFields": [
{
"slug": "<string>",
"type": "TEXT",
"label": "<string>",
"required": true,
"order": 1,
"description": "<string>",
"options": [
"<string>"
],
"fileTypes": [
"<string>"
]
}
],
"attachments": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}ASSISTANT_API scope and access to the assistant you want to retrieve.| Parameter | Type | Required | Description |
|---|---|---|---|
assistantId | string | Yes | UUID of the assistant to retrieve |
const axios = require("axios");
async function getAssistant() {
const response = await axios.get(
"https://api.langdock.com/api/public/assistant/v1/get",
{
params: {
assistantId: "550e8400-e29b-41d4-a716-446655440000"
},
headers: {
Authorization: "Bearer YOUR_API_KEY"
}
}
);
console.log("Assistant details:", response.data.assistant);
}
{
status: "success";
assistant: {
id: string;
name: string;
description: string;
instruction: string;
emojiIcon: string;
model: string;
temperature: number;
conversationStarters: string[];
inputType: "PROMPT" | "STRUCTURED";
webSearchEnabled: boolean;
imageGenerationEnabled: boolean;
codeInterpreterEnabled: boolean;
canvasEnabled: boolean;
actions: Array<{
actionId: string;
requiresConfirmation: boolean;
}>;
inputFields: Array<{
slug: string;
type: string;
label: string;
description: string;
required: boolean;
order: number;
options: string[];
fileTypes: string[] | null;
}>;
attachments: string[];
createdAt: string;
updatedAt: string;
};
}
try {
const response = await axios.get('https://api.langdock.com/api/public/assistant/v1/get', ...);
} catch (error) {
if (error.response) {
switch (error.response.status) {
case 400:
console.error('Invalid assistant ID format');
break;
case 401:
console.error('Invalid or missing API key');
break;
case 403:
console.error('Insufficient permissions - no access to this assistant');
break;
case 404:
console.error('Assistant not found');
break;
case 500:
console.error('Server error');
break;
}
}
}
API key as Bearer token. Format "Bearer YOUR_API_KEY"
UUID of the assistant to retrieve
Assistant details retrieved successfully
success Show child attributes
Unique identifier for the assistant
Name of the assistant
Emoji icon for the assistant
UUID of the model being used
Temperature/creativity setting for response generation
0 <= x <= 1Input type for the assistant
PROMPT, STRUCTURED Whether web search capability is enabled
Whether image generation capability is enabled
Whether code interpreter/data analyst capability is enabled
Whether canvas capability is enabled
Timestamp when the assistant was created
Timestamp when the assistant was last updated
Description of what the assistant does
System prompt/instructions for the assistant
Array of suggested prompts to help users get started
Array of form field definitions (for STRUCTURED input type)
Show child attributes
Unique identifier for the field
Field type
TEXT, MULTI_LINE_TEXT, NUMBER, CHECKBOX, FILE, SELECT, DATE Display label for the field
Whether the field is required
Display order (0-indexed)
x >= 0Help text for the field
Options for SELECT type fields
Allowed file types for FILE type fields
Array of attachment UUIDs associated with the assistant
Was this page helpful?