openapi: 3.2.0 info: title: Phi — Protein Design Files 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 ` 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 tags: - name: files paths: /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' components: schemas: HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError DirectUploadResponse: properties: gcs_uri: type: string title: Gcs Uri description: GCS URI of the uploaded object (use as job param) type: object required: - gcs_uri title: DirectUploadResponse description: Response for POST /v1/phi/files/upload. UploadUrlRequest: properties: filename: type: string title: Filename description: Name of the file to upload (e.g. pdl1_binders.fasta) content_type: type: string title: Content Type description: MIME type of the file being uploaded default: application/octet-stream size_bytes: anyOf: - type: integer minimum: 1.0 - type: 'null' title: Size Bytes description: File size in bytes (optional; used for validation only) type: object required: - filename title: UploadUrlRequest description: Request body for POST /v1/phi/files/upload-url. ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError Body_upload_file_direct_v1_phi_files_upload_post: properties: file: type: string format: binary title: File description: File to upload content_type: type: string title: Content Type description: MIME type of the file default: application/octet-stream type: object required: - file title: Body_upload_file_direct_v1_phi_files_upload_post UploadUrlResponse: properties: upload_url: type: string title: Upload Url description: Signed PUT URL to upload the file directly to GCS gcs_uri: type: string title: Gcs Uri description: GCS URI of the uploaded object (use as job param) expires_in: type: integer title: Expires In description: Seconds until the upload URL expires type: object required: - upload_url - gcs_uri - expires_in title: UploadUrlResponse description: Response for POST /v1/phi/files/upload-url.