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

# 시작하기

몇 분 안에 Venice API를 시작하고 실행해보세요. API 키를 발급받고, 첫 요청을 보내고, 빌드를 시작하세요.

## 빠른 시작

<Steps>
  <Step title="API 키 발급받기">
    [Venice API 설정](https://venice.ai/settings/api)으로 이동해 새 API 키를 생성합니다.

    스크린샷이 포함된 자세한 가이드는 [API 키 가이드](/guides/getting-started/generating-api-key)를 참고하세요.
  </Step>

  <Step title="API 키 설정">
    API 키를 환경변수에 추가합니다. 셸에서 export할 수 있습니다:

    ```bash theme={"dark"}
    export VENICE_API_KEY='your-api-key-here'
    ```

    또는 프로젝트의 `.env` 파일에 추가하세요:

    ```bash theme={"dark"}
    VENICE_API_KEY=your-api-key-here
    ```
  </Step>

  <Step title="SDK 설치">
    Venice는 OpenAI 호환이므로 OpenAI SDK를 그대로 사용할 수 있습니다. cURL이나 raw HTTP 요청을 선호한다면 이 단계는 건너뛰어도 됩니다.

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

      ```bash Node.js theme={"dark"}
      npm install openai
      ```
    </CodeGroup>
  </Step>

  <Step title="첫 요청 보내기">
    <CodeGroup>
      ```python Python theme={"dark"}
      import os
      from openai import OpenAI

      client = OpenAI(
          api_key=os.getenv("VENICE_API_KEY"),
          base_url="https://api.venice.ai/api/v1"
      )

      completion = client.chat.completions.create(
          model="zai-org-glm-5",
          messages=[
              {"role": "system", "content": "You are a helpful AI assistant"},
              {"role": "user", "content": "Why is privacy important?"}
          ]
      )

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

      ```javascript Node.js theme={"dark"}
      import OpenAI from 'openai';

      const client = new OpenAI({
          apiKey: process.env.VENICE_API_KEY,
          baseURL: 'https://api.venice.ai/api/v1'
      });

      const completion = await client.chat.completions.create({
          model: 'zai-org-glm-5',
          messages: [
              { role: 'system', content: 'You are a helpful AI assistant' },
              { role: 'user', content: 'Why is privacy important?' }
          ]
      });

      console.log(completion.choices[0].message.content);
      ```

      ```bash cURL theme={"dark"}
      curl https://api.venice.ai/api/v1/chat/completions \
        -H "Authorization: Bearer $VENICE_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "zai-org-glm-5",
          "messages": [
            {"role": "system", "content": "You are a helpful AI assistant"},
            {"role": "user", "content": "Why is privacy important?"}
          ]
        }'
      ```
    </CodeGroup>

    **메시지 역할(role):**

    * `system` - 모델이 어떻게 동작해야 하는지에 대한 지침
    * `user` - 사용자의 prompt 또는 질문
    * `assistant` - 이전 모델 응답(멀티턴 대화용)
    * `tool` - 함수 호출 결과(도구 사용 시)
  </Step>

  <Step title="모델 ID를 바꿔 모델 전환하기">
    모든 요청에는 `model` ID가 포함됩니다. 다른 모델을 사용하려면 요청의 `model` 값을 변경하세요. 자주 쓰이는 선택지:

    * `zai-org-glm-5` - 대부분의 사용 사례를 위한 기본 모델
    * `kimi-k2-6` - 복잡한 작업에 강한 추론 능력
    * `claude-opus-4-8` - 복잡한 작업을 위한 고지능 모델
    * `venice-uncensored-1-2` - Venice의 검열되지 않은(uncensored) 모델

    <Card title="모든 모델 보기" icon="database" href="/models/overview">
      가격, 기능, context 한도와 함께 전체 모델 목록을 확인하세요
    </Card>
  </Step>

  <Step title="Venice 파라미터 사용하기">
    `venice_parameters`를 사용해 웹 검색 같은 Venice 전용 기능을 활성화할 수 있습니다:

    <CodeGroup>
      ```python Python theme={"dark"}
      import os
      from openai import OpenAI

      client = OpenAI(
          api_key=os.environ.get("VENICE_API_KEY"),
          base_url="https://api.venice.ai/api/v1"
      )

      completion = client.chat.completions.create(
          model="zai-org-glm-5",
          messages=[
              {"role": "user", "content": "What are the latest developments in AI?"}
          ],
          extra_body={
              "venice_parameters": {
                  "enable_web_search": "auto",
                  "include_venice_system_prompt": True
              }
          }
      )

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

      ```javascript Node.js theme={"dark"}
      import OpenAI from 'openai';

      const client = new OpenAI({
          apiKey: process.env.VENICE_API_KEY,
          baseURL: 'https://api.venice.ai/api/v1'
      });

      const completion = await client.chat.completions.create({
          model: 'zai-org-glm-5',
          messages: [
              { role: 'user', content: 'What are the latest developments in AI?' }
          ],
          venice_parameters: {
              enable_web_search: 'auto',
              include_venice_system_prompt: true
          }
      });

      console.log(completion.choices[0].message.content);
      ```

      ```bash cURL theme={"dark"}
      curl https://api.venice.ai/api/v1/chat/completions \
        -H "Authorization: Bearer $VENICE_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "zai-org-glm-5",
          "messages": [
            {"role": "user", "content": "What are the latest developments in AI?"}
          ],
          "venice_parameters": {
            "enable_web_search": "auto",
            "include_venice_system_prompt": true
          }
        }'
      ```
    </CodeGroup>

    [사용 가능한 모든 파라미터](https://docs.venice.ai/api-reference/api-spec#venice-parameters)를 확인하세요.
  </Step>

  <Step title="스트리밍 활성화(선택 사항)">
    `stream=True`를 사용해 응답을 실시간으로 스트리밍합니다:

    <CodeGroup>
      ```python Python theme={"dark"}
      import os
      from openai import OpenAI

      client = OpenAI(
          api_key=os.environ.get("VENICE_API_KEY"),
          base_url="https://api.venice.ai/api/v1"
      )

      stream = client.chat.completions.create(
          model="zai-org-glm-5",
          messages=[{"role": "user", "content": "Write a short story about AI"}],
          stream=True
      )

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

      ```javascript Node.js theme={"dark"}
      import OpenAI from 'openai';

      const client = new OpenAI({
          apiKey: process.env.VENICE_API_KEY,
          baseURL: 'https://api.venice.ai/api/v1'
      });

      const stream = await client.chat.completions.create({
          model: 'zai-org-glm-5',
          messages: [{ role: 'user', content: 'Write a short story about AI' }],
          stream: true
      });

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

      ```bash cURL theme={"dark"}
      curl https://api.venice.ai/api/v1/chat/completions \
        -H "Authorization: Bearer $VENICE_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "zai-org-glm-5",
          "messages": [
            {"role": "user", "content": "Write a short story about AI"}
          ],
          "stream": true
        }'
      ```
    </CodeGroup>
  </Step>

  <Step title="응답 동작 커스터마이즈(선택 사항)">
    temperature, max tokens 등 다양한 파라미터로 모델 응답 방식을 제어하세요:

    <CodeGroup>
      ```python Python theme={"dark"}
      import os
      from openai import OpenAI

      client = OpenAI(
          api_key=os.environ.get("VENICE_API_KEY"),
          base_url="https://api.venice.ai/api/v1"
      )

      completion = client.chat.completions.create(
          model="zai-org-glm-5",
          messages=[
              {"role": "system", "content": "You are a creative storyteller"},
              {"role": "user", "content": "Tell me a creative story"}
          ],
          temperature=0.8,
          max_tokens=500,
          top_p=0.9,
          frequency_penalty=0.5,
          presence_penalty=0.5,
          extra_body={
              "venice_parameters": {
                  "include_venice_system_prompt": False
              }
          }
      )

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

      ```javascript Node.js theme={"dark"}
      import OpenAI from 'openai';

      const client = new OpenAI({
          apiKey: process.env.VENICE_API_KEY,
          baseURL: 'https://api.venice.ai/api/v1'
      });

      const completion = await client.chat.completions.create({
          model: 'zai-org-glm-5',
          messages: [
              { role: 'system', content: 'You are a creative storyteller' },
              { role: 'user', content: 'Tell me a creative story' }
          ],
          temperature: 0.8,
          max_tokens: 500,
          top_p: 0.9,
          frequency_penalty: 0.5,
          presence_penalty: 0.5,
          venice_parameters: {
              include_venice_system_prompt: false
          }
      });

      console.log(completion.choices[0].message.content);
      ```

      ```bash cURL theme={"dark"}
      curl https://api.venice.ai/api/v1/chat/completions \
        -H "Authorization: Bearer $VENICE_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "zai-org-glm-5",
          "messages": [
            {"role": "system", "content": "You are a creative storyteller"},
            {"role": "user", "content": "Tell me a creative story"}
          ],
          "temperature": 0.8,
          "max_tokens": 500,
          "top_p": 0.9,
          "frequency_penalty": 0.5,
          "presence_penalty": 0.5,
          "stream": false,
          "venice_parameters": {
            "include_venice_system_prompt": false
          }
        }'
      ```
    </CodeGroup>

    지원되는 모든 파라미터에 대한 자세한 내용은 [Chat Completions 문서](/api-reference/endpoint/chat/completions)를 확인하세요.
  </Step>
</Steps>

***

## 더 많은 기능

### 이미지 생성

확산(diffusion) 모델로 텍스트 prompt에서 이미지를 생성합니다:

<CodeGroup>
  ```python Python theme={"dark"}
  import os
  import requests

  url = "https://api.venice.ai/api/v1/image/generate"

  payload = {
      "model": "venice-sd35",
      "prompt": "A cyberpunk city with neon lights and rain",
      "width": 1024,
      "height": 1024,
      "format": "webp"
  }

  headers = {
      "Authorization": f"Bearer {os.getenv('VENICE_API_KEY')}",
      "Content-Type": "application/json"
  }

  response = requests.post(url, json=payload, headers=headers)

  print(response.json())
  ```

  ```javascript Node.js theme={"dark"}
  const url = 'https://api.venice.ai/api/v1/image/generate';

  const options = {
      method: 'POST',
      headers: {
          'Authorization': `Bearer ${process.env.VENICE_API_KEY}`,
          'Content-Type': 'application/json'
      },
      body: JSON.stringify({
          model: 'venice-sd35',
          prompt: 'A cyberpunk city with neon lights and rain',
          width: 1024,
          height: 1024,
          format: 'webp'
      })
  };

  try {
      const response = await fetch(url, options);
      const data = await response.json();
      console.log(data);
  } catch (error) {
      console.error(error);
  }
  ```

  ```bash cURL theme={"dark"}
  curl https://api.venice.ai/api/v1/image/generate \
    -H "Authorization: Bearer $VENICE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "venice-sd35",
      "prompt": "A cyberpunk city with neon lights and rain",
      "width": 1024,
      "height": 1024
    }'
  ```
</CodeGroup>

**참고:** 응답은 `images` 배열에 base64로 인코딩된 이미지를 반환합니다. base64 문자열을 디코딩해 이미지를 저장하거나 표시하세요.

**인기 있는 이미지 모델:**

* `qwen-image` - 가장 높은 품질의 이미지 생성
* `venice-sd35` - 기본 선택, 모든 기능과 호환
* `hidream` - 프로덕션 환경을 위한 빠른 생성

<Card title="모든 이미지 모델 보기" icon="image" href="/models/overview#image-models">
  가격과 기능과 함께 사용 가능한 모든 이미지 모델을 확인하세요
</Card>

`cfg_scale`, `negative_prompt`, `style_preset`, `seed`, `variants` 등 더 고급 파라미터 옵션은 [Images API 레퍼런스](/api-reference/endpoint/image/generate)를 참고하세요.

### 이미지 편집

Qwen-Image 모델을 활용한 AI 기반 인페인팅으로 기존 이미지를 수정합니다:

<CodeGroup>
  ```python Python theme={"dark"}
  import os
  import requests
  import base64

  url = "https://api.venice.ai/api/v1/image/edit"

  with open("image.jpg", "rb") as f:
      image_base64 = base64.b64encode(f.read()).decode('utf-8')

  payload = {
      "prompt": "Colorize",
      "image": image_base64
  }

  headers = {
      "Authorization": f"Bearer {os.getenv('VENICE_API_KEY')}",
      "Content-Type": "application/json"
  }

  response = requests.post(url, json=payload, headers=headers)

  with open("edited_image.png", "wb") as f:
      f.write(response.content)
  ```

  ```javascript Node.js theme={"dark"}
  import fs from 'fs';

  const imageBuffer = fs.readFileSync('image.jpg');
  const imageBase64 = imageBuffer.toString('base64');

  const options = {
      method: 'POST',
      headers: {
          'Authorization': `Bearer ${process.env.VENICE_API_KEY}`,
          'Content-Type': 'application/json'
      },
      body: JSON.stringify({
          prompt: 'Colorize',
          image: imageBase64
      })
  };

  const response = await fetch('https://api.venice.ai/api/v1/image/edit', options);
  const imageData = await response.arrayBuffer();
  fs.writeFileSync('edited_image.png', Buffer.from(imageData));
  ```

  ```bash cURL theme={"dark"}
  curl --request POST \
    --url https://api.venice.ai/api/v1/image/edit \
    --header "Authorization: Bearer $VENICE_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
      "prompt": "Colorize",
      "image": "iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAAIGNIUk0A..."
    }'
  ```
</CodeGroup>

**참고:** 이미지 편집기는 Qwen-Image 모델을 사용하며 실험적 endpoint입니다. 입력 이미지는 base64로 인코딩된 문자열로 보내고, API는 편집된 이미지를 바이너리 데이터로 반환합니다.

모든 파라미터는 [Image Edit API](/api-reference/endpoint/image/edit)를 참고하세요.

### 이미지 업스케일링

이미지를 더 높은 해상도로 향상시키고 업스케일링합니다:

<CodeGroup>
  ```python Python theme={"dark"}
  import os
  import requests
  import base64

  url = "https://api.venice.ai/api/v1/image/upscale"

  with open("image.jpg", "rb") as f:
      image_base64 = base64.b64encode(f.read()).decode('utf-8')

  payload = {
      "image": image_base64,
      "scale": 2
  }

  headers = {
      "Authorization": f"Bearer {os.getenv('VENICE_API_KEY')}",
      "Content-Type": "application/json"
  }

  response = requests.post(url, json=payload, headers=headers)

  with open("upscaled_image.png", "wb") as f:
      f.write(response.content)
  ```

  ```javascript Node.js theme={"dark"}
  import fs from 'fs';

  const imageBuffer = fs.readFileSync('image.jpg');
  const imageBase64 = imageBuffer.toString('base64');

  const options = {
      method: 'POST',
      headers: {
          'Authorization': `Bearer ${process.env.VENICE_API_KEY}`,
          'Content-Type': 'application/json'
      },
      body: JSON.stringify({
          image: imageBase64,
          scale: 2
      })
  };

  const response = await fetch('https://api.venice.ai/api/v1/image/upscale', options);
  const imageData = await response.arrayBuffer();
  fs.writeFileSync('upscaled_image.png', Buffer.from(imageData));
  ```

  ```bash cURL theme={"dark"}
  curl --request POST \
    --url https://api.venice.ai/api/v1/image/upscale \
    --header "Authorization: Bearer $VENICE_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
      "image": "iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAAIGNIUk0A...",
      "scale": 2
    }'
  ```
</CodeGroup>

**참고:** 입력 이미지는 base64로 인코딩된 문자열로 보내고, API는 업스케일된 이미지를 바이너리 데이터로 반환합니다.

모든 파라미터는 [Image Upscale API](/api-reference/endpoint/image/upscale)를 참고하세요.

### Text-to-Speech

50개 이상의 다국어 음성으로 텍스트를 음성으로 변환합니다:

<CodeGroup>
  ```python Python theme={"dark"}
  import os
  import requests

  response = requests.post(
      "https://api.venice.ai/api/v1/audio/speech",
      headers={
          "Authorization": f"Bearer {os.getenv('VENICE_API_KEY')}",
          "Content-Type": "application/json"
      },
      json={
          "input": "Hello, welcome to Venice Voice.",
          "model": "tts-kokoro",
          "voice": "af_sky"
      }
  )

  with open("speech.mp3", "wb") as f:
      f.write(response.content)
  ```

  ```javascript Node.js theme={"dark"}
  import fs from 'fs';

  const response = await fetch('https://api.venice.ai/api/v1/audio/speech', {
      method: 'POST',
      headers: {
          'Authorization': `Bearer ${process.env.VENICE_API_KEY}`,
          'Content-Type': 'application/json'
      },
      body: JSON.stringify({
          input: 'Hello, welcome to Venice Voice.',
          model: 'tts-kokoro',
          voice: 'af_sky'
      })
  });

  const audioBuffer = await response.arrayBuffer();
  fs.writeFileSync('speech.mp3', Buffer.from(audioBuffer));
  ```

  ```bash cURL theme={"dark"}
  curl --request POST \
    --url https://api.venice.ai/api/v1/audio/speech \
    --header "Authorization: Bearer $VENICE_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
      "input": "Hello, welcome to Venice Voice.",
      "model": "tts-kokoro",
      "voice": "af_sky"
    }' \
    --output speech.mp3
  ```
</CodeGroup>

`tts-kokoro` 모델은 `af_sky`, `af_nova`, `am_liam`, `bf_emma`, `zf_xiaobei`, `jm_kumo` 등 50개 이상의 다국어 음성을 지원합니다.

모든 음성 옵션은 [TTS API](/api-reference/endpoint/audio/speech)를 참고하세요.

### Speech-to-Text

오디오 파일을 텍스트로 전사합니다:

<CodeGroup>
  ```python Python theme={"dark"}
  import os
  import requests

  url = "https://api.venice.ai/api/v1/audio/transcriptions"

  with open("audio.mp3", "rb") as f:
      response = requests.post(
          url,
          headers={"Authorization": f"Bearer {os.getenv('VENICE_API_KEY')}"},
          files={"file": f},
          data={
              "model": "nvidia/parakeet-tdt-0.6b-v3",
              "response_format": "json"
          }
      )

  print(response.json())
  ```

  ```javascript Node.js theme={"dark"}
  import fs from 'fs';
  import FormData from 'form-data';

  const form = new FormData();
  form.append('file', fs.createReadStream('audio.mp3'));
  form.append('model', 'nvidia/parakeet-tdt-0.6b-v3');
  form.append('response_format', 'json');

  const response = await fetch('https://api.venice.ai/api/v1/audio/transcriptions', {
      method: 'POST',
      headers: {
          'Authorization': `Bearer ${process.env.VENICE_API_KEY}`,
          ...form.getHeaders()
      },
      body: form
  });

  const data = await response.json();
  console.log(data);
  ```

  ```bash cURL theme={"dark"}
  curl --request POST \
    --url https://api.venice.ai/api/v1/audio/transcriptions \
    --header "Authorization: Bearer $VENICE_API_KEY" \
    --form file=@audio.mp3 \
    --form model=nvidia/parakeet-tdt-0.6b-v3 \
    --form response_format=json
  ```
</CodeGroup>

지원 포맷: WAV, FLAC, MP3, M4A, AAC, MP4. 단어 단위 타이밍 데이터가 필요하면 `timestamps=true`를 활성화하세요.

모든 옵션은 [Transcriptions API](/api-reference/endpoint/audio/transcriptions)를 참고하세요.

### 임베딩(Embeddings)

시맨틱 검색, RAG, 추천 등을 위한 벡터 임베딩을 생성합니다:

<CodeGroup>
  ```python Python theme={"dark"}
  import os
  import requests

  url = "https://api.venice.ai/api/v1/embeddings"

  payload = {
      "model": "text-embedding-bge-m3",
      "input": "Privacy-first AI infrastructure for semantic search",
      "encoding_format": "float"
  }

  headers = {
      "Authorization": f"Bearer {os.getenv('VENICE_API_KEY')}",
      "Content-Type": "application/json"
  }

  response = requests.post(url, json=payload, headers=headers)

  print(response.json())
  ```

  ```javascript Node.js theme={"dark"}
  const url = 'https://api.venice.ai/api/v1/embeddings';

  const options = {
      method: 'POST',
      headers: {
          'Authorization': `Bearer ${process.env.VENICE_API_KEY}`,
          'Content-Type': 'application/json'
      },
      body: JSON.stringify({
          model: 'text-embedding-bge-m3',
          input: 'Privacy-first AI infrastructure for semantic search',
          encoding_format: 'float'
      })
  };

  try {
      const response = await fetch(url, options);
      const data = await response.json();
      console.log(data);
  } catch (error) {
      console.error(error);
  }
  ```

  ```bash cURL theme={"dark"}
  curl --request POST \
    --url https://api.venice.ai/api/v1/embeddings \
    --header "Authorization: Bearer $VENICE_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
      "model": "text-embedding-bge-m3",
      "input": "Privacy-first AI infrastructure for semantic search",
      "encoding_format": "float"
    }'
  ```
</CodeGroup>

배치 처리와 고급 옵션은 [Embeddings API](/api-reference/endpoint/embeddings/generate)를 참고하세요.

### 비전(멀티모달)

`qwen3-vl-235b-a22b` 같은 비전 지원 모델을 사용해 이미지와 텍스트를 함께 분석합니다:

<CodeGroup>
  ```python Python theme={"dark"}
  import os
  from openai import OpenAI

  client = OpenAI(
      api_key=os.getenv("VENICE_API_KEY"),
      base_url="https://api.venice.ai/api/v1"
  )

  response = client.chat.completions.create(
      model="qwen3-vl-235b-a22b",
      messages=[
          {
              "role": "user",
              "content": [
                  {"type": "text", "text": "What is in this image?"},
                  {
                      "type": "image_url",
                      "image_url": {"url": "https://www.gstatic.com/webp/gallery/1.jpg"}
                  }
              ]
          }
      ]
  )

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

  ```javascript Node.js theme={"dark"}
  import OpenAI from 'openai';

  const client = new OpenAI({
      apiKey: process.env.VENICE_API_KEY,
      baseURL: 'https://api.venice.ai/api/v1'
  });

  const response = await client.chat.completions.create({
      model: 'qwen3-vl-235b-a22b',
      messages: [
          {
              role: 'user',
              content: [
                  { type: 'text', text: 'What is in this image?' },
                  {
                      type: 'image_url',
                      image_url: { url: 'https://www.gstatic.com/webp/gallery/1.jpg' }
                  }
              ]
          }
      ]
  });

  console.log(response.choices[0].message.content);
  ```

  ```bash cURL theme={"dark"}
  curl https://api.venice.ai/api/v1/chat/completions \
    -H "Authorization: Bearer $VENICE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "qwen3-vl-235b-a22b",
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "What is in this image?"
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://www.gstatic.com/webp/gallery/1.jpg"
              }
            }
          ]
        }
      ]
    }'
  ```
</CodeGroup>

### 함수 호출(Function Calling)

모델이 외부 도구와 API와 상호작용하기 위해 호출할 수 있는 함수를 정의합니다:

<CodeGroup>
  ```python Python theme={"dark"}
  import os
  from openai import OpenAI

  client = OpenAI(
      api_key=os.getenv("VENICE_API_KEY"),
      base_url="https://api.venice.ai/api/v1"
  )

  tools = [
      {
          "type": "function",
          "function": {
              "name": "get_weather",
              "description": "Get the current weather in a location",
              "parameters": {
                  "type": "object",
                  "properties": {
                      "location": {
                          "type": "string",
                          "description": "The city and state"
                      }
                  },
                  "required": ["location"]
              }
          }
      }
  ]

  response = client.chat.completions.create(
      model="zai-org-glm-5",
      messages=[{"role": "user", "content": "What's the weather in San Francisco?"}],
      tools=tools
  )

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

  ```javascript Node.js theme={"dark"}
  import OpenAI from 'openai';

  const client = new OpenAI({
      apiKey: process.env.VENICE_API_KEY,
      baseURL: 'https://api.venice.ai/api/v1'
  });

  const tools = [
      {
          type: 'function',
          function: {
              name: 'get_weather',
              description: 'Get the current weather in a location',
              parameters: {
                  type: 'object',
                  properties: {
                      location: {
                          type: 'string',
                          description: 'The city and state'
                      }
                  },
                  required: ['location']
              }
          }
      }
  ];

  const response = await client.chat.completions.create({
      model: 'zai-org-glm-5',
      messages: [{ role: 'user', content: "What's the weather in San Francisco?" }],
      tools: tools
  });

  console.log(response.choices[0].message);
  ```

  ```bash cURL theme={"dark"}
  curl https://api.venice.ai/api/v1/chat/completions \
    -H "Authorization: Bearer $VENICE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "zai-org-glm-5",
      "messages": [
        {
          "role": "user",
          "content": "What'\''s the weather in San Francisco?"
        }
      ],
      "tools": [
        {
          "type": "function",
          "function": {
            "name": "get_weather",
            "description": "Get the current weather in a location",
            "parameters": {
              "type": "object",
              "properties": {
                "location": {
                  "type": "string",
                  "description": "The city and state"
                }
              },
              "required": ["location"]
            }
          }
        }
      ]
    }'
  ```
</CodeGroup>

***

## 다음 단계

첫 요청을 보내봤다면, Venice API의 더 많은 기능을 살펴보세요:

<CardGroup cols={2}>
  <Card title="모델 둘러보기" icon="database" href="/models/overview">
    사용 가능한 모든 모델의 기능, 가격, context 한도를 비교하세요
  </Card>

  <Card title="API 레퍼런스" icon="code" href="/api-reference/api-spec">
    모든 endpoint와 파라미터가 포함된 상세 API 문서를 살펴보세요
  </Card>

  <Card title="구조화된 응답" icon="brackets-curly" href="/guides/features/structured-responses">
    스키마가 보장되는 JSON 응답을 받는 방법을 알아보세요
  </Card>

  <Card title="AI 에이전트 가이드" icon="robot" href="/guides/integrations/ai-agents">
    에이전트 앱, 코딩 에이전트, MCP 도구, 스킬, 크립토 워크플로로 빌드하세요
  </Card>
</CardGroup>

### 추가 리소스

<CardGroup cols={2}>
  <Card title="Rate Limiting" icon="gauge" href="/api-reference/rate-limiting">
    rate limit과 프로덕션 사용 모범 사례를 이해하세요
  </Card>

  <Card title="에러 코드" icon="triangle-exclamation" href="/api-reference/error-codes">
    API 에러 처리 및 문제 해결을 위한 레퍼런스
  </Card>

  <Card title="Postman 컬렉션" icon="bolt" href="/guides/getting-started/postman">
    간편한 테스트를 위해 완전한 Postman 컬렉션을 임포트하세요
  </Card>

  <Card title="개인정보 보호 및 보안" icon="shield" href="/overview/privacy">
    Venice의 프라이버시 우선 아키텍처와 데이터 처리 방식을 알아보세요
  </Card>
</CardGroup>

***

## 도움이 필요하신가요?

* **Discord 커뮤니티**: [Discord 서버](https://discord.gg/askvenice)에 참여해 지원과 토론을 받으세요
* **문서**: [완전한 API 레퍼런스](/api-reference/api-spec)를 살펴보세요
* **상태 페이지**: [veniceai-status.com](https://veniceai-status.com)에서 서비스 상태를 확인하세요
* **Twitter**: 업데이트는 [@AskVenice](https://x.com/AskVenice)를 팔로우하세요

<Resources />
