what is wrong with this payload for
# general-english
d
what is wrong with this payload for creating assistant with existing tools: { "name": f"{assistant_name}", "model": { "provider": "openai", "model": "gpt-4o", "toolIds": [ "tool_id" ], }, "firstMessage": f"{first_message}", "backgroundDenoisingEnabled": True, "serverMessages": [ "conversation-update", "end-of-call-report", "tool-calls", ], "silenceTimeoutSeconds": 30, } when i go and check the assistant created in the dashboard I cannot see any tools assigned
k
The issue is that toolIds should be at the top level of the payload, not nested inside the model object, move it out to ensure tools appear correctly in your dashboard.
d
this one also cause Response 400 for creating assistant: payload = json.dumps( { "toolIds": [ "{tool_id}" ], "name": f"{assistant_name}", "model": { "provider": "openai", "model": "gpt-4o", }, "firstMessage": f"{first_message}", "backgroundDenoisingEnabled": True, "serverMessages": [ "conversation-update", "end-of-call-report", "tool-calls", ], "silenceTimeoutSeconds": 30, } )
k
Try specifying the full model name like "gpt-4o-2025-04-29" instead, and ensure your API version supports it.
d
I am only using python requests. url = "https://api.vapi.ai/assistant" assistant_name = "new assistant" first_message = ("Hello how are you") payload = json.dumps( { "toolIds": [ "7b239fc7-c8af-42fa-8a6d-c1f70447bfa4", ], "name": f"{assistant_name}", "model": { "provider": "openai", "model": "gpt-4o-2025-04-29", }, "firstMessage": f"{first_message}", "backgroundDenoisingEnabled": True, "silenceTimeoutSeconds": 30, } ) headers = { "Authorization": f"Bearerprivate api key", "Content-Type": "application/json", "Cookie": "sameple coockie", } response = requests.request("POST", url, headers=headers, data=payload) it works fine If I do not use tools
specifying did not work as well
s
🔴 16:05:07:032 POST /assistant, BadRequestException 400 (SARA - Staging, Response: { "message": [ "property toolIds should not exist", "model.model must be one of the following values: gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-4.5-preview, chatgpt-4o-latest, o3, o3-mini, o4-mini, o1-preview, o1-preview-2024-09-12, o1-mini, o1-mini-2024-09-12, gpt-4o-realtime-preview-2024-10-01, gpt-4o-realtime-preview-2024-12-17, gpt-4o-mini-realtime-preview-2024-12-17, gpt-4o-mini-2024-07-18, gpt-4o-mini, gpt-4o, gpt-4o-2024-05-13, gpt-4o-2024-08-06, gpt-4o-2024-11-20, gpt-4-turbo, gpt-4-turbo-2024-04-09, gpt-4-turbo-preview, gpt-4-0125-preview, gpt-4-1106-preview, gpt-4, gpt-4-0613, gpt-3.5-turbo, gpt-3.5-turbo-0125, gpt-3.5-turbo-1106, gpt-3.5-turbo-16k, gpt-3.5-turbo-0613" ], "error": "Bad Request", "statusCode": 400 } Request: { "headers": { ... }, "body": "{\"toolIds\":[\"7b239fc7-c8af-42fa-8a6d-c1f70447bfa4\"],\"name\":\"new assistant\",\"model\":{\"provider\":\"openai\",\"model\":\"gpt-4o-2025-04-29\"},\"firstMessage\":\"Hello how are you\",\"backgroundDenoisingEnabled\":true,\"silenceTimeoutSeconds\":30}" }
3 Views