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

> Erstellen Sie eine neue Devin-Session. Optional können Sie Parameter wie Snapshot-ID und Sitzungssichtbarkeit angeben.

# Neue Sitzung erstellen



## OpenAPI

````yaml de/v1-openapi.yaml POST /v1/sessions
openapi: 3.1.0
info:
  description: Devin v1 API mit persönlichen API Keys und Service-API Keys
  title: Devin API v1
  version: 1.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v1/sessions:
    post:
      summary: Neue Sitzung erstellen
      description: >-
        Erstellen Sie eine neue Devin-Sitzung mit dem angegebenen Prompt und den
        gewünschten Konfigurationsoptionen.
      operationId: create_session_endpoint_v1_sessions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSessionParams'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSessionResponse'
          description: Erfolgreiche Antwort
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validierungsfehler
components:
  schemas:
    CreateSessionParams:
      properties:
        idempotent:
          default: false
          title: Idempotent
          type: boolean
        knowledge_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Liste der zu verwendenden Knowledge-IDs. Wenn None, wird die gesamte
            Knowledge verwendet. Wenn die Liste leer ist, wird keine Knowledge
            verwendet.
          title: Knowledge Ids
        max_acu_limit:
          anyOf:
            - exclusiveMinimum: 0
              type: integer
            - type: 'null'
          description: Maximaler ACU-Grenzwert, muss positiv sein
          title: Max Acu Limit
        playbook_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Playbook Id
        prompt:
          title: Prompt
          type: string
        secret_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Liste der zu verwendenden Secret-IDs. Ist der Wert None, werden alle
            Secrets verwendet. Ist die Liste leer, werden keine Secrets
            verwendet.
          title: Secret Ids
        session_secrets:
          anyOf:
            - items:
                $ref: '#/components/schemas/SessionSecretInput'
              type: array
            - type: 'null'
          description: >-
            Liste der sitzungsspezifischen Secrets, die verwendet werden sollen.
            Diese Secrets sind nur in dieser Sitzung verfügbar und werden nicht
            in den Organisations-Secrets gespeichert.
          title: Session Secrets
        snapshot_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Snapshot Id
        structured_output_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            JSON-Schema (Entwurf 7) zur Validierung strukturierter Ausgaben.
            Max. 64 KB. Muss in sich geschlossen sein (keine externen
            $ref-Verweise).
          title: Structured Output Schema
        tags:
          anyOf:
            - items:
                type: string
              maxItems: 50
              type: array
            - type: 'null'
          description: Liste der Tags, die der Sitzung hinzugefügt werden sollen.
          title: Tags
        title:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Benutzerdefinierter Titel für die Sitzung. Wenn None angegeben ist,
            wird der Titel automatisch generiert.
          title: Title
        unlisted:
          default: false
          title: Unlisted
          type: boolean
      required:
        - prompt
      title: CreateSessionParams
      type: object
    CreateSessionResponse:
      description: >-
        Antworttext, der bei erfolgreicher Erstellung einer Sitzung
        zurückgegeben wird.
      properties:
        is_new_session:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is New Session
        session_id:
          title: Session Id
          type: string
        url:
          title: Url
          type: string
      required:
        - session_id
        - url
      title: CreateSessionResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    SessionSecretInput:
      description: Eingabemodell für ein Session-Secret, das per API bereitgestellt wird.
      properties:
        key:
          maxLength: 256
          minLength: 1
          title: Key
          type: string
        sensitive:
          default: true
          title: Sensitive
          type: boolean
        value:
          maxLength: 65536
          title: Value
          type: string
      required:
        - key
        - value
      title: SessionSecretInput
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: >-
        Persönlicher API-Schlüssel (apk_user_\*) oder Service-API-Schlüssel
        (apk_\*)
      scheme: bearer
      type: http

````