Getting Started with the Gemini API in Agent Platform with cURL Reviews
64607 reviews
many error: jq: error (at response.json:7): Cannot iterate over null (null) --------------------------------------------------------------------------- CalledProcessError Traceback (most recent call last) Cell In[15], line 1 ----> 1 get_ipython().run_cell_magic('bash', '', '\ncurl -X POST \\\n -H "Authorization: Bearer $(gcloud auth print-access-token)" \\\n -H "Content-Type: application/json" \\\n https://${API_ENDPOINT}:generateContent \\\n -d \'{\n "contents": {\n "role": "user",\n "parts": {\n "text": "List a few popular cookie recipes."\n }\n },\n "generationConfig": {\n "response_mime_type": "application/json",\n "response_schema": {"type": "object", "properties": {"recipe_name": {"type": "string"}}}\n },\n}\' 2>/dev/null >response.json\n\njq -r ".candidates[].content.parts[].text" response.json\n') CalledProcessError: Command 'b'\ncurl -X POST \\\n -H "Authorization: Bearer $(gcloud auth print-access-token)" \\\n -H "Content-Type: application/json" \\\n https://${API_ENDPOINT}:generateContent \\\n -d \'{\n "contents": {\n "role": "user",\n "parts": {\n "text": "List a few popular cookie recipes."\n }\n },\n "generationConfig": {\n "response_mime_type": "application/json",\n "response_schema": {"type": "object", "properties": {"recipe_name": {"type": "string"}}}\n },\n}\' 2>/dev/null >response.json\n\njq -r ".candidates[].content.parts[].text" response.json\n'' returned non-zero exit status 5.
Zhihao C. · Reviewed 5 минут ago
Mayank S. · Reviewed 1 час ago
NIPUN S. · Reviewed 1 час ago
Sunny T. · Reviewed 1 час ago
Hansraj P. · Reviewed 4 часов ago
all went well in the 2nd attempt
Naveen K. · Reviewed 6 часов ago
Neha V. · Reviewed 6 часов ago
In Yong Sta. Maria L. · Reviewed 7 часов ago
vanaja p. · Reviewed 16 часов ago
Laura G. · Reviewed 20 часов ago
Sneha P. · Reviewed 1 день ago
Amit S. · Reviewed 1 день ago
Amit S. · Reviewed 1 день ago
Ryan F. · Reviewed 1 день ago
Jeba Shiny J. · Reviewed 1 день ago
Erivan B. · Reviewed 1 день ago
Bharath R. · Reviewed 1 день ago
Ashish M. · Reviewed 1 день ago
Radu R. · Reviewed 1 день ago
Reina L. · Reviewed 1 день ago
It's good to start
Quang Long B. · Reviewed 1 день ago
Bollam N. · Reviewed 1 день ago
Kirthika M. · Reviewed 1 день ago
greate
Duong K. · Reviewed 1 день ago
Gregorio P. · Reviewed 1 день ago
We do not ensure the published reviews originate from consumers who have purchased or used the products. Reviews are not verified by Google.