Update tool
Update the settings of an existing tool. You cannot change the tool type — only the type-specific settings can be updated.
WEB_SEARCH and CODE_INTERPRETER tools have no configurable settings and cannot be updated.
Request
Authentication
Include your private API key in the request headers:
Authorization: Bearer YOUR_PRIVATE_API_KEY
Path Parameters
Request Body
Include the type-specific settings object for the tool you are updating. All fields within the object are optional — only provided fields are changed.
fileSearchTool fields
imageGenerationTool fields
computerUseTool fields
Example request — update file search
curl -X PATCH "https://superinterface.ai/api/cloud/assistants/{assistantId}/tools/{toolId}" \
-H "Authorization: Bearer YOUR_PRIVATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fileSearchTool": {
"vectorStoreIds": ["vs_abc123", "vs_def456"],
"maxNumResults": 30
}
}'
Example request — update image generation
curl -X PATCH "https://superinterface.ai/api/cloud/assistants/{assistantId}/tools/{toolId}" \
-H "Authorization: Bearer YOUR_PRIVATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"imageGenerationTool": {
"quality": "HIGH",
"size": "SIZE_1024_1536",
"outputFormat": "WEBP"
}
}'
Example request — update computer use
curl -X PATCH "https://superinterface.ai/api/cloud/assistants/{assistantId}/tools/{toolId}" \
-H "Authorization: Bearer YOUR_PRIVATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"computerUseTool": {
"displayWidth": 1920,
"displayHeight": 1080,
"environment": "BROWSER"
}
}'
Response
Example response
{
"tool": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "IMAGE_GENERATION",
"imageGenerationTool": {
"model": "gpt-image-1",
"quality": "HIGH",
"size": "SIZE_1024_1536",
"outputFormat": "WEBP",
"background": "AUTO",
"partialImages": 0
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T11:00: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"
}