Skip to main content
GET
/
assistant
/
v1
/
get
[Deprecated] Retrieves 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"
    ]
  }
}
The Assistants API will be deprecated in a future release.For new projects, we recommend using the Agents API. The Agents API provides native Vercel AI SDK compatibility and removes custom transformations.See the migration guide to learn about the differences.
Retrieves the complete configuration and details of an existing Assistant in your workspace.
Requires an API key with the AGENT_API scope and access to the Assistant you want to retrieve.

Query Parameters

ParameterTypeRequiredDescription
assistantIdstringYesUUID of the assistant to retrieve

Examples

Basic Retrieval

const axios = require("axios");

async function getAssistant() {
  const response = await axios.get(
    "https://api.langdock.com/assistant/v1/get",
    {
      params: {
        assistantId: "550e8400-e29b-41d4-a716-446655440000"
      },
      headers: {
        Authorization: "Bearer YOUR_API_KEY"
      }
    }
  );

  console.log("Assistant details:", response.data.assistant);
}

Validation Rules

The API enforces the following validation rules:
  • Assistant access - Your API key must have access to the assistant
  • Workspace match - Assistant must belong to the same workspace as your API key

Response Format

Success Response (200 OK)

{
  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;
  };
}

Error Handling

try {
  const response = await axios.get('https://api.langdock.com/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;
    }
  }
}

Migrating to Agents API

The new Agents API offers improved compatibility with modern AI SDKs. The get endpoint has similar functionality with updated parameter names. See the equivalent endpoint in the Agents API:
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.

Authorizations

Authorization
string
header
required

API key as Bearer token. Format "Bearer YOUR_API_KEY"

Query Parameters

assistantId
string<uuid>
required

UUID of the agent to retrieve

Response

Agent details retrieved successfully

status
enum<string>
required
Available options:
success
assistant
object