

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# TwelveLabs Pegasus 1.2
<a name="model-parameters-pegasus"></a>

TwelveLabs Pegasus 1.2 모델은 포괄적인 비디오 이해 및 분석 기능을 제공합니다. 비디오 콘텐츠를 분석하고 비디오에 대한 질문에 대한 텍스트 설명, 인사이트 및 답변을 생성할 수 있습니다.

이 정보를 사용하여 InvokeModel 및 InvokeModelWithResponseStream(스트리밍) 작업으로 TwelveLabs 모델에 대한 추론 직접 호출을 수행합니다.
+ 공급자 - TwelveLabs
+ 범주 - 비디오 이해, 콘텐츠 분석
+ 모델 ID - `twelvelabs.pegasus-1-2-v1:0`
+ 입력 양식 - 비디오
+ 출력 양식 - 텍스트
+ 최대 비디오 크기 - 1시간 길이의 비디오(파일 크기 2GB 미만)

## TwelveLabs Pegasus 1.2 요청 파라미터
<a name="model-parameters-pegasus-request"></a>

다음 표는 TwelveLabs Pegasus 1.2 모델의 입력 파라미터를 설명합니다.


**TwelveLabs Pegasus 1.2 요청 파라미터**  

| Field | 유형 | 필수 | 설명 | 
| --- | --- | --- | --- | 
| inputPrompt | 문자열 | 예 | 비디오를 분석하라는 프롬프트입니다. 최대: 토큰 2,000개. | 
| temperature | double | 아니요 | 모델의 온도입니다. 출력의 무작위화를 제어합니다. 기본값: 0.2, 최소: 0, 최대: 1. | 
| responseFormat | 객체 | 아니요 | 사용자가 구조화된 출력 형식을 지정할 수 있습니다. 현재 json\$1schema만 지원합니다. | 
| mediaSource | 객체 | 예 | 미디어 소스를 설명합니다. base64String 또는 s3Location을 제공해야 합니다. | 
| mediaSource.base64String | 문자열 | No | 비디오의 Base64 인코딩 바이트 문자열입니다. 최대: 25MB. | 
| mediaSource.s3Location.uri | 문자열 | No | 비디오를 다운로드할 수 있는 S3 URI입니다. 최대: 1시간 길이의 비디오(파일 크기 2GB 미만) | 
| mediaSource.s3Location.bucketOwner | 문자열 | No | 버킷 소유자의 AWS 계정 ID입니다. | 
| maxOutputTokens | 정수 | 아니요 | 생성할 최대 토큰 수입니다. 최대: 4,096개. | 

## TwelveLabs Pegasus 1.2 응답 필드
<a name="model-parameters-pegasus-response"></a>

다음 표에서는 TwelveLabs Pegasus 1.2 모델의 출력 필드를 설명합니다.


**TwelveLabs Pegasus 1.2 응답 필드**  

| Field | Type | 설명 | 
| --- | --- | --- | 
| message | 문자열 | 모델의 비디오 분석이 포함된 출력 메시지입니다. | 
| finishReason | 문자열 | 출력이 종료된 이유를 설명하는 중지 이유입니다. 유효한 값: stop(API는 한도에 도달하지 않고 전체 완료를 반환함), length(생성이 max\$1tokens 한도를 초과함). | 

## TwelveLabs Pegasus 1.2 요청 및 응답
<a name="model-parameters-pegasus-examples"></a>

다음 예제에서는 다양한 입력 소스에서 TwelveLabs Pegasus 1.2 모델을 사용하는 방법을 보여줍니다.

------
#### [ Request ]

다음 예제에서는 TwelveLabs Pegasus 1.2 모델의 요청 형식을 보여줍니다.

**base64 인코딩 비디오 사용:**

```
{
  "inputPrompt": "tell me about the video",
  "mediaSource": {
      "base64String": "<BASE64 STRING OF VIDEO FILE>"
  },
  "temperature": 0
}
```

**S3 저장 비디오 사용:**

```
{
    "inputPrompt": "Tell me about this video",
    "mediaSource": {
        "s3Location": {
            "uri": "s3://path-to-video-object-in-s3",
            "bucketOwner": "bucket-owner-account-id"
        }
    },
    "temperature": 0
}
```

**구조화된 출력 형식 사용:**

```
{
    "inputPrompt": "Analyze this video and provide a structured summary",
    "mediaSource": {
        "s3Location": {
            "uri": "s3://path-to-video-object-in-s3",
            "bucketOwner": "bucket-owner-account-id"
        }
    },
    "temperature": 0.2,
    "maxOutputTokens": 2048,
    "responseFormat": {
        "type": "json_schema",
        "json_schema": {
            "name": "video_analysis",
            "schema": {
                "type": "object",
                "properties": {
                    "summary": {"type": "string"},
                    "key_scenes": {"type": "array", "items": {"type": "string"}},
                    "duration": {"type": "string"}
                },
                "required": ["summary", "key_scenes"]
            }
        }
    }
}
```

------
#### [ Response ]

다음 예제에서는 TwelveLabs Pegasus 1.2 모델의 응답 형식을 보여줍니다.

**표준 응답:**

```
{
  "message": "This video shows a person walking through a park during sunset. The scene includes trees, a walking path, and golden lighting from the setting sun. The person appears to be enjoying a peaceful evening stroll.",
  "finishReason": "stop"
}
```

**구조화된 출력의 응답:**

```
{
  "message": "{\"summary\": \"A peaceful evening walk through a park at sunset\", \"key_scenes\": [\"Person entering the park\", \"Walking along tree-lined path\", \"Sunset lighting through trees\", \"Person sitting on bench\"], \"duration\": \"Approximately 2 minutes\"}",
  "finishReason": "stop"
}
```

**최대 토큰에 도달했을 때 응답:**

```
{
  "message": "This video contains multiple scenes showing various activities. The first scene shows...",
  "finishReason": "length"
}
```

------