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

# 빠른 시작

> 2분 만에 TokenLab API 시작하기

## 단계 1: 무료 체험 크레딧으로 시작하기

<Steps>
  <Step title="계정 만들기">
    이메일, Gmail 또는 GitHub 계정으로 [tokenlab.sh](https://tokenlab.sh)에서 가입하세요.
  </Step>

  <Step title="제공된 체험 크레딧 사용">
    새 계정에는 첫 번째 소규모 테스트 요청에 사용할 수 있는 체험 크레딧이 포함됩니다. Quickstart 전에 충전할 필요가 없습니다.
  </Step>

  <Step title="API 키 생성 또는 복사">
    **대시보드 → API Keys**로 이동해 새 키를 만들거나 기존 키를 복사하세요. 전체 키는 한 번만 표시되므로 안전하게 보관하세요.
  </Step>
</Steps>

<Warning>
  API 키를 안전하게 보관하세요. 클라이언트 측 코드나 공개 저장소에 절대 노출하지 마십시오.
</Warning>

## 단계 2: 클라이언트 설치

<CodeGroup>
  ```bash Python theme={null}
  pip install openai
  ```

  ```bash JavaScript theme={null}
  npm install openai
  ```

  ```bash Go theme={null}
  go get github.com/openai/openai-go/v3
  ```

  ```bash PHP theme={null}
  composer require openai-php/client
  ```
</CodeGroup>

## 단계 3: 첫 요청 보내기

대부분의 신규 통합은 `POST /v1/chat/completions`의 **Chat Completions**에서 시작하세요.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.tokenlab.sh/v1/chat/completions \
    -H "Authorization: Bearer sk-your-api-key" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "gpt-5.4",
      "messages": [
        {"role": "user", "content": "What is the capital of France?"}
      ]
    }'
  ```

  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="sk-your-api-key",
      base_url="https://api.tokenlab.sh/v1"
  )

  response = client.chat.completions.create(
      model="gpt-5.4",
      messages=[{"role": "user", "content": "What is the capital of France?"}]
  )

  print(response.choices[0].message.content)
  ```

  ```javascript JavaScript theme={null}
  import OpenAI from 'openai';

  const client = new OpenAI({
    apiKey: 'sk-your-api-key',
    baseURL: 'https://api.tokenlab.sh/v1'
  });

  const response = await client.chat.completions.create({
    model: 'gpt-5.4',
    messages: [{ role: 'user', content: 'What is the capital of France?' }],
  });

  console.log(response.choices[0].message.content);
  ```
</CodeGroup>

<Note>
  Responses 전용 동작이 명시적으로 필요한 경우에만 `POST /v1/responses`를 사용하세요. 일부 Responses 전용 필드는 선택한 모델 및 라우팅 경로에 따라 다릅니다.
</Note>

## 프로덕션 사용을 위해 충전하기

제공된 체험 크레딧은 첫 번째 소규모 테스트용입니다. 프로덕션 사용이나 더 많은 테스트를 준비할 때만 **대시보드 → Billing**에서 크레딧을 추가하세요.

## 다양한 모델 시도하기

TokenLab는 수백 개의 모델을 지원합니다. 변경할 것은 `model` 필드뿐입니다:

```python theme={null}
response = client.chat.completions.create(model="gpt-5.4", messages=[{"role": "user", "content": "Hello"}])
response = client.chat.completions.create(model="gpt-5-mini", messages=[{"role": "user", "content": "Hello"}])
response = client.chat.completions.create(model="claude-sonnet-4-6", messages=[{"role": "user", "content": "Hello"}])
response = client.chat.completions.create(model="gemini-3.5-flash", messages=[{"role": "user", "content": "Hello"}])
response = client.chat.completions.create(model="deepseek-r1", messages=[{"role": "user", "content": "Hello"}])
```

## 스트리밍 활성화

```python theme={null}
stream = client.chat.completions.create(
    model="gpt-5.4",
    messages=[{"role": "user", "content": "Tell me a short story."}],
    stream=True
)

for chunk in stream:
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="")
```

## 다음 단계

<CardGroup cols={2}>
  <Card title="인증" icon="key" href="/authentication">
    API 키 관리 및 보안에 대해 알아보세요.
  </Card>

  <Card title="OpenAI SDK" icon="code" href="/integrations/openai-sdk">
    기존 OpenAI SDK와 함께 OpenAI 호환 `/v1` 라우트를 사용하세요.
  </Card>

  <Card title="API 참조" icon="book" href="/api-reference/introduction">
    전체 엔드포인트 참조를 확인하세요.
  </Card>

  <Card title="모델" icon="robot" href="https://tokenlab.sh/ko/models">
    현재 모델 가용성 및 가격을 확인하세요.
  </Card>
</CardGroup>
