> ## Documentation Index
> Fetch the complete documentation index at: https://docs.toapis.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 빠른 시작

> ToAPIs에서 텍스트, 이미지, 비디오 모델 호출하기

> [!NOTE]
>
> **중국 본토 사용자 안내:** 중국 본토 사용자는 `https://toapis.cn` 를 API 엔드포인트(Base URL)로 사용해 주세요. 본 문서의 예시에서 `https://toapis.com` 을 `https://toapis.cn` 로 바꿔 주세요.

ToAPIs는 OpenAI 호환 텍스트 API와 통합 비동기 이미지·비디오 생성 API를 제공합니다. 이 가이드에서는 현재 사용 가능한 모델로 첫 요청을 전송합니다.

## 1단계: API 키 받기

1. [API Key Management](https://toapis.com/dashboard/tokens) 페이지를 엽니다
2. 로그인하고 새 API 키를 생성합니다
3. 키는 한 번만 표시되므로 안전하게 저장합니다

## 2단계: 모델 선택

| 유형 | 권장 시작 모델 | 설명 |
| - | - | - |
| 텍스트 | `gpt-5.6-terra` | 채팅과 Agent 워크플로에 적합한 균형형 모델 |
| 이미지 | `gpt-image-2` | 텍스트 및 참조 이미지 생성 지원 |
| 비디오 | `seedance-2` | 텍스트, 첫/마지막 프레임 이미지, 멀티모달 참조 기반 비디오 생성 |

사용 가능 모델은 [모델 목록 API](https://docs.toapis.com/docs/ko/api-reference/chat/list-models.md)와 각 모델 문서를 확인하세요.

## 3단계: 요청 보내기

### 텍스트 생성

```bash theme={null}
curl --request POST \
  --url https://toapis.com/v1/chat/completions \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "gpt-5.6-terra",
    "messages": [
      {"role": "user", "content": "자기소개를 해 주세요"}
    ]
  }'
```

### 이미지 생성

```bash theme={null}
curl --request POST \
  --url https://toapis.com/v1/images/generations \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "gpt-image-2",
    "prompt": "영화 같은 조명을 받은 귀여운 판다",
    "size": "1:1",
    "resolution": "1k",
    "n": 1
  }'
```

### 비디오 생성

```bash theme={null}
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "seedance-2",
    "prompt": "해안에 부딪히는 파도, 영화 같은 카메라 움직임",
    "duration": 5,
    "aspect_ratio": "16:9",
    "resolution": "720p"
  }'
```

## 4단계: 비동기 작업 확인

텍스트 요청은 결과를 바로 반환합니다. 이미지와 비디오는 작업 ID를 반환하므로 유형에 맞는 엔드포인트를 사용하세요.

```bash theme={null}
# 이미지 작업
curl https://toapis.com/v1/images/generations/YOUR_TASK_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

# 비디오 작업
curl https://toapis.com/v1/videos/generations/YOUR_TASK_ID \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Task Webhook 설정

Token에 HTTPS URL과 서명 secret을 설정하고 필요하면 동일 origin `callback_url`을 전송합니다. raw body와 `X-ToAPIs-Webhook-*`을 HMAC-SHA256으로 검증하고 event ID를 멱등 처리하세요. 조회는 대체 경로이며 `429`에서는 `Retry-After`를 따릅니다. [Webhook](https://docs.toapis.com/docs/ko/api-reference/webhooks/task-webhooks.md).

## 다음 단계

> **[API 문서](https://docs.toapis.com/docs/ko.md)**
>
> 엔드포인트, 모델, 파라미터를 확인합니다.

> **[Claude Code 연동](https://docs.toapis.com/docs/ko/integrations/claude-code.md)**
>
> Claude Code에서 ToAPIs를 사용합니다.

> **[Codex 연동](https://docs.toapis.com/docs/ko/integrations/codex.md)**
>
> CC Switch를 통해 Codex에 ToAPIs를 연결합니다.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.