> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arouter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Content

> Gemini-compatible generateContent endpoint.

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.arouter.ai/v1beta/models/gemini-2.5-flash:generateContent?key=lr_live_xxxx" \
    -H "Content-Type: application/json" \
    -d '{
      "contents": [{"parts": [{"text": "Hello!"}]}]
    }'
  ```

  ```python Python theme={null}
  import google.generativeai as genai

  genai.configure(
      api_key="lr_live_xxxx",
      transport="rest",
      client_options={"api_endpoint": "https://api.arouter.ai"},
  )

  model = genai.GenerativeModel("gemini-2.5-flash")
  response = model.generate_content("Hello!")
  ```
</RequestExample>
