---
title: &quot;RunAPI를 통해 OpenClaw에서 Gemini 사용하기 — LLM API 가이드&quot;
url: &quot;https://runapi.ai/ko/openclaw-gemini.md&quot;
canonical: &quot;https://runapi.ai/ko/openclaw-gemini&quot;
locale: &quot;ko&quot;
model: &quot;gemini&quot;
---

# OpenClaw에서 Gemini를 사용하세요.

Google Gemini는 RunAPI의 OpenAI 호환 엔드포인트를 통해 사용할 수 있습니다 — Gemini 3.5 Flash는 100ms 이하의 첫 번째 토큰 지연 시간, 3.x Pro는 복잡한 추론, 2.5 Pro는 프로덕션 워크로드에 적합합니다. OpenClaw는 이를 또 다른 OpenAI 호환 모델로 취급하므로, GPT를 구동하는 것과 동일한 프로바이더 설정과 RUNAPI_API_KEY로 Gemini도 호출할 수 있습니다. Google Cloud 프로젝트, 서비스 계정, Vertex AI 설정이 필요 없습니다.

## API example

```bash
curl -X POST https://runapi.ai/v1/chat/completions \
  -H &quot;Authorization: Bearer $RUNAPI_API_KEY&quot; \
  -H &quot;Content-Type: application/json&quot; \
  -d &#39;{
    &quot;model&quot;: &quot;gemini-3.5-flash&quot;,
    &quot;messages&quot;: [
      {&quot;role&quot;: &quot;system&quot;, &quot;content&quot;: &quot;You are a concise technical assistant.&quot;},
      {&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;Explain the difference between gRPC and REST in three sentences.&quot;}
    ],
    &quot;temperature&quot;: 0.7,
    &quot;max_tokens&quot;: 256
  }&#39;

```

### Response

```json
{
  &quot;id&quot;: &quot;chatcmpl-abc123&quot;,
  &quot;object&quot;: &quot;chat.completion&quot;,
  &quot;model&quot;: &quot;gemini-3.5-flash&quot;,
  &quot;choices&quot;: [
    {
      &quot;index&quot;: 0,
      &quot;message&quot;: {
        &quot;role&quot;: &quot;assistant&quot;,
        &quot;content&quot;: &quot;gRPC uses HTTP/2 and Protocol Buffers for strongly-typed, multiplexed RPC calls with built-in code generation. REST uses HTTP/1.1 (or 2) with JSON payloads and relies on URL paths and HTTP verbs for resource semantics. gRPC is faster for service-to-service calls; REST is simpler to debug and more widely supported by browsers.&quot;
      },
      &quot;finish_reason&quot;: &quot;stop&quot;
    }
  ],
  &quot;usage&quot;: {
    &quot;prompt_tokens&quot;: 34,
    &quot;completion_tokens&quot;: 71,
    &quot;total_tokens&quot;: 105
  }
}

```

## How it works

1. **RunAPI 설정** — RUNAPI_API_KEY 환경 변수를 설정하세요. 이미 RunAPI를 OpenClaw 프로바이더로 설정했다면, 동일한 key와 baseUrl로 Gemini를 사용할 수 있습니다 — 모델 ID만 변경하면 됩니다. Google Cloud 자격 증명이 필요 없습니다.
2. **chat completions를 통해 Gemini 호출** — model을 gemini-3.5-flash로 설정하여 /v1/chat/completions에 POST 요청을 보내세요. system과 user 역할이 포함된 messages 배열을 전달하세요. 엔드포인트는 에이전트가 GPT 모델에 사용하는 것과 동일한 OpenAI 호환 형식을 받습니다.
3. **응답 읽기** — 응답은 OpenAI chat completion 형식으로 동기적으로 도착합니다. 어시스턴트 답변은 choices[0].message.content에 있으며, 토큰 사용량은 usage 객체에 있습니다. 스트리밍의 경우 stream을 true로 설정하고 SSE 이벤트를 파싱하세요.

## Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `model` | `string` | 필수. gemini-3.5-flash, gemini-2.5-flash, gemini-2.5-pro, gemini-3-flash-preview, gemini-3-pro-preview, 또는 gemini-3.1-pro-preview. |
| `messages` | `array` | 필수. role(system, user, assistant)과 content 필드를 가진 메시지 객체 배열. |
| `temperature` | `number` | 선택 사항. 0에서 2 사이의 샘플링 온도. 낮은 값일수록 더 결정론적인 출력을 생성합니다. 기본값은 모델마다 다릅니다. |
| `max_tokens` | `integer` | 선택 사항. 응답에서 생성할 최대 토큰 수. |
| `stream` | `boolean` | 선택 사항. true로 설정하면 응답이 server-sent events로 스트리밍됩니다. 각 이벤트에는 부분 콘텐츠가 포함된 delta가 있습니다. |
| `top_p` | `number` | 선택 사항. 0에서 1 사이의 nucleus 샘플링 임계값. 출력 무작위성 제어를 위한 temperature의 대안. |

## FAQ

### Google Cloud 프로젝트 없이 OpenClaw에서 Google Gemini를 사용할 수 있나요?

네. RunAPI는 OpenAI 호환 엔드포인트를 통해 Gemini 접근을 제공합니다. RUNAPI_API_KEY만 있으면 됩니다 — Google Cloud 프로젝트, 서비스 계정 JSON, Vertex AI 청구 설정이 필요 없습니다.

### RunAPI를 통해 어떤 Gemini 모델을 사용할 수 있나요?

RunAPI는 Gemini 3.5 Flash(최신, 가장 빠름), Gemini 2.5 Flash, Gemini 2.5 Pro, Gemini 3 Flash Preview, Gemini 3 Pro Preview, Gemini 3.1 Pro Preview를 제공합니다. 버전 슬러그를 model 파라미터로 전달하세요 — 예: gemini-3.5-flash 또는 gemini-2.5-pro.

### RunAPI에서 Gemini 가격은 어떻게 책정되나요?

Gemini는 RunAPI에서 종량제 방식으로 토큰당 청구됩니다. 입력 및 출력 토큰은 별도로 계산됩니다. 월정액 구독이나 최소 지출이 없습니다. 현재 백만 토큰당 요금은 RunAPI 가격 페이지를 확인하세요.

### 동일한 OpenClaw 세션에서 Gemini와 GPT를 전환할 수 있나요?

네. 두 모델 모두 동일한 RunAPI 프로바이더 설정과 API key를 사용합니다. 프로바이더를 재설정하지 않고 model 파라미터를 gemini-3.5-flash에서 gpt-5.5(또는 다른 RunAPI 모델)로 변경하면 됩니다. OpenClaw는 요청별로 모델을 선택합니다.

### RunAPI를 통한 Gemini가 스트리밍 응답을 지원하나요?

네. 요청 본문에서 stream을 true로 설정하세요. RunAPI는 Gemini 응답을 OpenAI 호환 delta 형식의 server-sent events로 스트리밍하므로, OpenClaw는 GPT 스트리밍을 처리하는 것과 동일한 방식으로 처리합니다.


## Links

- [OpenClaw 설정 가이드 →](https://runapi.ai/ko/openclaw)
- [Gemini 모델 →](https://runapi.ai/ko/models/gemini)
- [Model catalog](https://runapi.ai/ko/models)
- [API docs](https://runapi.ai/ko/docs)
