# 무료 모델 호출하기

**RunYour Free**(`runyour/free`)는 API 키 계정의 **크레딧을 차감하지 않고** API를 호출할 수 있는 특수 모델 alias입니다.

기존 RunYour API와 동일한 Base URL과 인증 방식을 그대로 사용하며, 모델 ID만 `runyour/free`로 변경하면 됩니다. 별도 설정이나 코드 수정이 필요하지 않습니다.

***

#### 지원 모델 문자열

아래 두 가지 모델 문자열은 동일하게 동작합니다 (대소문자 무관).

<table><thead><tr><th width="240.24609375">모델 문자열</th><th>비고</th></tr></thead><tbody><tr><td><code>runyour/free</code></td><td>요청 시 사용 가능</td></tr><tr><td><code>runyourai/free</code></td><td><code>GET /v1/models</code> 모델 목록에 표시되는 공식 ID</td></tr></tbody></table>

> 응답의 `model` 필드에는 내부 백엔드 ID가 아닌, **요청 시 사용한 alias**(`runyour/free` 또는 `runyourai/free`)가 그대로 반환됩니다.

***

#### 과금 정책

**크레딧 차감 없음** `runyour/free`로 성공한 API 호출은 계정 크레딧에서 **차감되지 않습니다**.

**사용량 로그는 기록됨** 호출마다 토큰 사용량(입력 / 출력 / 합계)과 해당 백엔드 모델 기준의 예상 비용은 로그에 저장됩니다. 이는 투명성 및 분석 목적이며, 실제 청구로 이어지지 않습니다.

{% hint style="info" %}
대시보드 API 사용 내역에서 비용 수치가 표시될 수 있습니다. 이 값은 "**만약 일반 모델을 사용했다면 차감됐을 예상 금액**"이며, RunYour Free 호출에 대해서는 실제로 차감되지 않습니다.
{% endhint %}

***

#### 백엔드 동작

각 요청은 등록된 무료 백엔드 모델 중 **하나가 랜덤으로 선택**되어 처리됩니다. 동작 방식과 제한은 선택된 백엔드 모델을 따릅니다.

{% hint style="warning" %}
무료 백엔드는 OpenAI 네이티브 Responses 스트림을 지원하지 않습니다. 스트리밍이 필요한 경우 `POST /v1/chat/completions`에 `stream: true` 옵션을 사용하세요.
{% endhint %}

***

#### 코드 예시

**OpenAI SDK (TypeScript)**

```typescript
const completion = await client.chat.completions.create({
  model: "runyour/free",
  messages: [{ role: "user", content: "Hello!" }],
});
```

**OpenAI SDK (Python)**

```python
completion = client.chat.completions.create(
    model="runyour/free",
    messages=[{"role": "user", "content": "Hello!"}],
)
```

**스트리밍 예시 (TypeScript)**

```typescript
const stream = await client.chat.completions.create({
  model: "runyour/free",
  messages: [{ role: "user", content: "Hello!" }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || "");
}
```

***

#### 요약

<table><thead><tr><th width="239.9609375">항목</th><th>내용</th></tr></thead><tbody><tr><td>모델 alias</td><td><code>runyour/free</code> / <code>runyourai/free</code></td></tr><tr><td>크레딧 차감</td><td>❌ 차감 없음</td></tr><tr><td>사용량 로그 기록</td><td>✅ 기록됨 (실제 청구 아님)</td></tr><tr><td>스트리밍 지원</td><td>✅ <code>stream: true</code> 옵션 사용</td></tr><tr><td>Base URL / 인증</td><td>기존 RunYour API와 동일</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://runyourai.gitbook.io/userguide/api/guide/runyourfree.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
