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

# 캐릭터

> 공개된 Venice 캐릭터를 탐색하고 OpenAI 호환 채팅 완성 API를 통해 텍스트 모델에서 해당 페르소나를 사용하세요.

캐릭터는 채팅 완성에 적용할 수 있는 공개 페르소나입니다. 각 캐릭터에는 `slug`와 연결된 텍스트 모델이 있습니다.

<Warning>
  Characters API는 프리뷰 상태이며 변경될 수 있습니다.
</Warning>

## 캐릭터 탐색

[List Characters 엔드포인트](/api-reference/endpoint/characters/list)를 사용해 공개 카탈로그를 검색하고 필터링하세요:

```bash cURL theme={"system"}
curl "https://api.venice.ai/api/v1/characters?search=philosophy&limit=5" \
  -H "Authorization: Bearer $VENICE_API_KEY"
```

응답에는 채팅 완성에 필요한 값이 포함되어 있습니다:

```json theme={"system"}
{
  "data": [
    {
      "name": "Alan Watts",
      "slug": "alan-watts",
      "modelId": "venice-uncensored-1-2",
      "description": "A philosophical entertainer...",
      "webEnabled": true
    }
  ],
  "object": "list"
}
```

[Get Character 엔드포인트](/api-reference/endpoint/characters/get)를 사용해 slug로 특정 캐릭터 하나를 조회할 수도 있습니다:

```bash cURL theme={"system"}
curl "https://api.venice.ai/api/v1/characters/alan-watts" \
  -H "Authorization: Bearer $VENICE_API_KEY"
```

반환된 `slug`를 `venice_parameters.character_slug`로 사용하세요. 채팅 완성 모델로는 해당 캐릭터의 `modelId`를 사용하거나 [텍스트 모델 페이지](/models/text)에서 호환되는 모델을 선택하세요.

## 캐릭터와 대화하기

OpenAI 호환 Chat Completions API를 호출할 때 `venice_parameters`에 `character_slug`를 전달하세요:

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

  headers = {"Authorization": f"Bearer {os.environ['VENICE_API_KEY']}"}
  character = requests.get(
      "https://api.venice.ai/api/v1/characters/alan-watts",
      headers=headers,
      timeout=30,
  ).json()["data"]

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

  response = client.chat.completions.create(
      model=character["modelId"],
      messages=[
          {"role": "user", "content": "How can I worry less about the future?"}
      ],
      extra_body={
          "venice_parameters": {
              "character_slug": character["slug"],
          }
      },
  )

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

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

  const characterResponse = await fetch(
    "https://api.venice.ai/api/v1/characters/alan-watts",
    {
      headers: {
        Authorization: `Bearer ${process.env.VENICE_API_KEY}`,
      },
    },
  );
  const { data: character } = await characterResponse.json();

  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: character.modelId,
    messages: [
      { role: "user", content: "How can I worry less about the future?" },
    ],
    venice_parameters: {
      character_slug: character.slug,
    },
  });

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

  ```bash cURL theme={"system"}
  curl "https://api.venice.ai/api/v1/chat/completions" \
    -H "Authorization: Bearer $VENICE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "venice-uncensored",
      "messages": [
        {
          "role": "user",
          "content": "How can I worry less about the future?"
        }
      ],
      "venice_parameters": {
        "character_slug": "alan-watts"
      }
    }'
  ```
</CodeGroup>

<Note>
  캐릭터 slug는 공개된 Venice 캐릭터에만 적용됩니다. slug가 없거나 유효하지 않으면 API 오류가 반환됩니다.
</Note>

## 관련 리소스

* [텍스트 모델](/models/text)
* [List Characters API](/api-reference/endpoint/characters/list)
* [Get Character API](/api-reference/endpoint/characters/get)
* [Character Reviews API](/api-reference/endpoint/characters/reviews)
* [Chat Completions API](/api-reference/endpoint/chat/completions)
