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

# Hermes Agent에서 Gemini를 사용하세요.

Google Gemini는 RunAPI의 OpenAI 호환 엔드포인트를 통해 사용할 수 있습니다. Hermes Agent는 custom:runapi 프로바이더를 사용해 호출합니다 — Gemini 3.5 Flash는 속도가 중요한 에이전트 루프, 3.x Pro는 다단계 추론, 2.5 Pro는 긴 컨텍스트 프로덕션 작업에 적합합니다. Google Cloud 프로젝트나 Vertex AI 자격 증명이 필요 없습니다 — 채팅에 이미 설정한 동일한 RUNAPI_API_KEY와 base_url을 사용하면 됩니다.

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

## 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 자격 증명 없이 Hermes Agent에서 Google Gemini를 사용할 수 있나요?

네. RunAPI는 OpenAI 호환 엔드포인트를 통해 Gemini를 제공합니다. base_url https://runapi.ai/v1과 key_env RUNAPI_API_KEY로 RunAPI를 custom:runapi 프로바이더로 설정하세요. Google Cloud 프로젝트, 서비스 계정, Vertex AI 설정이 필요 없습니다.

### 에이전트 워크플로우에 어떤 Gemini 버전을 사용해야 하나요?

Gemini 3.5 Flash(gemini-3.5-flash)가 가장 최신이고 빠릅니다 — 실시간 에이전트 루프와 tool-calling 체인에 가장 적합합니다. Gemini 2.5 Pro(gemini-2.5-pro)는 긴 컨텍스트 작업과 복잡한 추론을 처리합니다. Gemini 3.x Pro 프리뷰는 더 높은 비용으로 최신 추론 기능을 제공합니다.

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

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

### Hermes Agent에서 세션 중간에 Gemini와 다른 LLM을 전환할 수 있나요?

네. 모든 RunAPI LLM은 동일한 custom:runapi 프로바이더와 API key를 공유합니다. 프로바이더 설정을 변경하지 않고 /model 명령어 또는 hermes model을 사용해 gemini-3.5-flash, gpt-5.5, claude-opus-4.6 또는 다른 RunAPI 모델로 전환하세요.

### RunAPI를 통한 Gemini가 function calling과 tool use를 지원하나요?

네. RunAPI는 OpenAI 호환 tools와 tool_choice 파라미터를 Gemini에 전달합니다. 요청 본문에 tools를 정의하면 Gemini가 어시스턴트 메시지에 tool_calls를 반환합니다. Hermes Agent는 GPT나 Claude의 tool call을 처리하는 것과 동일한 방식으로 처리합니다.


## Links

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