The "Unknown name generationConfig" error happens when the JSON payload uses an incorrect or unsupported field—check the API documentation and correct the field names.
Here is the code snippet you can refer to:

In the above code we are using the following key points:
- Uses curl to send a POST request with proper JSON structure.
- Ensures the field name is correctly spelled as generation_config.
- Includes the right headers and authorization token.
- Passes well-formed JSON data for AI generation.
Hence, the “Unknown name generationConfig” error happens due to incorrect field names—ensuring JSON structure and field names match API expectations resolves the issue.