top | item 39147473 (no title) j-b | 2 years ago Most likely through this platform: https://console.cloud.google.com/vertex-ai discuss order hn newest jxy|2 years ago Thanks. I managed to google and get two different API endpoints.From the vertex ai: API_ENDPOINT="us-central1-aiplatform.googleapis.com" PROJECT_ID="test00" MODEL_ID="gemini-pro" LOCATION_ID="us-central1" curl \ -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://${API_ENDPOINT}/v1/projects/${PROJECT_ID}/locations/${LOCATION_ID}/publishers/google/models/${MODEL_ID}:streamGenerateContent" -d '@request.json' and from the makersuite: curl \ -X POST https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=${API_KEY} \ -H 'Content-Type: application/json' \ -d '@request.json' j-b|2 years ago Created a simple app to test Gemini here:https://github.com/dssjon/gemini/blob/main/app.py
jxy|2 years ago Thanks. I managed to google and get two different API endpoints.From the vertex ai: API_ENDPOINT="us-central1-aiplatform.googleapis.com" PROJECT_ID="test00" MODEL_ID="gemini-pro" LOCATION_ID="us-central1" curl \ -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://${API_ENDPOINT}/v1/projects/${PROJECT_ID}/locations/${LOCATION_ID}/publishers/google/models/${MODEL_ID}:streamGenerateContent" -d '@request.json' and from the makersuite: curl \ -X POST https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=${API_KEY} \ -H 'Content-Type: application/json' \ -d '@request.json' j-b|2 years ago Created a simple app to test Gemini here:https://github.com/dssjon/gemini/blob/main/app.py
j-b|2 years ago Created a simple app to test Gemini here:https://github.com/dssjon/gemini/blob/main/app.py
jxy|2 years ago
From the vertex ai:
and from the makersuite:j-b|2 years ago
https://github.com/dssjon/gemini/blob/main/app.py