Getting There was an issue with the format or content of your request to the model provider. when trying to use Gemini via Clay.
Funny, because Clay generated that JSON body
Hello! Thanks for reaching out! Can you tell me more about the issue you are facing. Would recommend adding the following in your first message to ensure we can get back to you fast! 1. The issue at hand 2. Table link URL (if any) 3. Any additional context (image, loom etc) that might help me troubleshoot this faster! What can I help you with today? :)
Hi Sayli! Table was this one: https://app.clay.com/workspaces/280246/workbooks/wb_0t44rbhr8PMQy2NSDHY/tables/t_0t44rbh3WtWhP3ZFvWm/views/gv_0t44rbh6nMyUZZ7DtDx You can see it in row 2. It's working for other Claygents, but for Gemini it isn't.
Ok, I now went with Claygent. Would still be grateful if this could be looked into as my preferred model is Gemini.
Prompt is the same. Column: Company Domain & Similarity
Hey!
Good news - we figured out what was causing that 400 error with Gemini!
Your original schema was too nested and complex for Gemini to handle. It had all these objects within objects (input, parent, socialProfiles, sources) each with their own required fields, and Gemini just wasn't having it. The API basically choked on all that nesting.
What fixed it:
I regenerated the schema using the AI functionality and it worked! The new schema is way flatter and simpler:
Everything's at the top level now instead of buried in nested objects
Instead of parent.parentName, it's just parentName
Instead of socialProfiles.linkedinCompany, it's just linkedinProfile
The sources object got split into separate evidence arrays (insolvencyEvidence, electricEvidence, etc.)
Got rid of that input object entirely
Switched some German terms to English (like verkehr → trafficCategory, "Güterverkehr" → "freight")
Gemini really prefers flat, simple schemas. The more nesting you have, the more likely it is to throw errors. Keep things at one level and it's happy.
The column should be working as intended now. If you need to add more fields later, just keep them at the top level rather than nesting them, and you should be fine.
Let me know if anything else breaks or if you have questions!
Ofcourse! No worries. Would recommend using the Generate with Ai for the output schema or even create fields if there is no nesting involved. Do reach out again if there is anything else! Going to go ahead and close this one out now :) Happy Monday!
