# 이용 방법

<figure><img src="/files/vxjCFY8U35tQpNoam0b8" alt=""><figcaption></figcaption></figure>

### API 라우팅이란?

API 라우팅은 RunYour AI의 단일 API 엔드포인트를 통해 OpenAI, Claude, Gemini, DeepSeek, Upstage 등 여러 AI 모델을 하나의 연동으로 호출할 수 있는 기능입니다.

서비스나 제품에 AI 기능을 직접 붙이고 싶은 개발자라면, RunYour AI API 하나만 연동해두면 됩니다. 이후 원하는 모델로 자유롭게 전환하거나 여러 모델을 동시에 활용할 수 있습니다.

### API 라우팅 주요 특징

**1) OpenAI SDK와 완벽 호환** 기존에 OpenAI SDK를 사용 중이라면 Base URL과 API 키만 바꾸면 됩니다. 코드 수정 없이 즉시 연동할 수 있습니다.

**2) 다양한 AI 모델을 하나의 API로 호출** OpenAI, Anthropic, Google, DeepSeek, Upstage 등 주요 프로바이더의 모델을 모두 동일한 방식으로 호출합니다. 모델 ID만 바꾸면 다른 모델로 즉시 전환됩니다.

**3) 사용량 기반 크레딧 과금** API 호출 시 입력·출력 토큰 사용량에 따라 크레딧(C)이 자동 차감됩니다. 잔여 크레딧이 부족하면 응답이 생성되지 않으므로, 사전에 충전 후 이용하세요.

{% hint style="info" %}
API 라우팅 페이지에서 어떤 모델을 사용했는지, 입력·출력 토큰 수, 차감된 크레딧을 상세하게 조회할 수 있습니다.
{% endhint %}


---

# 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.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.
