Create an assistant

Create a new assistant.

Request

POST https://superinterface.ai/api/cloud/assistants

Authentication

Include your private API key in the request headers:
Authorization: Bearer YOUR_PRIVATE_API_KEY

Request Body

ParameterTypeRequiredDescription
storageProviderTypeStorageProviderTypeYesStorageProviderType (e.g., OPENAI)
storageProviderAssistantIdstringNoStorage provider assistant ID
modelProviderIdstringYesAI provider ID
modelstringYesModel to use (e.g., "gpt-4.1")
namestringYesName of the assistant
descriptionstringNoDescription for the assistant
instructionsstringNoInstructions for the assistant
codeInterpreterEnabledbooleanNoEnable code interpreter
fileSearchEnabledbooleanNoEnable file search

Example request

curl -X POST "https://superinterface.ai/api/cloud/assistants" \ -H "Authorization: Bearer YOUR_PRIVATE_API_KEY" \ -H "Content-Type: application/json" -d '{ "storageProviderType": "OPENAI", "storageProviderAssistantId": "asst_22QudIsRPVWBOkanyBRWWBn2", "modelProviderId": "30cfe680-fee5-49b9-b386-6a7097eb8497", "model": "gpt-4.1", "name": "AI builder", "description": "Builds applications", "instructions": "Help user build apps." }'

Response

ParameterTypeDescription
assistantAssistantNew Assistant

Example response

{ "assistant": { "id": "00cfe680-fee5-49b9-b386-6a7097eb8497", "storageProviderType": "OPENAI", "storageProviderAssistantId": "asst_22QudIsRPVWBOkanyBRWWBn2", "modelProviderId": "30cfe680-fee5-49b9-b386-6a7097eb8497", "model": "gpt-4.1", "name": "AI builder", "description": "Builds applications", "instructions": "Help user build apps.", "codeInterpreterEnabled": false, "fileSearchEnabled": false, "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" } }

Errors

The endpoint may return the following errors:

401 Unauthorized

This error occurs if the API key is invalid or missing.
{ "error": "Unauthorized", "message": "Invalid or missing API key" }