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

# Native Gemini access

> Call APIONE with the generateContent request format.

For applications using the native Gemini format, connect to `https://api.apione.ai/v1beta` and select a model supporting that protocol. Applications using OpenAI format should follow [Chat Completions](https://apione.ai/docs/en/models/chat.md).

## Minimal request

Set `APIONE_API_KEY` and `APIONE_MODEL` using the [quickstart](https://apione.ai/docs/en/quickstart.md). Use an [available model ID](https://apione.ai/docs/en/models/catalog.md). This example follows the basic Gemini text format:

```bash theme={null}
curl --fail-with-body --max-time 120 \
  "https://api.apione.ai/v1beta/models/${APIONE_MODEL:?Set APIONE_MODEL first}:generateContent" \
  -H "x-goog-api-key: ${APIONE_API_KEY:?Set APIONE_API_KEY first}" \
  -H "Content-Type: application/json" \
  --data '{"contents":[{"role":"user","parts":[{"text":"Hello"}]}]}'
```

The model goes in the URL. Messages use `contents[]`, with text in `parts[].text`. Do not add another `models/` prefix.

Read text from `candidates[].content.parts[].text`. Candidates may contain no text; inspect finish reasons and errors too.

## Addresses and compatibility

| Client setting | Address |
| - | - |
| Requires a Gemini Base URL | `https://api.apione.ai/v1beta` |
| Configures host and version separately | Host `https://api.apione.ai`, version `v1beta` |

Make sure `/v1beta` appears only once in the final path. The APIONE endpoint list also includes `:streamGenerateContent`. Pass a non-streaming text test first, then configure streaming and other parameters based on the client and model capabilities.

For Gemini CLI setup, see the [client guide](https://apione.ai/docs/en/guides/gemini-cli.md). If you run into problems, record the request ID and field names returned, then follow [troubleshooting](https://apione.ai/docs/en/support/errors.md).

Sources: [APIONE endpoints](https://apione.ai/docs/en/api/endpoints.md) and [Google generateContent](https://ai.google.dev/api/generate-content).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.