Dyno Phi — Protein Design API

Phi is a biomodal computation platform for protein design. The REST API lets a caller create datasets from PDB/CIF structures, submit structure-prediction and sequence-design jobs across twenty biomodal job types (ESMFold, AlphaFold2 multimer, ProteinMPNN, Boltz, Chai-1, ESM-2, RFDiffusion3, BoltzGen, OpenFold3, BindCraft, AF2Rank, TM-score and more), compose and execute multi-step workflows and protocols, register agents and tools, poll job status, stream job logs, and download scored results and artifacts. Authentication is a static API key; per-user and per-organization job quotas are exposed through the API itself.

Documentation

Specifications

Other Resources

OpenAPI Specification

dyno-phi-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Phi — Protein Design API
  description: 'Phi is a biomodal computation platform for protein design. Submit structure-prediction and sequence-design
    jobs, track their status, and retrieve scored results — all via a single REST API.


    ## Authentication

    All endpoints require an API key supplied as `Authorization: Bearer <key>` or a Clerk session token. Organisation ID is
    derived automatically from Clerk tokens; static-key callers must include `X-Organization-ID`.


    ## Quick links

    - `POST /v1/phi/jobs` — submit a job

    - `GET  /v1/phi/jobs/{job_id}/status` — poll status

    - `GET  /v1/phi/jobs/{job_id}/scores` — download scored results

    '
  version: 1.0.0
servers:
- url: https://api.dyno-agents.app
  description: Production
- url: http://localhost:8000
  description: Local development
paths:
  /v1/phi/auth/me:
    get:
      tags:
      - auth
      summary: Get Current User Profile
      description: "Return the Clerk-verified user profile and primary org ID.\n\n``org_id`` is sourced in priority order:\n\
        \  1. Directly from the verified token claims (``org_id`` claim in session JWTs\n     and ``ak_…`` keys scoped to\
        \ an org).  This is the common path now that\n     Clerk \"Membership required\" is enabled.\n  2. Fetched from the\
        \ Clerk membership API when the token has no ``org_id``\n     claim (older sessions / tokens issued without an active\
        \ org context).\n  3. Returns a 422 if no org can be determined for a Clerk-authed caller, so\n     the client receives\
        \ a clear error instead of a silent \"default-org\" that\n     would be rejected downstream.\n\nStatic API-key callers\
        \ receive a stub profile; ``org_id`` comes from the\n``X-Organization-ID`` header or falls back to ``\"default-org\"\
        ``."
      operationId: get_current_user_profile_v1_phi_auth_me_get
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserProfileResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/auth/me/quota:
    get:
      tags:
      - auth
      summary: Get My Quota
      description: 'Return the authenticated user''s quota limits and current usage.


        Available to any user with a valid Clerk JWT or ``ak_`` key — no admin

        privilege required.  Use this to drive quota banners and progress bars in

        the frontend.'
      operationId: get_my_quota_v1_phi_auth_me_quota_get
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserQuotaResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/files/upload-url:
    post:
      tags:
      - files
      summary: Create Upload Url
      description: "Generate a short-lived signed GCS URL so the browser or CLI can PUT a file\ndirectly to cloud storage\
        \ without routing through the API server.\n\nClient workflow:\n  1. POST /v1/phi/files/upload-url → receive upload_url\
        \ + gcs_uri\n  2. PUT upload_url with raw file bytes (no auth header needed)\n  3. Pass gcs_uri as params.fasta_gcs_uri\
        \ or params.pdb_gcs_uri in job submission"
      operationId: create_upload_url_v1_phi_files_upload_url_post
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadUrlRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadUrlResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/files/upload:
    post:
      tags:
      - files
      summary: Upload File Direct
      description: "Upload a file directly through the API server (proxy to GCS).\n\nUse this instead of ``POST /upload-url``\
        \ when a direct client→GCS PUT is\nblocked by VPC Service Controls or firewall rules.\n\nClient workflow:\n  1. POST\
        \ /v1/phi/files/upload (multipart/form-data, field ``file``)\n  2. Pass the returned ``gcs_uri`` as ``params.fasta_gcs_uri``\
        \ or\n     ``params.pdb_gcs_uri`` in job submission — identical to the signed-URL flow."
      operationId: upload_file_direct_v1_phi_files_upload_post
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_file_direct_v1_phi_files_upload_post'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectUploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/ingest_sessions/:
    post:
      tags:
      - ingest
      summary: Create Ingest Session
      description: 'Create a new ingest session for a batch of files.


        Returns a session ID and a GCS prefix where files should be uploaded

        using the signed URLs returned by POST /ingest_sessions/{id}/upload_urls.'
      operationId: create_ingest_session_v1_phi_ingest_sessions__post
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSessionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSessionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/ingest_sessions/{session_id}/upload_urls:
    post:
      tags:
      - ingest
      summary: Get Upload Urls
      description: 'Return signed GCS PUT URLs for a batch of filenames (max 50 per request).


        The client should PUT each file directly to its signed URL.

        Multiple calls are supported for large batches.'
      operationId: get_upload_urls_v1_phi_ingest_sessions__session_id__upload_urls_post
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadUrlsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadUrlsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/ingest_sessions/{session_id}/upload/{filename}:
    post:
      tags:
      - ingest
      summary: Upload File To Session
      description: "Upload a single file to an ingest session through the API server (proxy to GCS).\n\nUse this instead of\
        \ ``POST /upload_urls`` + client-side PUT when a direct\nclient→GCS PUT is blocked by VPC Service Controls or firewall\
        \ rules.\n\nClient workflow:\n  1. POST /v1/phi/ingest_sessions/ → session_id\n  2. POST /v1/phi/ingest_sessions/{id}/upload/{filename}\
        \ for each file\n  3. POST /v1/phi/ingest_sessions/{id}/finalize\n  4. Poll GET /v1/phi/ingest_sessions/{id} until\
        \ status == READY"
      operationId: upload_file_to_session_v1_phi_ingest_sessions__session_id__upload__filename__post
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      - name: filename
        in: path
        required: true
        schema:
          type: string
          title: Filename
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_file_to_session_v1_phi_ingest_sessions__session_id__upload__filename__post'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectFileUploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/ingest_sessions/{session_id}/finalize:
    post:
      tags:
      - ingest
      summary: Finalize Ingest Session
      description: "Trigger the asynchronous ingest pipeline for a completed upload session.\n\nThe pipeline will:\n  1. List\
        \ all objects under the session's GCS prefix\n  2. Compute checksums and deduplicate\n  3. Create a Dataset record\
        \ and link DatasetFile rows\n  4. Update the session status to READY\n\nPoll GET /ingest_sessions/{id} to track progress."
      operationId: finalize_ingest_session_v1_phi_ingest_sessions__session_id__finalize_post
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Finalize Ingest Session V1 Phi Ingest Sessions  Session Id  Finalize Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/ingest_sessions/{session_id}:
    get:
      tags:
      - ingest
      summary: Get Ingest Session
      description: Poll ingest session status.
      operationId: get_ingest_session_v1_phi_ingest_sessions__session_id__get
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestSessionStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/datasets/:
    get:
      tags:
      - datasets
      summary: List Datasets
      description: List datasets owned by the current organization.
      operationId: list_datasets_v1_phi_datasets__get
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
          default: 1
          title: Page
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          default: 50
          title: Page Size
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/datasets/{dataset_id}:
    get:
      tags:
      - datasets
      summary: Get Dataset
      description: Return dataset metadata and a sample of its file artifacts.
      operationId: get_dataset_v1_phi_datasets__dataset_id__get
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - datasets
      summary: Update Dataset
      description: Rename a dataset. Returns the full updated dataset object.
      operationId: update_dataset_v1_phi_datasets__dataset_id__patch
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchDatasetRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/datasets/{dataset_id}/jobs:
    get:
      tags:
      - datasets
      summary: List Dataset Jobs
      description: List all jobs that were run against this dataset, newest first.
      operationId: list_dataset_jobs_v1_phi_datasets__dataset_id__jobs_get
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
      - name: page
        in: query
        required: false
        schema:
          type: integer
          default: 1
          title: Page
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          default: 50
          title: Page Size
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetJobsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/datasets/{dataset_id}/scores:
    get:
      tags:
      - datasets
      summary: Get Dataset Scores
      description: Return a signed download URL for the most recent scores.csv for this dataset.
      operationId: get_dataset_scores_v1_phi_datasets__dataset_id__scores_get
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: expires_in
        in: query
        required: false
        schema:
          type: integer
          default: 3600
          title: Expires In
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetScoresResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/datasets/{dataset_id}/research-notes:
    post:
      tags:
      - research-notes
      summary: Append to dataset research notes
      description: 'Append markdown content to the dataset''s cumulative research notes file in GCS.


        The notes file lives at ``research/{dataset_id}/notes.md``. If it does not exist

        yet it is created. If it does, the new content is appended after a separator.'
      operationId: append_research_notes_v1_phi_datasets__dataset_id__research_notes_post
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppendNotesRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResearchNotesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - research-notes
      summary: Get dataset research notes
      description: 'Retrieve the accumulated research notes for a dataset.


        Returns the full markdown content inline plus a signed GCS URL for direct

        download. Returns ``exists: false`` (with no content) if no notes have been

        saved for this dataset yet.'
      operationId: get_research_notes_v1_phi_datasets__dataset_id__research_notes_get
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResearchNotesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/workflows/plan/public:
    post:
      tags:
      - workflows
      summary: Plan Workflow Public
      description: 'Generate a workflow plan from a natural language prompt — no authentication required.


        Identical to POST /plan but:

        - Requires no API key or session token

        - ``execute_immediately`` and ``auto_publish`` are always ignored (planning only)

        - The resulting spec is **not saved** to the database; no ``workflow_id`` is returned


        Intended for public demos, embedded widgets, and unauthenticated frontend previews.'
      operationId: plan_workflow_public_v1_phi_workflows_plan_public_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanWorkflowRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Plan Workflow Public V1 Phi Workflows Plan Public Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/workflows/plan:
    post:
      tags:
      - workflows
      summary: Plan Workflow
      description: "Generate workflow plan from natural language prompt.\n\nThis is the primary endpoint for AI-powered workflow\
        \ planning.\nTakes a natural language description and generates a validated WorkflowSpec.\n\nArgs:\n    request: Planning\
        \ request with prompt and options\n    org_id: Organization ID from header\n    user_id: User ID from header\n   \
        \ openai_api_key: OpenAI API key from dependency\n\nReturns:\n    workflow_id: ID of created workflow\n    spec: Full\
        \ WorkflowSpec JSON\n    status: draft or published\n    validation_errors: Any validation issues\n    run_id: If\
        \ execute_immediately=true, the run ID\n\nRaises:\n    HTTPException: If planning fails or validation errors occur"
      operationId: plan_workflow_v1_phi_workflows_plan_post
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: API key for authentication
          title: X-Api-Key
        description: API key for authentication
      - name: X-User-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      - name: X-Organization-ID
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Organization-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanWorkflowRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Plan Workflow V1 Phi Workflows Plan Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/phi/workflows/plan/execute:
    post:
      tags:
      - workflows
      summary: Plan And Execute With Protocol
      description: "Plan and execute w

# --- truncated at 32 KB (170 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/dyno/refs/heads/main/openapi/dyno-phi-openapi.yml