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

> 新しい Devin セッションを作成します。オプションでスナップショット ID やセッションの公開範囲などのパラメータを指定できます。

# 新しいセッションを作成



## OpenAPI

````yaml ja/v1-openapi.yaml POST /v1/sessions
openapi: 3.1.0
info:
  description: Personal APIキーおよびService APIキーに対応するDevin v1 API
  title: Devin API v1
  version: 1.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v1/sessions:
    post:
      summary: 新しいセッションを作成
      description: 指定したプロンプトと構成オプションを使用して新しい Devin セッションを作成します。
      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: 成功時のレスポンス
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: バリデーションエラー
components:
  schemas:
    CreateSessionParams:
      properties:
        idempotent:
          default: false
          title: Idempotent
          type: boolean
        knowledge_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            使用する Knowledge ID のリストです。None の場合はすべての Knowledge を使用し、空リストの場合は
            Knowledge を使用しません。
          title: Knowledge Ids
        max_acu_limit:
          anyOf:
            - exclusiveMinimum: 0
              type: integer
            - type: 'null'
          description: ACU の最大 limit。正の値である必要があります。
          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: >-
            使用するシークレット ID の一覧です。None
            が指定された場合は、すべてのシークレットを使用します。空リストが指定された場合は、シークレットを一切使用しません。
          title: Secret Ids
        session_secrets:
          anyOf:
            - items:
                $ref: '#/components/schemas/SessionSecretInput'
              type: array
            - type: 'null'
          description: 使用するセッション固有のシークレットのリスト。このセッションでのみ利用可能で、組織のシークレットには保存されません。
          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（Draft 7 準拠）。最大 64KB。自己完結型である必要があります（外部への
            $ref 参照は不可）。
          title: Structured Output Schema
        tags:
          anyOf:
            - items:
                type: string
              maxItems: 50
              type: array
            - type: 'null'
          description: セッションに追加するタグのリスト。
          title: Tags
        title:
          anyOf:
            - type: string
            - type: 'null'
          description: セッションのカスタムタイトル。None が指定された場合は、自動的にタイトルが生成されます。
          title: Title
        unlisted:
          default: false
          title: Unlisted
          type: boolean
      required:
        - prompt
      title: CreateSessionParams
      type: object
    CreateSessionResponse:
      description: セッションが正常に作成された場合に返されるレスポンスボディ。
      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: API 経由で指定されるセッションシークレットの入力モデル。
      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: 個人用APIキー (apk_user_\*) またはサービス用APIキー (apk_\*)
      scheme: bearer
      type: http

````