https://github.com/runapi-ai/gemini
RunAPI Gemini API skill for Claude Code, Codex, Gemini CLI, Cursor, and 50+ agents
https://github.com/runapi-ai/gemini
api claude-code codex gemini gemini-cli google runapi runapi-ai skill
Last synced: 1 day ago
JSON representation
RunAPI Gemini API skill for Claude Code, Codex, Gemini CLI, Cursor, and 50+ agents
- Host: GitHub
- URL: https://github.com/runapi-ai/gemini
- Owner: runapi-ai
- License: apache-2.0
- Created: 2026-05-22T06:20:32.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-07-02T09:23:07.000Z (1 day ago)
- Last Synced: 2026-07-02T11:00:17.257Z (1 day ago)
- Topics: api, claude-code, codex, gemini, gemini-cli, google, runapi, runapi-ai, skill
- Homepage: https://runapi.ai/models/gemini
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Configure Gemini or OpenAI-compatible clients to use Gemini models on RunAPI.
Model Reference · Skill Repo · All Models
[](https://www.skills.sh/runapi-ai/gemini/gemini)
[](https://clawhub.ai/runapi-ai/runapi-gemini)
[](https://github.com/runapi-ai/gemini/blob/main/LICENSE)
Call the Gemini API through RunAPI with either the OpenAI SDK or Gemini
`contents` clients -- point any OpenAI-compatible client at
`https://runapi.ai/v1`, send `gemini-2.5-flash`,
`gemini-2.5-pro`, `gemini-3-flash-preview`, `gemini-3-pro-preview`, or
`gemini-3.1-pro-preview`, or call Gemini `contents` paths when an existing
client expects `generateContent` / `streamGenerateContent`, and pay through one
RunAPI balance. This skill teaches Claude Code, Codex, Gemini CLI, Cursor, and
50+ agents how to wire a Gemini API client up against RunAPI.
The canonical agent file is `skills/gemini/SKILL.md`.
## Install the skill
```bash
npx skills add runapi-ai/gemini -g
```
Or paste this prompt to your AI agent:
```text
Install the gemini skill for me:
1. Clone https://github.com/runapi-ai/gemini
2. Copy the skills/gemini/ directory into your
user-level skills directory (e.g. ~/.claude/skills/
for Claude Code, ~/.codex/skills/ for Codex).
3. Verify that SKILL.md is present.
4. Confirm the install path when done.
```
## Use the Gemini API on RunAPI
The Gemini API on RunAPI exposes two request styles:
1. **OpenAI-compatible** — `POST /v1/chat/completions`. Drop-in for
any existing OpenAI SDK client.
2. **Gemini contents** — `POST /v1beta/models/:generateContent` or
`:streamGenerateContent`. Drop-in for clients that send Gemini `contents`
requests.
```python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_RUNAPI_TOKEN",
base_url="https://runapi.ai/v1",
)
response = client.chat.completions.create(
model="gemini-2.5-flash",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
```
```javascript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_RUNAPI_TOKEN",
baseURL: "https://runapi.ai/v1",
});
const response = await client.chat.completions.create({
model: "gemini-2.5-flash",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);
```
```bash
curl -X POST "https://runapi.ai/v1/chat/completions" \
-H "x-api-key: YOUR_RUNAPI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-2.5-flash",
"messages": [{"role": "user", "content": "Hello!"}]
}'
```
Get a RunAPI API Key at .
For `gemini-3-flash-preview` and `gemini-3.5-flash`, RunAPI uses the native
Gemini `streamGenerateContent` route. For other callable Gemini models, RunAPI
accepts Gemini `contents` requests and bridges them to the OpenAI-compatible
chat request format. For new app code, prefer the OpenAI-compatible setup.
## Connect Gemini CLI itself
```bash
export GOOGLE_API_KEY=YOUR_RUNAPI_TOKEN
export GOOGLE_GENAI_BASE_URL=https://runapi.ai
gemini
```
## Supported Gemini models
| Model ID | Capabilities |
|---|---|
| `gemini-3.5-flash` | Streaming `contents` requests, multimodal, function calling, thoughts |
| `gemini-3.1-pro-preview` | + reasoning effort |
| `gemini-3-pro-preview` | + reasoning effort |
| `gemini-3-flash-preview` | Chat, multimodal, function calling, structured output, reasoning effort |
| `gemini-2.5-pro` | + reasoning effort |
| `gemini-2.5-flash` | Chat, multimodal, Google Search, structured output, thoughts |
`gemini-flash-latest` is an alias for `gemini-3-flash-preview`.
## Routing
- Gemini API on RunAPI:
- Gemini API docs:
- Provider page:
- Browse the full RunAPI catalog:
- Skill repository:
## Agent rules
- Keep API keys in `GOOGLE_API_KEY` / `OPENAI_API_KEY` (or your secret
manager); never inline them in commits or shell history.
- Use the OpenAI-compatible endpoint for new app code. Use Gemini `contents`
paths when an existing client already sends `contents` requests.
- Stream long responses (`stream: true`) so the agent can release the
terminal/IO loop early.
- For pricing, rate-limit, and commercial-usage answers, link to
rather than this README.
## License
Licensed under the Apache License, Version 2.0.