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

# Bir Runway karakter performansı oluşturun

> Referans bir videodan karakter performansı görevleri başlatmak, yüz ifadelerini ve vücut hareketini yönlendirmek için CometAPI'yi Runway Control a character API ile kullanın.

Bu endpoint'i, bir referans klipteki performansı bir karakter görseline veya karakter videosuna aktarmak için kullanın.

## Çağırmadan önce

* Gerekli `X-Runway-Version` header'ını gönderin, örneğin `2024-11-06`
* `model: act_two` kullanın
* Erişilebilir HTTPS URL'leri olarak bir `character` varlığı ve bir `reference` varlığı sağlayın
* Stili ince ayarlamadan önce `bodyControl: true` ve orta düzey bir `expressionIntensity` ile başlayın

## Çıktı oranı

| Ayar    | Desteklenen değerler                                                                           | Varsayılan başlangıç noktası | Sınır davranışı                                                     |
| ------- | ---------------------------------------------------------------------------------------------- | ---------------------------- | ------------------------------------------------------------------- |
| `ratio` | `1280:720`, `720:1280` veya seçilen Runway model/sürümü tarafından kabul edilen başka bir oran | `1280:720`                   | Karakter ve referans varlıklarını istenen kare şekline yakın tutun. |

## Görev akışı

<Steps>
  <Step title="Karakter performansı isteğini gönderin">
    Karakter varlığınız, referans varlığınız ve hareket ayarlarınızla görevi oluşturun.
  </Step>

  <Step title="Döndürülen görev kimliğini saklayın">
    Döndürülen `id` değerini saklayın, çünkü daha sonra yoklama yapmak için buna ihtiyacınız olacak.
  </Step>

  <Step title="Görev durumunu yoklayın">
    Görev nihai bir duruma ulaşana ve sağlayıcı meta verileri tamamlanmış çıktıyı içerene kadar [Bir Runway görevi alın](./runway-to-get-task-details) ile devam edin.
  </Step>
</Steps>

## Girdi rolleri

* `character`, canlandırmak istediğiniz özneyi ifade eder
* `reference`, yüz performansını veya vücut hareketini sağlayan kaynak kliptir
* `bodyControl`, hareket aktarımının ifade aktarımına ek olarak vücut hareketini de içerip içermediğine karar verir
* `contentModeration`, isteğe sağlayıcı moderasyon eşiklerini uygular


## OpenAPI

````yaml api/openapi/video/runway/official-format/post-control-a-character.openapi.json POST /runwayml/v1/character_performance
openapi: 3.1.0
info:
  title: Control a Character API
  version: 1.0.0
  description: >-
    Create a Runway character-performance task through the official-format
    CometAPI route.
servers:
  - url: https://api.cometapi.com
security:
  - bearerAuth: []
paths:
  /runwayml/v1/character_performance:
    post:
      summary: Create a Runway character-performance task
      description: >-
        Submit a character asset plus a reference performance clip and receive a
        task id for later polling.
      operationId: control_a_character
      parameters:
        - name: X-Runway-Version
          in: header
          required: true
          description: Runway version header, for example `2024-11-06`.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - character
                - reference
                - bodyControl
                - expressionIntensity
                - seed
                - model
                - ratio
                - contentModeration
              properties:
                character:
                  type: object
                  description: >-
                    The character to control. You can either provide a video or
                    an image.
                  required:
                    - type
                    - uri
                  properties:
                    type:
                      type: string
                    uri:
                      type: string
                  default:
                    type: video
                    uri: https://your-video-host/source.mp4
                reference:
                  type: object
                  description: >-
                    Reference performance clip. Provide `type` (`video`) and
                    `uri` (HTTPS URL).
                  required:
                    - type
                    - uri
                  properties:
                    type:
                      type: string
                    uri:
                      type: string
                  default:
                    type: video
                    uri: https://your-video-host/source.mp4
                bodyControl:
                  type: boolean
                  description: Enable body control.
                  default: true
                expressionIntensity:
                  type: integer
                  description: >-
                    Intensity of the expression transfer. Higher values produce
                    more exaggerated expressions.
                  default: 1
                seed:
                  type: integer
                  description: Random seed for reproducible results.
                  default: 1
                model:
                  type: string
                  description: The model variant to use. Must be act_two.
                  default: act_two
                ratio:
                  type: string
                  description: >-
                    Requested output frame shape, for example 1280:720 or
                    720:1280. Keep the character and reference assets close to
                    the requested frame shape.
                  default: '1280:720'
                contentModeration:
                  type: object
                  required:
                    - publicFigureThreshold
                  properties:
                    publicFigureThreshold:
                      type: string
                      description: >-
                        Threshold for public-figure detection. Use `auto` for
                        default behavior.
                  default:
                    publicFigureThreshold: auto
              default:
                character:
                  type: video
                  uri: https://your-video-host/source.mp4
                reference:
                  type: video
                  uri: https://your-video-host/source.mp4
                bodyControl: true
                expressionIntensity: 1
                seed: 1
                model: act_two
                ratio: '1280:720'
                contentModeration:
                  publicFigureThreshold: auto
            examples:
              Default:
                summary: Default
                value:
                  character:
                    type: video
                    uri: https://your-video-host/source.mp4
                  reference:
                    type: video
                    uri: https://your-video-host/source.mp4
                  bodyControl: true
                  expressionIntensity: 3
                  seed: 4294967295
                  model: act_two
                  ratio: '1280:720'
                  contentModeration:
                    publicFigureThreshold: auto
      responses:
        '200':
          description: Task accepted.
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                properties:
                  id:
                    type: string
                example:
                  id: 5b91e444-c232-deaf-a4d7-8aef3e57336b
      x-codeSamples:
        - lang: Shell
          label: Default
          source: |
            curl https://api.cometapi.com/runwayml/v1/character_performance \
              -H "Authorization: Bearer $COMETAPI_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                  "character": {
                    "type": "video",
                    "uri": "https://your-video-host/character.mp4"
                  },
                  "reference": {
                    "type": "video",
                    "uri": "https://your-video-host/performance.mp4"
                  },
                  "model": "act_two",
                  "ratio": "1280:720"
                }'
        - lang: Python
          label: Default
          source: >
            import os

            import requests


            response = requests.post(
                "https://api.cometapi.com/runwayml/v1/character_performance",
                headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
                json={
                        "character": {
                                "type": "video",
                                "uri": "https://your-video-host/character.mp4"
                        },
                        "reference": {
                                "type": "video",
                                "uri": "https://your-video-host/performance.mp4"
                        },
                        "model": "act_two",
                        "ratio": "1280:720"
                },
            )


            task = response.json()

            print(task["id"])  # poll GET /runwayml/v1/tasks/{id} until the
            output array appears
        - lang: JavaScript
          label: Default
          source: >
            const response = await
            fetch("https://api.cometapi.com/runwayml/v1/character_performance",
            {
                method: "POST",
                headers: {
                    Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
                    "Content-Type": "application/json",
                },
                body: JSON.stringify({
                        "character": {
                            "type": "video",
                            "uri": "https://your-video-host/character.mp4"
                        },
                        "reference": {
                            "type": "video",
                            "uri": "https://your-video-host/performance.mp4"
                        },
                        "model": "act_two",
                        "ratio": "1280:720"
                    }),
            });


            const task = await response.json();

            console.log(task.id); // poll GET /runwayml/v1/tasks/{id} until the
            output array appears
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication. Use your CometAPI key.

````