Convai Narrative API

The Narrative API from Convai — 11 operation(s) for narrative.

OpenAPI Specification

convai-com-narrative-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Convai Character Characters Narrative API
  version: '1.0'
  description: 'REST API for creating, listing, updating, cloning, and deleting Convai

    conversational AI characters. Characters are reusable conversational agents

    with backstory, voice, personality, language, and knowledge configuration

    that can be embodied in games, virtual worlds, and 3D experiences via the

    Unity, Unreal, Web, and other Convai SDKs.

    '
  contact:
    name: Convai Developer Support
    url: https://forum.convai.com
servers:
- url: https://api.convai.com
  description: Convai REST API
security:
- ConvaiApiKey: []
tags:
- name: Narrative
paths:
  /character/toggle-is-narrative-driven:
    post:
      summary: Toggle Narrative Mode
      operationId: toggleNarrativeDriven
      tags:
      - Narrative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - character_id
              - is_narrative_driven
              properties:
                character_id:
                  type: string
                is_narrative_driven:
                  type: boolean
      responses:
        '200':
          description: Updated
  /character/narrative/create-section:
    post:
      summary: Create Narrative Section
      operationId: createSection
      tags:
      - Narrative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Section'
      responses:
        '200':
          description: Section created
          content:
            application/json:
              schema:
                type: object
                properties:
                  section_id:
                    type: string
  /character/narrative/edit-section:
    post:
      summary: Edit Narrative Section
      operationId: editSection
      tags:
      - Narrative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Section'
      responses:
        '200':
          description: Section updated
  /character/narrative/get-section:
    post:
      summary: Get Narrative Section
      operationId: getSection
      tags:
      - Narrative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - character_id
              - section_id
              properties:
                character_id:
                  type: string
                section_id:
                  type: string
      responses:
        '200':
          description: Section
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Section'
  /character/narrative/list-sections:
    post:
      summary: List Narrative Sections
      operationId: listSections
      tags:
      - Narrative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - character_id
              properties:
                character_id:
                  type: string
      responses:
        '200':
          description: Section list
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Section'
  /character/narrative/delete-section:
    post:
      summary: Delete Narrative Section
      operationId: deleteSection
      tags:
      - Narrative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - character_id
              - section_id
              properties:
                character_id:
                  type: string
                section_id:
                  type: string
      responses:
        '200':
          description: Section deleted
  /character/narrative/create-trigger:
    post:
      summary: Create Narrative Trigger
      operationId: createTrigger
      tags:
      - Narrative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Trigger'
      responses:
        '200':
          description: Trigger created
          content:
            application/json:
              schema:
                type: object
                properties:
                  trigger_id:
                    type: string
  /character/narrative/update-trigger:
    post:
      summary: Update Narrative Trigger
      operationId: updateTrigger
      tags:
      - Narrative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Trigger'
      responses:
        '200':
          description: Trigger updated
  /character/narrative/get-trigger:
    post:
      summary: Get Narrative Trigger
      operationId: getTrigger
      tags:
      - Narrative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - character_id
              - trigger_id
              properties:
                character_id:
                  type: string
                trigger_id:
                  type: string
      responses:
        '200':
          description: Trigger
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Trigger'
  /character/narrative/list-triggers:
    post:
      summary: List Narrative Triggers
      operationId: listTriggers
      tags:
      - Narrative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - character_id
              properties:
                character_id:
                  type: string
      responses:
        '200':
          description: Trigger list
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Trigger'
  /character/narrative/delete-trigger:
    post:
      summary: Delete Narrative Trigger
      operationId: deleteTrigger
      tags:
      - Narrative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - character_id
              - trigger_id
              properties:
                character_id:
                  type: string
                trigger_id:
                  type: string
      responses:
        '200':
          description: Trigger deleted
components:
  schemas:
    Trigger:
      type: object
      required:
      - character_id
      - trigger_name
      properties:
        character_id:
          type: string
        trigger_id:
          type: string
        trigger_name:
          type: string
        trigger_message:
          type: string
        destination_section:
          type: string
    Section:
      type: object
      required:
      - character_id
      - section_name
      - objective
      properties:
        character_id:
          type: string
        section_id:
          type: string
        section_name:
          type: string
        objective:
          type: string
        behavior_tree_code:
          type: string
        updates_player_persona:
          type: boolean
  securitySchemes:
    ConvaiApiKey:
      type: apiKey
      in: header
      name: CONVAI-API-KEY