Please give a detailed android API reference

There is only a simple example…

1 Like

There’s no official Gemini Android SDK yet, but you can integrate using the REST API with standard Android networking tools.

Use OkHttp or Retrofit to call the generateContent endpoint

Reference this direct API doc for generateContent:

For request/response structure, see the REST-specific example in the Cookbook:
https://github.com/google-gemini/cookbook/blob/main/rest/generate-content-rest.ipynb

If you’re working in Java, you’re essentially just calling a POST request to the model endpoint with the proper auth header (Bearer <API_KEY>) and a JSON body.