POST/assistants

Create Assistant

This endpoint creates an Assistant.

Authorization

Request Body

  • Name
    model
    Type
    string
    Required
    Description

    Name of the Mind that you created.

  • Name
    name
    Type
    string
    Required
    Description

    Name for an Assistant.

  • Name
    instructions
    Type
    string
    Required
    Description

    Instructions that an Assistant will follow.

  • Name
    tools
    Type
    array
    Required
    Description

    Tools to be used by an Assistant.

Request

POST
/assistants
curl -X POST "https://mdb.ai/assistants" \
  -H "Authorization: Bearer MINDS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "model": "gpt-4",
      "name": "Astronomy Tutor",
      "instructions": "You are an astronomy tutor. Write and run code to answer questions about planets, stars, and other celestial objects.",
      "tools": []
  }'

Response

{
    "id": "mdb_asst_af47d5b25bef452097739b7293ebfd63",
    "created_at": 1718883800,
    "description": null,
    "instructions": "You are an astronomy tutor. Write and run code to answer questions about planets, stars, and other celestial objects.",
    "metadata": {
        "company_id": "356"
    },
    "model": "<name of the mind that you created>",
    "name": "Astronomy Tutor",
    "object": "assistant",
    "tools": [],
    "response_format": "auto",
    "temperature": 1.0,
    "tool_resources": {
        "code_interpreter": null,
        "file_search": null
    },
    "top_p": 1.0
}

GET/assistants

List Assistants

This endpoint lists assistants.

Authorization

Request

GET
/assistants
curl -X GET "https://mdb.ai/assistants" \
  -H "Authorization: Bearer MINDS_API_KEY"

Response

{
    "data": [
        {
            "id": "mdb_asst_cfde04f34a5e47548b705fbf091e06bc",
            "created_at": 1718880116.034891,
            "description": null,
            "instructions": "You are an astronomy tutor. Write and run code to answer questions about planets, stars, and other celestial objects.",
            "metadata": {},
            "model": "<name of the mind that you created>",
            "name": "Astronomy Tutor",
            "object": "assistant",
            "tools": [],
            "response_format": "auto",
            "temperature": 1.0,
            "tool_resources": {
                "code_interpreter": null,
                "file_search": null
            },
            "top_p": 1.0,
            "toold": [
                {
                    "type": "code_interpreter"
                }
            ]
        }
    ],
    "object": "list",
    "first_id": "mdb_asst_cfde04f34a5e47548b705fbf091e06bc",
    "last_id": "mdb_asst_cfde04f34a5e47548b705fbf091e06bc",
    "has_more": false
}

DELETE/assistants/{assistant_id}

Delete Assistant

This endpoint deletes an Assistant.

Path Parameters

  • Name
    assistant_id
    Type
    string
    Required
    Description

    Id of an Assistant to be deleted.

Authorization

Request

DELETE
/assistants/{assistant_id}
curl -X DELETE "https://mdb.ai/assistants/mdb_asst_8eeac8ee7022472abe02eb81b03c637a" \
  -H "Authorization: Bearer MINDS_API_KEY"

Response

{
    "id": "mdb_asst_8eeac8ee7022472abe02eb81b03c637a",
    "deleted": true,
    "object": "assistant.deleted"
}

Was this page helpful?