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

# Create New Application Thread



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/sgp/openapi.yml post /v4/applications/{application_variant_id}/threads
openapi: 3.1.0
info:
  title: EGP API V4
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
tags:
  - name: Models
    description: Model API.
paths:
  /v4/applications/{application_variant_id}/threads:
    post:
      tags:
        - Applications
        - ChatThreads
      summary: Create New Application Thread
      operationId: POST-V4-/applications/{application_variant_id}/threads
      parameters:
        - name: application_variant_id
          in: path
          required: true
          schema:
            type: string
            title: Application Variant Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatThreadRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatThreadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ChatThreadRequest:
      properties:
        title:
          type: string
          title: Title
        application_variant_id:
          type: string
          title: Application Variant Id
          can_patch: false
        thread_metadata:
          title: Thread Metadata
          additionalProperties: true
          type: object
        account_id:
          type: string
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
      type: object
      required:
        - title
        - application_variant_id
        - account_id
      title: ChatThreadRequest
    ChatThreadResponse:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        application_variant_id:
          type: string
          title: Application Variant Id
          can_patch: false
        thread_metadata:
          title: Thread Metadata
          additionalProperties: true
          type: object
        account_id:
          type: string
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
        created_by_user_id:
          type: string
          title: Created By User Id
          description: The user who originally created the entity.
        created_by_identity_type:
          $ref: '#/components/schemas/IdentifierTypeEnum'
          description: The type of identity that created the entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The date and time when the entity was created in ISO format.
        archived_at:
          title: Archived At
          description: The date and time when the entity was archived in ISO format.
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: The date and time when the entity was last updated in ISO format.
      type: object
      required:
        - id
        - title
        - application_variant_id
        - account_id
        - created_by_user_id
        - created_by_identity_type
        - created_at
        - updated_at
      title: ChatThreadResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    IdentifierTypeEnum:
      type: string
      enum:
        - user
        - service_account
      title: IdentifierTypeEnum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````