From 1abc560bfedd5d22cd2d22f3a94b60adc73dc17c Mon Sep 17 00:00:00 2001 From: markgeejw <19712422+markgeejw@users.noreply.github.com> Date: Tue, 13 Oct 2026 02:44:53 +0000 Subject: [PATCH] docs: sync API specs from openprotein-api --- source/_static/js/designSpec.js | 4528 ++--- source/_static/js/embeddingsSpec.js | 22645 ++++++++++++++------------ source/_static/js/foldSpec.js | 5466 ++++--- source/_static/js/predictorSpec.js | 3843 ++--- source/_static/js/promptSpec.js | 2878 ++-- 5 files changed, 20628 insertions(+), 18732 deletions(-) diff --git a/source/_static/js/designSpec.js b/source/_static/js/designSpec.js index ddae3bf..5b91840 100644 --- a/source/_static/js/designSpec.js +++ b/source/_static/js/designSpec.js @@ -1,1247 +1,1273 @@ const designSpec = { - openapi: "3.0.2", - info: { - title: "OpenProtein Design", - description: - "# Design API\nThe Design API provided by OpenProtein.ai builds on top of our predictive models to empower you to achieve your protein design goals easily. \n\nCurrently, we support the following design algorithms:\n- **Genetic Algorithm** - Evolutionary optimization for sequence design\n- **RFdiffusion** - Diffusion-based structure generation for motif scaffolding, binder design, and symmetric assemblies\n- **BoltzGen** - Advanced diffusion model for protein structure and sequence design, supporting protein-ligand complexes, multi-chain assemblies, and cyclic peptides\n", - version: "1.0.0", + "openapi": "3.0.2", + "info": { + "title": "OpenProtein Design", + "description": "# Design API\nThe Design API provided by OpenProtein.ai builds on top of our predictive models to empower you to achieve your protein design goals easily. \n\nCurrently, we support the following design algorithms:\n- **Genetic Algorithm** - Evolutionary optimization for sequence design\n- **RFdiffusion** - Diffusion-based structure generation for motif scaffolding, binder design, and symmetric assemblies\n- **BoltzGen** - Advanced diffusion model for protein structure and sequence design, supporting protein-ligand complexes, multi-chain assemblies, and cyclic peptides\n", + "version": "1.0.0" }, - paths: { + "paths": { "/api/v1/designer/design/genetic-algorithm": { - post: { - tags: ["design"], - summary: "Design using genetic algorithm", - description: - "Create a design job.\n\nExpects a job schema containing an assay_id (from your POST /assaydata flow) and a criteria; which can be a nested list of properties and targets defining the objective function of the design algorithm.\n\nThe outer list defines an OR condition whereas the inner list defines an AND condition. E.g. the corresponding objective for [[A>1, B>1], [C<5]] is (A>1 AND B>1) OR C<5.\nTwo types of objectives are supported:\n\n* model: find sequences that maximize the probability that a property is less than, equal to, or greater than a given value, where the probability is predicted by a previously trained model\n* n_mutations: find sequences that minimize the number of mutations relative to a set of sequences. Useful for exploring the trade-off between number of mutations and fitness.\n\nSee the User Guide or api schema (below).", - operationId: "designGA", - requestBody: { - description: - "Request to design new variants.\n\nCreates a pending job to design new sequences using genetic algorithm.", - content: { + "post": { + "tags": [ + "design" + ], + "summary": "Design using genetic algorithm", + "description": "Create a design job.\n\nExpects a job schema containing an assay_id (from your POST /assaydata flow) and a criteria; which can be a nested list of properties and targets defining the objective function of the design algorithm.\n\nThe outer list defines an OR condition whereas the inner list defines an AND condition. E.g. the corresponding objective for [[A>1, B>1], [C<5]] is (A>1 AND B>1) OR C<5.\nTwo types of objectives are supported:\n\n* model: find sequences that maximize the probability that a property is less than, equal to, or greater than a given value, where the probability is predicted by a previously trained model\n* n_mutations: find sequences that minimize the number of mutations relative to a set of sequences. Useful for exploring the trade-off between number of mutations and fitness.\n\nSee the User Guide or api schema (below).", + "operationId": "designGA", + "requestBody": { + "description": "Request to design new variants.\n\nCreates a pending job to design new sequences using genetic algorithm.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/DesignRequestGA", - }, - }, + "schema": { + "$ref": "#/components/schemas/DesignRequestGA" + } + } }, - required: true, + "required": true }, - responses: { - 202: { - description: "Design job created and pending.", - content: { + "responses": { + "202": { + "description": "Design job created and pending.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Job", - }, - }, - }, - }, - 400: { - description: "Bad request.", - content: { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 403: { - description: "Forbidden.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 422: { - description: "Validation error.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation error.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/designer/design/{job_id}/continue": { - post: { - tags: ["design"], - summary: "Continue design job", - description: "Request a continuation of a design job.", - operationId: "continueDesignJob", - parameters: [ + "post": { + "tags": [ + "design" + ], + "summary": "Continue design job", + "description": "Request a continuation of a design job.", + "operationId": "continueDesignJob", + "parameters": [ { - name: "job_id", - in: "path", - description: "Design job ID to continue generating sequences", - required: true, - schema: { - type: "string", - format: "uuid", - }, - }, + "name": "job_id", + "in": "path", + "description": "Design job ID to continue generating sequences", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - requestBody: { - content: { + "requestBody": { + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/DesignContinueRequest", - }, - }, + "schema": { + "$ref": "#/components/schemas/DesignContinueRequest" + } + } }, - required: true, + "required": true }, - responses: { - 200: { - description: "Design continue job created and pending.", - content: { + "responses": { + "200": { + "description": "Design continue job created and pending.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Job", - }, - }, - }, - }, - 400: { - description: "Bad request.", - content: { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 403: { - description: "Forbidden.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 422: { - description: "Validation error.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation error.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/designer/design": { - get: { - tags: ["design"], - summary: "List designs", - description: "List designs.", - operationId: "listDesigns", - parameters: [ + "get": { + "tags": [ + "design" + ], + "summary": "List designs", + "description": "List designs.", + "operationId": "listDesigns", + "parameters": [ { - required: false, - schema: { - title: "Page Size", - maximum: 1000, - minimum: 0, - type: "integer", - default: 1000, + "required": false, + "schema": { + "title": "Page Size", + "maximum": 1000, + "minimum": 0, + "type": "integer", + "default": 1000 }, - name: "page_size", - in: "query", + "name": "page_size", + "in": "query" }, { - required: false, - schema: { - title: "Page Offset", - minimum: 0, - type: "integer", - default: 0, - }, - name: "page_offset", - in: "query", - }, + "required": false, + "schema": { + "title": "Page Offset", + "minimum": 0, + "type": "integer", + "default": 0 + }, + "name": "page_offset", + "in": "query" + } ], - responses: { - 200: { - description: "List of designs with their metadata.", - content: { + "responses": { + "200": { + "description": "List of designs with their metadata.", + "content": { "application/json": { - schema: { - type: "array", - items: { - $ref: "#/components/schemas/Design", - }, - }, - }, - }, - }, - 400: { - description: "Bad request.", - content: { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Design" + } + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 403: { - description: "Forbidden.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 422: { - description: "Validation error.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation error.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/designer/design/{job_id}": { - get: { - tags: ["design"], - summary: "Get sequence optimization design metadata", - description: - "Get design job metadata.\n\nThis endpoint will be used after a successful POST request.", - operationId: "getDesign", - parameters: [ + "get": { + "tags": [ + "design" + ], + "summary": "Get sequence optimization design metadata", + "description": "Get design job metadata.\n\nThis endpoint will be used after a successful POST request.", + "operationId": "getDesign", + "parameters": [ { - required: true, - schema: { - title: "Design Job ID", - description: "ID of design job whose metadata to fetch.", - type: "string", - format: "uuid", - }, - name: "job_id", - in: "path", - }, + "required": true, + "schema": { + "title": "Design Job ID", + "description": "ID of design job whose metadata to fetch.", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } ], - responses: { - 200: { - description: "Design metadata.", - content: { + "responses": { + "200": { + "description": "Design metadata.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Design", - }, - }, - }, - }, - 400: { - description: "Bad request.", - content: { + "schema": { + "$ref": "#/components/schemas/Design" + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 403: { - description: "Forbidden.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 422: { - description: "Validation error.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation error.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/designer/design/{job_id}/results": { - get: { - tags: ["design"], - summary: "Get sequence optimization design results", - description: - "Get design job with results if available.\n\nThis endpoint will be used after a successful POST request.", - operationId: "getDesignResults", - parameters: [ + "get": { + "tags": [ + "design" + ], + "summary": "Get sequence optimization design results", + "description": "Get design job with results if available.\n\nThis endpoint will be used after a successful POST request.", + "operationId": "getDesignResults", + "parameters": [ { - required: true, - schema: { - title: "Design Job ID", - description: "ID of design job whose result to fetch.", - type: "string", - format: "uuid", + "required": true, + "schema": { + "title": "Design Job ID", + "description": "ID of design job whose result to fetch.", + "type": "string", + "format": "uuid" }, - name: "job_id", - in: "path", + "name": "job_id", + "in": "path" }, { - required: false, - schema: { - title: "Step", - description: "Design step number of the results to return.", - minimum: -1, - type: "integer", - default: null, - nullable: true, - }, - name: "step", - in: "query", - }, + "required": false, + "schema": { + "title": "Step", + "description": "Design step number of the results to return.", + "minimum": -1, + "type": "integer", + "default": null, + "nullable": true + }, + "name": "step", + "in": "query" + } ], - responses: { - 200: { - description: "Design results.", - content: { + "responses": { + "200": { + "description": "Design results.", + "content": { "text/csv": { - schema: { - type: "string", - format: "binary", - example: - "step,sample_index,sequence,score1,score2,...\n0,0,ABC,0.123,0.456,...\n", - }, - }, - }, - }, - 400: { - description: "Bad request.", - content: { + "schema": { + "type": "string", + "format": "binary", + "example": "step,sample_index,sequence,score1,score2,...\n0,0,ABC,0.123,0.456,...\n" + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 403: { - description: "Forbidden.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 422: { - description: "Validation error.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation error.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/designer/design/n_successes": { - post: { - tags: ["design"], - summary: "Calculate N Successes", - description: - "Compute the number of expected successes for designs based on Gaussian predictions.\n\nThis function is used compute the histogram of the number of successes expected for\nthe designed library performance. It expects that given `N` sequences in the library,\nand each `N` sequence has `M` associated means and std devs, one for each of the `M`\npredicted properties.\n\nIt works by created `N x M` normal distributions, and sampling `k` times, yielding\n`k x N x M` predicted properties. Each of the `k` sample trials are then checked, to see\nfor each of the `N` sequences, how many passed all `M` criteria.\n\n`k`: Large number of samples to form the histogram. Trade-off speed for correctness.\n\n`N`: Number of sequences in library.\n\n`M`: Number of criteria.", - operationId: "calculateNSuccesses", - requestBody: { - content: { + "post": { + "tags": [ + "design" + ], + "summary": "Calculate N Successes", + "description": "Compute the number of expected successes for designs based on Gaussian predictions.\n\nThis function is used compute the histogram of the number of successes expected for\nthe designed library performance. It expects that given `N` sequences in the library,\nand each `N` sequence has `M` associated means and std devs, one for each of the `M`\npredicted properties.\n\nIt works by created `N x M` normal distributions, and sampling `k` times, yielding\n`k x N x M` predicted properties. Each of the `k` sample trials are then checked, to see\nfor each of the `N` sequences, how many passed all `M` criteria.\n\n`k`: Large number of samples to form the histogram. Trade-off speed for correctness.\n\n`N`: Number of sequences in library.\n\n`M`: Number of criteria.", + "operationId": "calculateNSuccesses", + "requestBody": { + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/NSuccessRequest", - }, - }, + "schema": { + "$ref": "#/components/schemas/NSuccessRequest" + } + } }, - required: true, + "required": true }, - responses: { - 200: { - description: "Successful Response", - content: { + "responses": { + "200": { + "description": "Successful Response", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/NSuccess", - }, - }, - }, - }, - 400: { - description: "Bad request.", - content: { + "schema": { + "$ref": "#/components/schemas/NSuccess" + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 403: { - description: "Forbidden.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 422: { - description: "Validation error.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation error.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/design/models/rfdiffusion": { - post: { - tags: ["structure generation"], - summary: "Design structures using RFdiffusion", - description: - "Create an RFdiffusion structure design job.\n\nCan be used for motif scaffolding, binder design, symmetric structure generation, etc. Also exposes RFpeptides using the cyclic and cyc_chain flags as explained in the RFdiffusion documentation.\n\nNote that RFdiffusion creates structures only without sequences (all residues set to G). Your workflow should include using inverse-folding, e.g. using PoET-2 with a query. View our full documentation for an example tutorial.", - operationId: "designRFdiffusion", - requestBody: { - description: - "Request to design new structures.\n\nCreates a pending job to design new structures using RFdiffusion.", - content: { + "post": { + "tags": [ + "structure generation" + ], + "summary": "Design structures using RFdiffusion", + "description": "Create an RFdiffusion structure design job.\n\nCan be used for motif scaffolding, binder design, symmetric structure generation, etc. Also exposes RFpeptides using the cyclic and cyc_chain flags as explained in the RFdiffusion documentation.\n\nNote that RFdiffusion creates structures only without sequences (all residues set to G). Your workflow should include using inverse-folding, e.g. using PoET-2 with a query. View our full documentation for an example tutorial.", + "operationId": "designRFdiffusion", + "requestBody": { + "description": "Request to design new structures.\n\nCreates a pending job to design new structures using RFdiffusion.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/DesignRequestRFdiffusion", - }, - }, + "schema": { + "$ref": "#/components/schemas/DesignRequestRFdiffusion" + } + } }, - required: true, + "required": true }, - responses: { - 202: { - description: "Design job created and pending.", - content: { + "responses": { + "202": { + "description": "Design job created and pending.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Job", - }, - }, - }, - }, - 400: { - description: "Bad request.", - content: { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 403: { - description: "Forbidden.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 422: { - description: "Validation error.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation error.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/design/models/boltzgen": { - post: { - tags: ["structure generation"], - summary: "Design structures using BoltzGen", - description: - "Create a BoltzGen structure design job.\n\nBoltzGen is a diffusion-based model for protein structure and sequence design. It supports:\n- Unconditional protein design\n- Motif scaffolding\n- Binder design\n- Protein-ligand complex design\n- Multi-chain assemblies\n- Cyclic peptides\n- Structure-guided design with secondary structure and binding constraints", - operationId: "designBoltzGen", - requestBody: { - description: - "Request to design new structures.\n\nCreates a pending job to design new structures using BoltzGen.", - content: { + "post": { + "tags": [ + "structure generation" + ], + "summary": "Design structures using BoltzGen", + "description": "Create a BoltzGen structure design job.\n\nBoltzGen is a diffusion-based model for protein structure and sequence design. It supports:\n- Unconditional protein design\n- Motif scaffolding\n- Binder design\n- Protein-ligand complex design\n- Multi-chain assemblies\n- Cyclic peptides\n- Structure-guided design with secondary structure and binding constraints", + "operationId": "designBoltzGen", + "requestBody": { + "description": "Request to design new structures.\n\nCreates a pending job to design new structures using BoltzGen.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/DesignRequestBoltzGen", - }, - }, + "schema": { + "$ref": "#/components/schemas/DesignRequestBoltzGen" + } + } }, - required: true, + "required": true }, - responses: { - 202: { - description: "Design job created and pending.", - content: { + "responses": { + "202": { + "description": "Design job created and pending.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Job", - }, - }, - }, - }, - 400: { - description: "Bad request.", - content: { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 403: { - description: "Forbidden.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 422: { - description: "Validation error.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation error.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/design/{job_id}": { - get: { - tags: ["structure generation"], - summary: "Get structure generate request metadata", - description: "Get metadata about structure generate request.\n", - parameters: [ + "get": { + "tags": [ + "structure generation" + ], + "summary": "Get structure generate request metadata", + "description": "Get metadata about structure generate request.\n", + "parameters": [ { - name: "job_id", - in: "path", - description: "Job ID of design request", - required: true, - schema: { - type: "string", - format: "uuid", - }, - }, + "name": "job_id", + "in": "path", + "description": "Job ID of design request", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - responses: { - 200: { - description: "Structure generate metadata successfully returned.", - content: { + "responses": { + "200": { + "description": "Structure generate metadata successfully returned.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/StructureGenerate", - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { + "schema": { + "$ref": "#/components/schemas/StructureGenerate" + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Design job not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Design job not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/design/{job_id}/results": { - get: { - tags: ["structure generation"], - summary: "Retrieve structure generation result", - description: "Get designed structure for a submitted design sequence", - parameters: [ + "get": { + "tags": [ + "structure generation" + ], + "summary": "Retrieve structure generation result", + "description": "Get designed structure for a submitted design sequence", + "parameters": [ { - name: "job_id", - in: "path", - description: "Job ID to fetch", - required: true, - schema: { - type: "string", - format: "uuid", - }, + "name": "job_id", + "in": "path", + "description": "Job ID to fetch", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } }, { - name: "replicate", - in: "query", - description: - "Replicate index out of the `N` requested designs. Defaults to the first design.\n", - required: false, - schema: { - type: "integer", - default: 0, - }, + "name": "replicate", + "in": "query", + "description": "Replicate index out of the `N` requested designs. Defaults to the first design.\n", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } }, { - name: "format", - in: "query", - description: - "Output format to retrieve the result in.\n\nDefaults to `pdb`. Note that requested format may not be supported for all jobs depending on when the job was created.\n", - required: false, - schema: { - $ref: "#/components/schemas/OutputFormat", - }, - }, + "name": "format", + "in": "query", + "description": "Output format to retrieve the result in.\n\nDefaults to `pdb`. Note that requested format may not be supported for all jobs depending on when the job was created.\n", + "required": false, + "schema": { + "$ref": "#/components/schemas/OutputFormat" + } + } ], - responses: { - 200: { - description: "Result encoded in requested format.", - content: { + "responses": { + "200": { + "description": "Result encoded in requested format.", + "content": { "chemical/x-mmcif": { - schema: { - $ref: "#/components/schemas/CIFOutput", - }, + "schema": { + "$ref": "#/components/schemas/CIFOutput" + } }, "chemical/x-pdb": { - schema: { - $ref: "#/components/schemas/PDBOutput", - }, - }, - }, - }, - 400: { - description: - "Result retrieval error. Contact support for assistance if persistent.", - content: { + "schema": { + "$ref": "#/components/schemas/PDBOutput" + } + } + } + }, + "400": { + "description": "Result retrieval error. Contact support for assistance if persistent.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Fold job not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Fold job not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, - }, + "oauth2": [] + } + ] + } + } }, - components: { - securitySchemes: { - oauth2: { - type: "oauth2", - flows: { - password: { - tokenUrl: "/api/v1/auth/login", - scopes: {}, - }, - }, - }, + "components": { + "securitySchemes": { + "oauth2": { + "type": "oauth2", + "flows": { + "password": { + "tokenUrl": "/api/v1/auth/login", + "scopes": {} + } + } + } }, - schemas: { - ModelCriterion: { - title: "ModelCriterion", - description: "Criteria for design model.", - required: [ + "schemas": { + "ModelCriterion": { + "title": "ModelCriterion", + "description": "Criteria for design model.", + "required": [ "criterion_type", "measurement_name", "criterion", - "model_id", + "model_id" ], - type: "object", - properties: { - criterion_type: { - title: "Criterion Type", - description: "Type of criterion.", - type: "string", - }, - measurement_name: { - title: "Measurement Name", - description: "Name of measurement for objective.", - type: "string", - }, - criterion: { - title: "Criterion for Model", - description: - "Criterion for a model-based objective with a target, direction and weight.", - required: ["target", "direction"], - type: "object", - properties: { - target: { - title: "Target", - description: "Target objective.", - type: "number", - }, - direction: { - title: "Direction", - description: - "Direction of objective describing the inequality.", - enum: [">", "<", "="], - type: "string", - }, - weight: { - title: "Weight", - description: "Weight of objective.", - type: "number", - default: 1, - }, - }, - }, - model_id: { - title: "ModelID", - description: "Model ID to use for computing objective scores.", - type: "string", - }, - }, + "type": "object", + "properties": { + "criterion_type": { + "title": "Criterion Type", + "description": "Type of criterion.", + "type": "string" + }, + "measurement_name": { + "title": "Measurement Name", + "description": "Name of measurement for objective.", + "type": "string" + }, + "criterion": { + "title": "Criterion for Model", + "description": "Criterion for a model-based objective with a target, direction and weight.", + "required": [ + "target", + "direction" + ], + "type": "object", + "properties": { + "target": { + "title": "Target", + "description": "Target objective.", + "type": "number" + }, + "direction": { + "title": "Direction", + "description": "Direction of objective describing the inequality.", + "enum": [ + ">", + "<", + "=" + ], + "type": "string" + }, + "weight": { + "title": "Weight", + "description": "Weight of objective.", + "type": "number", + "default": 1 + } + } + }, + "model_id": { + "title": "ModelID", + "description": "Model ID to use for computing objective scores.", + "type": "string" + } + } }, - Sequence: { - title: "Sequence", - description: "Protein sequence", - type: "string", - example: "MSKGEELFTGV", + "Sequence": { + "title": "Sequence", + "description": "Protein sequence", + "type": "string", + "example": "MSKGEELFTGV" }, - NMutationsCriterion: { - title: "NMutationsCriterion", - description: "Criteria for design based on mutations.", - required: ["criterion_type"], - type: "object", - properties: { - criterion_type: { - title: "Criterion Type", - description: "Type of criterion.", - type: "string", - }, - sequences: { - title: "Sequences", - description: - "Sequences to use as reference for calculating the number of mutations.", - type: "array", - items: { - $ref: "#/components/schemas/Sequence", - }, - }, - }, + "NMutationsCriterion": { + "title": "NMutationsCriterion", + "description": "Criteria for design based on mutations.", + "required": [ + "criterion_type" + ], + "type": "object", + "properties": { + "criterion_type": { + "title": "Criterion Type", + "description": "Type of criterion.", + "type": "string" + }, + "sequences": { + "title": "Sequences", + "description": "Sequences to use as reference for calculating the number of mutations.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Sequence" + } + } + } }, - DesignParams: { - title: "DesignParams", - description: "Parameters for requesting design of new variants.", - required: ["criteria", "num_steps", "assay_id"], - type: "object", - properties: { - num_steps: { - title: "Number of Steps", - description: "Number of steps to run the algorithm for.", - minimum: 1, - type: "integer", - example: 25, - "x-order": 10, - }, - assay_id: { - title: "Assay ID", - description: "Assay ID to use as a starting point.", - type: "string", - format: "uuid", - "x-order": 11, - }, - criteria: { - title: "Criteria", - description: - "List of criterion, within which is a list of same-typed of subcriterion.", - type: "array", - items: { - title: "Subcriteria", - description: - "List of subcriterion, each of which must be the same type.", - type: "array", - items: { - title: "Subcriterion", - description: - "Actual criterion that can be evaluated as a score/objective to optimize.", - oneOf: [ + "DesignParams": { + "title": "DesignParams", + "description": "Parameters for requesting design of new variants.", + "required": [ + "criteria", + "num_steps", + "assay_id" + ], + "type": "object", + "properties": { + "num_steps": { + "title": "Number of Steps", + "description": "Number of steps to run the algorithm for.", + "minimum": 1, + "type": "integer", + "example": 25, + "x-order": 10 + }, + "assay_id": { + "title": "Assay ID", + "description": "Assay ID to use as a starting point.", + "type": "string", + "format": "uuid", + "x-order": 11 + }, + "criteria": { + "title": "Criteria", + "description": "List of criterion, within which is a list of same-typed of subcriterion.", + "type": "array", + "items": { + "title": "Subcriteria", + "description": "List of subcriterion, each of which must be the same type.", + "type": "array", + "items": { + "title": "Subcriterion", + "description": "Actual criterion that can be evaluated as a score/objective to optimize.", + "oneOf": [ { - $ref: "#/components/schemas/ModelCriterion", + "$ref": "#/components/schemas/ModelCriterion" }, { - $ref: "#/components/schemas/NMutationsCriterion", - }, + "$ref": "#/components/schemas/NMutationsCriterion" + } ], - discriminator: { - propertyName: "criterion_type", - mapping: { - model: "#/components/schemas/ModelCriterion", - n_mutations: "#/components/schemas/NMutationsCriterion", - }, - }, - }, + "discriminator": { + "propertyName": "criterion_type", + "mapping": { + "model": "#/components/schemas/ModelCriterion", + "n_mutations": "#/components/schemas/NMutationsCriterion" + } + } + } }, "x-order": 12, - example: [ + "example": [ [ { - criterion_type: "model", - model_id: "ec0364fd-83ff-4f26-bc17-eb0bd8cfcae5", - measurement_name: "activity", - criterion: { - target: 0, - weight: 0.5, - direction: ">", - }, - }, - ], - ], - }, - allowed_tokens: { - title: "Allowed Tokens", - description: "Hash map of position to allowed tokens.", - type: "object", - additionalProperties: { - type: "array", - items: { - type: "string", - description: "Allowed tokens in this position.", - example: ["A", "C", "M"], - }, + "criterion_type": "model", + "model_id": "ec0364fd-83ff-4f26-bc17-eb0bd8cfcae5", + "measurement_name": "activity", + "criterion": { + "target": 0, + "weight": 0.5, + "direction": ">" + } + } + ] + ] + }, + "allowed_tokens": { + "title": "Allowed Tokens", + "description": "Hash map of position to allowed tokens.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "description": "Allowed tokens in this position.", + "example": [ + "A", + "C", + "M" + ] + } }, "x-order": 13, - example: { - 1: ["M", "W", "A"], - 104: ["C"], - 131: ["C"], - }, - }, - pop_size: { - title: "Population Size", - description: - "Size of population or number of candidates to explore per step.", - type: "integer", - nullable: true, - default: 256, - example: 256, - "x-order": 101, - }, - }, + "example": { + "1": [ + "M", + "W", + "A" + ], + "104": [ + "C" + ], + "131": [ + "C" + ] + } + }, + "pop_size": { + "title": "Population Size", + "description": "Size of population or number of candidates to explore per step.", + "type": "integer", + "nullable": true, + "default": 256, + "example": 256, + "x-order": 101 + } + } }, - GeneticAlgorithmParams: { - title: "GeneticAlgorithmParams", - description: "Parameters for running genetic-algorithm.", - type: "object", - properties: { - n_offsprings: { - title: "Number of Offsprings", - description: "Number of offsprings in genetic algorithm.", - type: "integer", - default: 5120, - example: 5120, - "x-order": 101, - }, - crossover_prob: { - title: "Crossover Probability", - description: "Crossover probability in genetic algorithm.", - type: "number", - default: 1, - example: 1, - "x-order": 102, - }, - crossover_prob_pointwise: { - title: "Crossover Probability Pointwise", - description: - "Pointwise crossover probability in genetic algorithm.", - type: "number", - default: 0.2, - example: 0.2, - "x-order": 103, - }, - mutation_average_mutations_per_seq: { - title: "Average Mutations", - description: "Targeted average mutations per seuqnces", - type: "integer", - default: 1, - example: 1, - "x-order": 104, - }, - }, + "GeneticAlgorithmParams": { + "title": "GeneticAlgorithmParams", + "description": "Parameters for running genetic-algorithm.", + "type": "object", + "properties": { + "n_offsprings": { + "title": "Number of Offsprings", + "description": "Number of offsprings in genetic algorithm.", + "type": "integer", + "default": 5120, + "example": 5120, + "x-order": 101 + }, + "crossover_prob": { + "title": "Crossover Probability", + "description": "Crossover probability in genetic algorithm.", + "type": "number", + "default": 1, + "example": 1, + "x-order": 102 + }, + "crossover_prob_pointwise": { + "title": "Crossover Probability Pointwise", + "description": "Pointwise crossover probability in genetic algorithm.", + "type": "number", + "default": 0.2, + "example": 0.2, + "x-order": 103 + }, + "mutation_average_mutations_per_seq": { + "title": "Average Mutations", + "description": "Targeted average mutations per seuqnces", + "type": "integer", + "default": 1, + "example": 1, + "x-order": 104 + } + } }, - DesignRequestGA: { - title: "DesignRequestGeneticAlgorithm", - description: "Request to design new variants using genetic algorithm.", - allOf: [ + "DesignRequestGA": { + "title": "DesignRequestGeneticAlgorithm", + "description": "Request to design new variants using genetic algorithm.", + "allOf": [ { - $ref: "#/components/schemas/DesignParams", + "$ref": "#/components/schemas/DesignParams" }, { - $ref: "#/components/schemas/GeneticAlgorithmParams", - }, - ], + "$ref": "#/components/schemas/GeneticAlgorithmParams" + } + ] }, - JobID: { - title: "JobID", - description: "ID of job.", - type: "string", - format: "uuid", - "x-order": 1, + "JobID": { + "title": "JobID", + "description": "ID of job.", + "type": "string", + "format": "uuid", + "x-order": 1 }, - CreatedDate: { - title: "Created Date", - description: "Datetime of created object", - type: "string", - format: "date-time", - example: "2024-01-01T12:34:56.789Z", - "x-order": 4, + "CreatedDate": { + "title": "Created Date", + "description": "Datetime of created object", + "type": "string", + "format": "date-time", + "example": "2024-01-01T12:34:56.789Z", + "x-order": 4 }, - JobStatus: { - title: "JobStatus", - description: "Status of job.", - type: "string", - enum: ["PENDING", "RUNNING", "SUCCESS", "FAILURE"], - "x-order": 7, + "JobStatus": { + "title": "JobStatus", + "description": "Status of job.", + "type": "string", + "enum": [ + "PENDING", + "RUNNING", + "SUCCESS", + "FAILURE" + ], + "x-order": 7 }, - Request: { - title: "Request", - description: "Request for our compute platform.", - type: "object", - required: [ + "Request": { + "title": "Request", + "description": "Request for our compute platform.", + "type": "object", + "required": [ "job_id", "prerequisite_job_id", "created_date", "start_date", "end_date", "status", - "progress_counter", + "progress_counter" ], - properties: { - job_id: { - $ref: "#/components/schemas/JobID", - }, - prerequisite_job_id: { - title: "PrerequisiteJobID", - description: "Prerequisite job ID.", - type: "string", - format: "uuid", - nullable: true, - default: null, - example: null, - "x-order": 2, - }, - created_date: { - $ref: "#/components/schemas/CreatedDate", - }, - start_date: { - title: "StartDate", - description: "Start date of job.", - type: "string", - format: "date-time", - nullable: true, - example: null, - default: null, - "x-order": 5, - }, - end_date: { - title: "EndDate", - description: "End date of job.", - type: "string", - format: "date-time", - nullable: true, - example: null, - default: null, - "x-order": 6, - }, - status: { - $ref: "#/components/schemas/JobStatus", - }, - progress_counter: { - title: "ProgressCounter", - description: "Counter of the progress of job from 0 to 100.", - type: "integer", - minimum: 0, - maximum: 100, - example: 0, - default: 0, - "x-order": 8, - }, - }, + "properties": { + "job_id": { + "$ref": "#/components/schemas/JobID" + }, + "prerequisite_job_id": { + "title": "PrerequisiteJobID", + "description": "Prerequisite job ID.", + "type": "string", + "format": "uuid", + "nullable": true, + "default": null, + "example": null, + "x-order": 2 + }, + "created_date": { + "$ref": "#/components/schemas/CreatedDate" + }, + "start_date": { + "title": "StartDate", + "description": "Start date of job.", + "type": "string", + "format": "date-time", + "nullable": true, + "example": null, + "default": null, + "x-order": 5 + }, + "end_date": { + "title": "EndDate", + "description": "End date of job.", + "type": "string", + "format": "date-time", + "nullable": true, + "example": null, + "default": null, + "x-order": 6 + }, + "status": { + "$ref": "#/components/schemas/JobStatus" + }, + "progress_counter": { + "title": "ProgressCounter", + "description": "Counter of the progress of job from 0 to 100.", + "type": "integer", + "minimum": 0, + "maximum": 100, + "example": 0, + "default": 0, + "x-order": 8 + } + } }, - JobType: { - title: "JobType", - description: "Type of job.", - type: "string", - enum: [ + "JobType": { + "title": "JobType", + "description": "Type of job.", + "type": "string", + "enum": [ "/workflow/preprocess", "/workflow/train", "/workflow/embed/umap", @@ -1272,58 +1298,64 @@ const designSpec = { "/predictor/predict_multi", "/predictor/crossvalidate", "/clustering/hierarchical", - "/design", + "/design" ], - "x-order": 3, + "x-order": 3 }, - Job: { - title: "Job", - description: "Job represents a job for our compute platform.", - allOf: [ + "Job": { + "title": "Job", + "description": "Job represents a job for our compute platform.", + "allOf": [ { - $ref: "#/components/schemas/Request", + "$ref": "#/components/schemas/Request" }, { - type: "object", - required: ["job_type"], - properties: { - job_type: { - $ref: "#/components/schemas/JobType", - }, - }, - }, - ], + "type": "object", + "required": [ + "job_type" + ], + "properties": { + "job_type": { + "$ref": "#/components/schemas/JobType" + } + } + } + ] }, - Error: { - title: "Error", - description: "A error object providing details of the error.", - required: ["detail"], - type: "object", - properties: { - detail: { - title: "Detail", - type: "string", - }, - }, + "Error": { + "title": "Error", + "description": "A error object providing details of the error.", + "required": [ + "detail" + ], + "type": "object", + "properties": { + "detail": { + "title": "Detail", + "type": "string" + } + } }, - DesignContinueRequest: { - title: "DesignContinueRequest", - description: "Request to continue a design job.", - required: ["num_steps"], - type: "object", - properties: { - num_steps: { - title: "Number of steps", - minimum: 1, - type: "integer", - }, - }, + "DesignContinueRequest": { + "title": "DesignContinueRequest", + "description": "Request to continue a design job.", + "required": [ + "num_steps" + ], + "type": "object", + "properties": { + "num_steps": { + "title": "Number of steps", + "minimum": 1, + "type": "integer" + } + } }, - DesignMetadata: { - title: "DesignMetadata", - description: "Metadata of existing design.", - type: "object", - required: [ + "DesignMetadata": { + "title": "DesignMetadata", + "description": "Metadata of existing design.", + "type": "object", + "required": [ "id", "status", "current_step", @@ -1331,1216 +1363,1276 @@ const designSpec = { "progress_counter", "created_date", "algorithm", - "num_rows", + "num_rows" ], - properties: { - id: { - title: "ID", - description: "ID of design.", - type: "string", - format: "uuid", - "x-order": 0, - }, - status: { - $ref: "#/components/schemas/JobStatus", - }, - current_step: { - title: "Current Step", - description: "Current step in the algorithm", - type: "integer", - }, - terminated: { - title: "Terminated", - description: "Whether the algorithm was terminated early.", - type: "boolean", - }, - progress_counter: { - title: "Progress Counter", - description: "Counter of the progress of job from 0 to 100.", - type: "integer", - minimum: 0, - maximum: 100, - example: 0, - default: 0, - }, - created_date: { - $ref: "#/components/schemas/CreatedDate", - }, - algorithm: { - title: "Algorithm", - description: "Design algorithm used.", - type: "string", - }, - num_rows: { - title: "Number of Rows", - description: "Number of rows in output of design result.", - type: "integer", - }, - }, + "properties": { + "id": { + "title": "ID", + "description": "ID of design.", + "type": "string", + "format": "uuid", + "x-order": 0 + }, + "status": { + "$ref": "#/components/schemas/JobStatus" + }, + "current_step": { + "title": "Current Step", + "description": "Current step in the algorithm", + "type": "integer" + }, + "terminated": { + "title": "Terminated", + "description": "Whether the algorithm was terminated early.", + "type": "boolean" + }, + "progress_counter": { + "title": "Progress Counter", + "description": "Counter of the progress of job from 0 to 100.", + "type": "integer", + "minimum": 0, + "maximum": 100, + "example": 0, + "default": 0 + }, + "created_date": { + "$ref": "#/components/schemas/CreatedDate" + }, + "algorithm": { + "title": "Algorithm", + "description": "Design algorithm used.", + "type": "string" + }, + "num_rows": { + "title": "Number of Rows", + "description": "Number of rows in output of design result.", + "type": "integer" + } + } }, - Design: { - title: "Design", - description: - "Design with metadata of request and results if succeeded.", - allOf: [ + "Design": { + "title": "Design", + "description": "Design with metadata of request and results if succeeded.", + "allOf": [ { - $ref: "#/components/schemas/DesignMetadata", + "$ref": "#/components/schemas/DesignMetadata" }, { - $ref: "#/components/schemas/DesignParams", + "$ref": "#/components/schemas/DesignParams" }, { - oneOf: [ + "oneOf": [ { - $ref: "#/components/schemas/GeneticAlgorithmParams", - "x-order": 1000, - }, - ], - }, + "$ref": "#/components/schemas/GeneticAlgorithmParams", + "x-order": 1000 + } + ] + } ], - example: { - id: "15cde424-04fc-4bce-88ea-4c2eae225d47", - status: "PENDING", - progress_counter: 0, - created_date: "2024-10-30T18:21:08.046624Z", - algorithm: "genetic-algorithm", - num_rows: 0, - num_steps: 10, - assay_id: "99dc46be-5fb1-4771-a59a-65ec76d70765", - criteria: [ + "example": { + "id": "15cde424-04fc-4bce-88ea-4c2eae225d47", + "status": "PENDING", + "progress_counter": 0, + "created_date": "2024-10-30T18:21:08.046624Z", + "algorithm": "genetic-algorithm", + "num_rows": 0, + "num_steps": 10, + "assay_id": "99dc46be-5fb1-4771-a59a-65ec76d70765", + "criteria": [ [ { - criterion_type: "model", - measurement_name: "fitness", - criterion: { - target: 0, - direction: ">", - weight: 0.5, + "criterion_type": "model", + "measurement_name": "fitness", + "criterion": { + "target": 0, + "direction": ">", + "weight": 0.5 }, - model_id: "c887360c-fa9c-4357-97fc-ad0c3e9ca3dc", + "model_id": "c887360c-fa9c-4357-97fc-ad0c3e9ca3dc" }, { - criterion_type: "model", - measurement_name: "fitness", - criterion: { - target: 0.5, - direction: "<", - weight: 0.5, - }, - model_id: "0082d4f6-703f-4f94-b888-b1015fe798eb", - }, - ], + "criterion_type": "model", + "measurement_name": "fitness", + "criterion": { + "target": 0.5, + "direction": "<", + "weight": 0.5 + }, + "model_id": "0082d4f6-703f-4f94-b888-b1015fe798eb" + } + ] ], - allowed_tokens: { - 1: ["M", "W", "A"], - 104: ["C"], - 131: ["C"], - }, - pop_size: 1024, - n_offsprings: 256, - crossover_prob: 1, - crossover_prob_pointwise: 0.2, - mutation_average_mutations_per_seq: 1, - }, + "allowed_tokens": { + "1": [ + "M", + "W", + "A" + ], + "104": [ + "C" + ], + "131": [ + "C" + ] + }, + "pop_size": 1024, + "n_offsprings": 256, + "crossover_prob": 1, + "crossover_prob_pointwise": 0.2, + "mutation_average_mutations_per_seq": 1 + } }, - NSuccessRequest: { - title: "NSuccessRequest", - description: - "Request to calculate the number of successes expected for a design request.", - required: ["means", "stddevs", "criteria"], - type: "object", - properties: { - means: { - title: "Means", - description: "N x M array of means of predictions.", - type: "array", - items: { - type: "array", - items: { - type: "number", - }, - }, - }, - stddevs: { - title: "Standard Deviations", - description: "N x M array of stddevs of predictions.", - type: "array", - items: { - type: "array", - items: { - type: "number", - }, - }, - }, - criteria: { - title: "Criteria", - description: - "M array of model criterion, same as submitting a design job.\n", - type: "array", - items: { - $ref: "#/components/schemas/ModelCriterion", - }, - }, - k: { - title: "K", - description: - "Number of samples to draw in a Monte Carlo. Defaults to 10000.", - type: "integer", - default: 10000, - }, - }, + "NSuccessRequest": { + "title": "NSuccessRequest", + "description": "Request to calculate the number of successes expected for a design request.", + "required": [ + "means", + "stddevs", + "criteria" + ], + "type": "object", + "properties": { + "means": { + "title": "Means", + "description": "N x M array of means of predictions.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "stddevs": { + "title": "Standard Deviations", + "description": "N x M array of stddevs of predictions.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "criteria": { + "title": "Criteria", + "description": "M array of model criterion, same as submitting a design job.\n", + "type": "array", + "items": { + "$ref": "#/components/schemas/ModelCriterion" + } + }, + "k": { + "title": "K", + "description": "Number of samples to draw in a Monte Carlo. Defaults to 10000.", + "type": "integer", + "default": 10000 + } + } }, - NSuccess: { - title: "NSuccess", - description: - "Number of successes expected for a design job, as a histogram.", - required: ["histogram", "mean", "stddev", "percentile"], - type: "object", - properties: { - histogram: { - title: "Histogram", - description: "N array of probability of success.", - type: "array", - items: { - type: "number", - }, - }, - mean: { - title: "Mean", - description: "Mean of the output histogram.", - type: "number", - }, - stddev: { - title: "Standrd Deviation", - description: "Standard deviation of output histogram.", - type: "number", - }, - percentile: { - title: "Percentile", - description: "Dictionary of percentiles of the histogram.", - type: "object", - additionalProperties: { - type: "integer", - }, - }, - }, + "NSuccess": { + "title": "NSuccess", + "description": "Number of successes expected for a design job, as a histogram.", + "required": [ + "histogram", + "mean", + "stddev", + "percentile" + ], + "type": "object", + "properties": { + "histogram": { + "title": "Histogram", + "description": "N array of probability of success.", + "type": "array", + "items": { + "type": "number" + } + }, + "mean": { + "title": "Mean", + "description": "Mean of the output histogram.", + "type": "number" + }, + "stddev": { + "title": "Standrd Deviation", + "description": "Standard deviation of output histogram.", + "type": "number" + }, + "percentile": { + "title": "Percentile", + "description": "Dictionary of percentiles of the histogram.", + "type": "object", + "additionalProperties": { + "type": "integer" + } + } + } }, - DesignRequestRFdiffusion: { - title: "DesignRequestRFdiffusion", - description: - "Request to design new structures using RFdiffusion.\n\n`query_id` or `contigs` is required.\n", - type: "object", - properties: { - n: { - title: "Number of Designs", - description: - "Number of designs to generate based on given parameters.", - type: "integer", - default: 1, - example: 1, - "x-order": 101, - }, - query_id: { - title: "Query ID", - description: - "ID of query which contains the encoded design request. This design request should be a partially/fully masked structure, which will be designed by the model. Either query_id or contigs should be specified.", - type: "string", - format: "uuid", - }, - structure_text: { - title: "Structure Text", - description: "String contents of the input PDB file.", - type: "string", - nullable: true, - default: null, - example: - "ATOM 1 N ALA A 1 0.000 0.000 0.000 1.00 0.00 N\n...\n", - "x-order": 102, - }, - contigs: { - title: "Contigs", - description: - "Contigs specification for providing lengths and fixed residues.", - type: "string", - nullable: true, - default: null, - example: "100-100", - "x-order": 103, - }, - inpaint_seq: { - title: "Inpaint Sequences", - description: "Mask input residues from the input structure.", - type: "string", - nullable: true, - default: null, - example: "A1/A30-40", - "x-order": 104, - }, - provide_seq: { - title: "Provide Sequences", - description: "Fix input residues when doing partial diffusion.", - type: "string", - nullable: true, - default: null, - example: "100-119", - "x-order": 105, - }, - hotspot: { - title: "Hotspots", - description: - "Hotspot residues to indicate to the model which sites the binder should interact.", - type: "string", - nullable: true, - default: null, - example: "A30,A33,A34", - "x-order": 106, - }, - T: { - title: "Number of Iterations", - description: "Number of diffusion steps to take.", - type: "integer", - default: 50, - example: 50, - "x-order": 107, - }, - partial_T: { - title: "Number of Partial Diffusion Iterations", - description: "Number of partial diffusion steps to take.", - type: "integer", - default: 20, - example: 20, - "x-order": 108, - }, - use_active_site_model: { - title: "Use Active Site Model", - description: - "Whether or not to use the active site model, which is useful for holding very small motifs in place.", - type: "boolean", - default: false, - example: false, - "x-order": 109, - }, - use_beta_model: { - title: "Use Beta Model", - description: - "Whether or not to use the beta model, which is useful for generating more diverse topologies but possibly trading off for success rates.", - type: "boolean", - default: false, - example: false, - "x-order": 110, - }, - symmetry: { - title: "Symmetry", - description: "Type of symmetry to constrain the design to.", - type: "string", - enum: ["cyclic", "dihedral", "tetrahedral"], - nullable: true, - default: null, - "x-order": 111, - }, - order: { - title: "Symmetry Order", - description: - "The order of symmetry the design should have, in the case of cyclic and dihedral.", - type: "integer", - nullable: true, - default: null, - "x-order": 112, - }, - add_potential: { - title: "Add Potential", - description: - "Whether or not to use potential when creating symmetrical designs, which has been found to be useful. If `null`, defaults to true when doing symmetrical design.", - type: "boolean", - nullable: true, - default: null, - "x-order": 113, - }, - scaffold_target_structure_text: { - title: "Scaffold Target Structure Text", - description: - "String contents of the input PDB file for scaffold guided design. This PDB is used to provide secondary structure and block adjacency information for doing fold conditioning towards the input topology.", - type: "string", - nullable: true, - default: null, - example: - "ATOM 1 N ALA A 1 0.000 0.000 0.000 1.00 0.00 N\n...\n", - "x-order": 114, - }, - scaffold_target_use_struct: { - title: "Scaffold Target Use Structure", - description: - "Whether or not to use the input scaffold structure PDB as a target for scaffold guided binder design.", - type: "boolean", - default: false, - example: false, - "x-order": 115, - }, - }, - examples: { - query: { - n: 1, - query_id: "afc17865-5c97-4b22-9c37-cdf3985e06bb", - }, - unconditional: { - n: 3, - contigs: "100-100", - }, - motif_scaffolding: { - contigs: "10-40/A163-181/10-40", - structure_text: "...", - }, + "DesignRequestRFdiffusion": { + "title": "DesignRequestRFdiffusion", + "description": "Request to design new structures using RFdiffusion.\n\n`query_id` or `contigs` is required.\n", + "type": "object", + "properties": { + "n": { + "title": "Number of Designs", + "description": "Number of designs to generate based on given parameters.", + "type": "integer", + "default": 1, + "example": 1, + "x-order": 101 + }, + "query_id": { + "title": "Query ID", + "description": "ID of query which contains the encoded design request. This design request should be a partially/fully masked structure, which will be designed by the model. Either query_id or contigs should be specified.", + "type": "string", + "format": "uuid" + }, + "structure_text": { + "title": "Structure Text", + "description": "String contents of the input PDB file.", + "type": "string", + "nullable": true, + "default": null, + "example": "ATOM 1 N ALA A 1 0.000 0.000 0.000 1.00 0.00 N\n...\n", + "x-order": 102 + }, + "contigs": { + "title": "Contigs", + "description": "Contigs specification for providing lengths and fixed residues.", + "type": "string", + "nullable": true, + "default": null, + "example": "100-100", + "x-order": 103 + }, + "inpaint_seq": { + "title": "Inpaint Sequences", + "description": "Mask input residues from the input structure.", + "type": "string", + "nullable": true, + "default": null, + "example": "A1/A30-40", + "x-order": 104 + }, + "provide_seq": { + "title": "Provide Sequences", + "description": "Fix input residues when doing partial diffusion.", + "type": "string", + "nullable": true, + "default": null, + "example": "100-119", + "x-order": 105 + }, + "hotspot": { + "title": "Hotspots", + "description": "Hotspot residues to indicate to the model which sites the binder should interact.", + "type": "string", + "nullable": true, + "default": null, + "example": "A30,A33,A34", + "x-order": 106 + }, + "T": { + "title": "Number of Iterations", + "description": "Number of diffusion steps to take.", + "type": "integer", + "default": 50, + "example": 50, + "x-order": 107 + }, + "partial_T": { + "title": "Number of Partial Diffusion Iterations", + "description": "Number of partial diffusion steps to take.", + "type": "integer", + "default": 20, + "example": 20, + "x-order": 108 + }, + "use_active_site_model": { + "title": "Use Active Site Model", + "description": "Whether or not to use the active site model, which is useful for holding very small motifs in place.", + "type": "boolean", + "default": false, + "example": false, + "x-order": 109 + }, + "use_beta_model": { + "title": "Use Beta Model", + "description": "Whether or not to use the beta model, which is useful for generating more diverse topologies but possibly trading off for success rates.", + "type": "boolean", + "default": false, + "example": false, + "x-order": 110 + }, + "symmetry": { + "title": "Symmetry", + "description": "Type of symmetry to constrain the design to.", + "type": "string", + "enum": [ + "cyclic", + "dihedral", + "tetrahedral" + ], + "nullable": true, + "default": null, + "x-order": 111 + }, + "order": { + "title": "Symmetry Order", + "description": "The order of symmetry the design should have, in the case of cyclic and dihedral.", + "type": "integer", + "nullable": true, + "default": null, + "x-order": 112 + }, + "add_potential": { + "title": "Add Potential", + "description": "Whether or not to use potential when creating symmetrical designs, which has been found to be useful. If `null`, defaults to true when doing symmetrical design.", + "type": "boolean", + "nullable": true, + "default": null, + "x-order": 113 + }, + "scaffold_target_structure_text": { + "title": "Scaffold Target Structure Text", + "description": "String contents of the input PDB file for scaffold guided design. This PDB is used to provide secondary structure and block adjacency information for doing fold conditioning towards the input topology.", + "type": "string", + "nullable": true, + "default": null, + "example": "ATOM 1 N ALA A 1 0.000 0.000 0.000 1.00 0.00 N\n...\n", + "x-order": 114 + }, + "scaffold_target_use_struct": { + "title": "Scaffold Target Use Structure", + "description": "Whether or not to use the input scaffold structure PDB as a target for scaffold guided binder design.", + "type": "boolean", + "default": false, + "example": false, + "x-order": 115 + } }, - example: { - n: 1, - query_id: "afc17865-5c97-4b22-9c37-cdf3985e06bb", + "examples": { + "query": { + "n": 1, + "query_id": "afc17865-5c97-4b22-9c37-cdf3985e06bb" + }, + "unconditional": { + "n": 3, + "contigs": "100-100" + }, + "motif_scaffolding": { + "contigs": "10-40/A163-181/10-40", + "structure_text": "..." + } }, + "example": { + "n": 1, + "query_id": "afc17865-5c97-4b22-9c37-cdf3985e06bb" + } }, - BoltzGenProteinEntity: { - title: "BoltzGenProteinEntity", - description: "Protein entity specification for BoltzGen.", - type: "object", - required: ["id", "sequence"], - properties: { - id: { - title: "Chain ID", - description: "Chain identifier(s) for the protein.", - oneOf: [ + "BoltzGenProteinEntity": { + "title": "BoltzGenProteinEntity", + "description": "Protein entity specification for BoltzGen.", + "type": "object", + "required": [ + "id", + "sequence" + ], + "properties": { + "id": { + "title": "Chain ID", + "description": "Chain identifier(s) for the protein.", + "oneOf": [ { - type: "string", + "type": "string" }, { - type: "array", - items: { - type: "string", - }, - }, + "type": "array", + "items": { + "type": "string" + } + } ], - example: "A", - }, - sequence: { - title: "Sequence", - description: - 'Protein sequence. Can include:\n- Amino acid letters (A-Z)\n- Design residues (numbers, e.g., "10" for 10 design residues)\n- Ranges (e.g., "15..20" for random number between 15-20)\n- Mixed patterns (e.g., "3..5C6C3" for variable design + fixed residues)', - type: "string", - example: "ACDEFGHIKLMNPQRSTVWY", - }, - secondary_structure: { - title: "Secondary Structure", - description: "Secondary structure specification.", - type: "string", - nullable: true, - default: null, - example: "LLLLLLLLLL", - }, - binding_types: { - title: "Binding Types", - description: - "Binding type specification. Can be:\n- String with characters: 'u' (unspecified), 'B' (binding), 'N' (not binding)\n- Object with 'binding' and/or 'not_binding' keys", - oneOf: [ + "example": "A" + }, + "sequence": { + "title": "Sequence", + "description": "Protein sequence. Can include:\n- Amino acid letters (A-Z)\n- Design residues (numbers, e.g., \"10\" for 10 design residues)\n- Ranges (e.g., \"15..20\" for random number between 15-20)\n- Mixed patterns (e.g., \"3..5C6C3\" for variable design + fixed residues)", + "type": "string", + "example": "ACDEFGHIKLMNPQRSTVWY" + }, + "secondary_structure": { + "title": "Secondary Structure", + "description": "Secondary structure specification.", + "type": "string", + "nullable": true, + "default": null, + "example": "LLLLLLLLLL" + }, + "binding_types": { + "title": "Binding Types", + "description": "Binding type specification. Can be:\n- String with characters: 'u' (unspecified), 'B' (binding), 'N' (not binding)\n- Object with 'binding' and/or 'not_binding' keys", + "oneOf": [ { - type: "string", + "type": "string" }, { - type: "object", - properties: { - binding: { - type: "string", + "type": "object", + "properties": { + "binding": { + "type": "string" }, - not_binding: { - type: "string", - }, - }, - }, + "not_binding": { + "type": "string" + } + } + } ], - nullable: true, - default: null, - example: "uuuBBBBuuu", - }, - cyclic: { - title: "Cyclic", - description: "Whether the protein is cyclic.", - type: "boolean", - default: false, - example: false, - }, - }, + "nullable": true, + "default": null, + "example": "uuuBBBBuuu" + }, + "cyclic": { + "title": "Cyclic", + "description": "Whether the protein is cyclic.", + "type": "boolean", + "default": false, + "example": false + } + } }, - BoltzGenLigandEntity: { - title: "BoltzGenLigandEntity", - description: "Ligand entity specification for BoltzGen.", - type: "object", - required: ["id"], - properties: { - id: { - title: "Chain ID", - description: "Chain identifier(s) for the ligand.", - oneOf: [ + "BoltzGenLigandEntity": { + "title": "BoltzGenLigandEntity", + "description": "Ligand entity specification for BoltzGen.", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "title": "Chain ID", + "description": "Chain identifier(s) for the ligand.", + "oneOf": [ { - type: "string", + "type": "string" }, { - type: "array", - items: { - type: "string", - }, - }, + "type": "array", + "items": { + "type": "string" + } + } ], - example: "B", - }, - ccd: { - title: "CCD Code", - description: "Chemical Component Dictionary identifier.", - type: "string", - nullable: true, - default: null, - example: "ATP", - }, - smiles: { - title: "SMILES", - description: "SMILES string representation of the ligand.", - type: "string", - nullable: true, - default: null, - example: "CC(C)CC1=CC=C(C=C1)C(C)C(=O)O", - }, - binding_types: { - title: "Binding Types", - description: - "Binding type specification. Can be:\n- String with characters: 'u' (unspecified), 'B' (binding), 'N' (not binding)\n- Object with 'binding' and/or 'not_binding' keys", - oneOf: [ + "example": "B" + }, + "ccd": { + "title": "CCD Code", + "description": "Chemical Component Dictionary identifier.", + "type": "string", + "nullable": true, + "default": null, + "example": "ATP" + }, + "smiles": { + "title": "SMILES", + "description": "SMILES string representation of the ligand.", + "type": "string", + "nullable": true, + "default": null, + "example": "CC(C)CC1=CC=C(C=C1)C(C)C(=O)O" + }, + "binding_types": { + "title": "Binding Types", + "description": "Binding type specification. Can be:\n- String with characters: 'u' (unspecified), 'B' (binding), 'N' (not binding)\n- Object with 'binding' and/or 'not_binding' keys", + "oneOf": [ { - type: "string", + "type": "string" }, { - type: "object", - properties: { - binding: { - type: "string", - }, - not_binding: { - type: "string", + "type": "object", + "properties": { + "binding": { + "type": "string" }, - }, - }, + "not_binding": { + "type": "string" + } + } + } ], - nullable: true, - default: null, - }, + "nullable": true, + "default": null + } }, - oneOf: [ + "oneOf": [ { - required: ["ccd"], + "required": [ + "ccd" + ] }, { - required: ["smiles"], - }, - ], + "required": [ + "smiles" + ] + } + ] }, - BoltzGenChainInclude: { - title: "BoltzGenChainInclude", - description: "Chain inclusion specification.", - type: "object", - required: ["id"], - properties: { - id: { - title: "Chain ID", - description: "Chain identifier.", - type: "string", - example: "A", - }, - res_index: { - title: "Residue Index", - description: 'Residue index range (e.g., "10..16", "..5", "20..").', - type: "string", - nullable: true, - default: null, - example: "10..16", - }, - }, + "BoltzGenChainInclude": { + "title": "BoltzGenChainInclude", + "description": "Chain inclusion specification.", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "title": "Chain ID", + "description": "Chain identifier.", + "type": "string", + "example": "A" + }, + "res_index": { + "title": "Residue Index", + "description": "Residue index range (e.g., \"10..16\", \"..5\", \"20..\").", + "type": "string", + "nullable": true, + "default": null, + "example": "10..16" + } + } }, - BoltzGenChainIncludeProximity: { - title: "BoltzGenChainIncludeProximity", - description: "Proximity-based chain inclusion.", - type: "object", - required: ["id", "res_index", "radius"], - properties: { - id: { - title: "Chain ID", - description: "Chain identifier.", - type: "string", - example: "A", - }, - res_index: { - title: "Residue Index", - description: "Residue index range.", - type: "string", - example: "10..16", - }, - radius: { - title: "Radius", - description: "Radius in angstroms for proximity inclusion.", - type: "number", - format: "float", - example: 8, - }, - }, + "BoltzGenChainIncludeProximity": { + "title": "BoltzGenChainIncludeProximity", + "description": "Proximity-based chain inclusion.", + "type": "object", + "required": [ + "id", + "res_index", + "radius" + ], + "properties": { + "id": { + "title": "Chain ID", + "description": "Chain identifier.", + "type": "string", + "example": "A" + }, + "res_index": { + "title": "Residue Index", + "description": "Residue index range.", + "type": "string", + "example": "10..16" + }, + "radius": { + "title": "Radius", + "description": "Radius in angstroms for proximity inclusion.", + "type": "number", + "format": "float", + "example": 8 + } + } }, - BoltzGenChainBindingType: { - title: "BoltzGenChainBindingType", - description: "Binding type specification for a chain.", - type: "object", - required: ["id"], - properties: { - id: { - title: "Chain ID", - description: "Chain identifier.", - type: "string", - example: "A", - }, - binding: { - title: "Binding", - description: 'Residue indices that are binding (e.g., "5..7,13").', - type: "string", - nullable: true, - default: null, - example: "5..7,13", - }, - not_binding: { - title: "Not Binding", - description: - 'Residue indices that are not binding (e.g., "9..11" or "all").', - type: "string", - nullable: true, - default: null, - example: "9..11", - }, - }, + "BoltzGenChainBindingType": { + "title": "BoltzGenChainBindingType", + "description": "Binding type specification for a chain.", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "title": "Chain ID", + "description": "Chain identifier.", + "type": "string", + "example": "A" + }, + "binding": { + "title": "Binding", + "description": "Residue indices that are binding (e.g., \"5..7,13\").", + "type": "string", + "nullable": true, + "default": null, + "example": "5..7,13" + }, + "not_binding": { + "title": "Not Binding", + "description": "Residue indices that are not binding (e.g., \"9..11\" or \"all\").", + "type": "string", + "nullable": true, + "default": null, + "example": "9..11" + } + } }, - BoltzGenStructureGroup: { - title: "BoltzGenStructureGroup", - description: "Structure group for visibility control.", - type: "object", - required: ["visibility", "id"], - properties: { - visibility: { - title: "Visibility", - description: "Visibility level (0, 1, 2, etc.).", - type: "integer", - example: 0, - }, - id: { - title: "Chain ID", - description: 'Chain identifier or "all".', - type: "string", - example: "A", - }, - res_index: { - title: "Residue Index", - description: "Residue index range.", - type: "string", - nullable: true, - default: null, - example: "10..16", - }, - }, + "BoltzGenStructureGroup": { + "title": "BoltzGenStructureGroup", + "description": "Structure group for visibility control.", + "type": "object", + "required": [ + "visibility", + "id" + ], + "properties": { + "visibility": { + "title": "Visibility", + "description": "Visibility level (0, 1, 2, etc.).", + "type": "integer", + "example": 0 + }, + "id": { + "title": "Chain ID", + "description": "Chain identifier or \"all\".", + "type": "string", + "example": "A" + }, + "res_index": { + "title": "Residue Index", + "description": "Residue index range.", + "type": "string", + "nullable": true, + "default": null, + "example": "10..16" + } + } }, - BoltzGenChainDesign: { - title: "BoltzGenChainDesign", - description: "Design specification for a chain.", - type: "object", - required: ["id", "res_index"], - properties: { - id: { - title: "Chain ID", - description: "Chain identifier.", - type: "string", - example: "A", - }, - res_index: { - title: "Residue Index", - description: 'Residue indices to design (e.g., "..4,20..27").', - type: "string", - example: "..4,20..27", - }, - }, + "BoltzGenChainDesign": { + "title": "BoltzGenChainDesign", + "description": "Design specification for a chain.", + "type": "object", + "required": [ + "id", + "res_index" + ], + "properties": { + "id": { + "title": "Chain ID", + "description": "Chain identifier.", + "type": "string", + "example": "A" + }, + "res_index": { + "title": "Residue Index", + "description": "Residue indices to design (e.g., \"..4,20..27\").", + "type": "string", + "example": "..4,20..27" + } + } }, - BoltzGenChainSecondaryStructure: { - title: "BoltzGenChainSecondaryStructure", - description: "Secondary structure specification for a chain.", - type: "object", - required: ["id"], - properties: { - id: { - title: "Chain ID", - description: "Chain identifier.", - type: "string", - example: "A", - }, - loop: { - title: "Loop", - description: "Residue indices for loop regions.", - type: "string", - nullable: true, - default: null, - example: "1..5", - }, - helix: { - title: "Helix", - description: "Residue indices for helix regions.", - type: "string", - nullable: true, - default: null, - example: "6..20", - }, - sheet: { - title: "Sheet", - description: "Residue indices for sheet regions.", - type: "string", - nullable: true, - default: null, - example: "21..30", - }, - }, + "BoltzGenChainSecondaryStructure": { + "title": "BoltzGenChainSecondaryStructure", + "description": "Secondary structure specification for a chain.", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "title": "Chain ID", + "description": "Chain identifier.", + "type": "string", + "example": "A" + }, + "loop": { + "title": "Loop", + "description": "Residue indices for loop regions.", + "type": "string", + "nullable": true, + "default": null, + "example": "1..5" + }, + "helix": { + "title": "Helix", + "description": "Residue indices for helix regions.", + "type": "string", + "nullable": true, + "default": null, + "example": "6..20" + }, + "sheet": { + "title": "Sheet", + "description": "Residue indices for sheet regions.", + "type": "string", + "nullable": true, + "default": null, + "example": "21..30" + } + } }, - BoltzGenDesignInsertion: { - title: "BoltzGenDesignInsertion", - description: "Design insertion specification.", - type: "object", - required: ["id", "res_index", "num_residues"], - properties: { - id: { - title: "Chain ID", - description: "Chain identifier.", - type: "string", - example: "A", - }, - res_index: { - title: "Residue Index", - description: "Residue index where insertion occurs (1-based).", - type: "integer", - example: 10, - }, - num_residues: { - title: "Number of Residues", - description: - 'Number of residues to insert. Can be a range (e.g., "2..9") or fixed number.', - oneOf: [ + "BoltzGenDesignInsertion": { + "title": "BoltzGenDesignInsertion", + "description": "Design insertion specification.", + "type": "object", + "required": [ + "id", + "res_index", + "num_residues" + ], + "properties": { + "id": { + "title": "Chain ID", + "description": "Chain identifier.", + "type": "string", + "example": "A" + }, + "res_index": { + "title": "Residue Index", + "description": "Residue index where insertion occurs (1-based).", + "type": "integer", + "example": 10 + }, + "num_residues": { + "title": "Number of Residues", + "description": "Number of residues to insert. Can be a range (e.g., \"2..9\") or fixed number.", + "oneOf": [ { - type: "string", + "type": "string" }, { - type: "integer", - }, + "type": "integer" + } ], - example: "2..9", - }, - secondary_structure: { - title: "Secondary Structure", - description: "Secondary structure type for inserted residues.", - type: "string", - enum: ["UNSPECIFIED", "LOOP", "HELIX", "SHEET"], - default: "UNSPECIFIED", - example: "LOOP", - }, - }, + "example": "2..9" + }, + "secondary_structure": { + "title": "Secondary Structure", + "description": "Secondary structure type for inserted residues.", + "type": "string", + "enum": [ + "UNSPECIFIED", + "LOOP", + "HELIX", + "SHEET" + ], + "default": "UNSPECIFIED", + "example": "LOOP" + } + } }, - BoltzGenFileEntity: { - title: "BoltzGenFileEntity", - description: - "File-based entity specification (e.g., PDB/CIF files).\n\nNote: The `path` field is a placeholder. When using the API, the actual structure\ncontent must be provided via the `structure_file` parameter in the request body.", - type: "object", - required: ["path"], - properties: { - path: { - title: "Path", - description: - "Path to the structure file. This is a placeholder that will be overwritten\nby the `structure_file` argument when calling the API. The actual structure\ncontent must be provided via the `structure_file` parameter.", - type: "string", - example: "input.pdb", - }, - fuse: { - title: "Fuse Chain", - description: "Chain ID to fuse with.", - type: "string", - nullable: true, - default: null, - example: "A", - }, - include: { - title: "Include", - description: - 'Chains or regions to include. Can be "all" or list of chain specifications.', - oneOf: [ + "BoltzGenFileEntity": { + "title": "BoltzGenFileEntity", + "description": "File-based entity specification (e.g., PDB/CIF files).\n\nNote: The `path` field is a placeholder. When using the API, the actual structure\ncontent must be provided via the `structure_file` parameter in the request body.", + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "title": "Path", + "description": "Path to the structure file. This is a placeholder that will be overwritten\nby the `structure_file` argument when calling the API. The actual structure\ncontent must be provided via the `structure_file` parameter.", + "type": "string", + "example": "input.pdb" + }, + "fuse": { + "title": "Fuse Chain", + "description": "Chain ID to fuse with.", + "type": "string", + "nullable": true, + "default": null, + "example": "A" + }, + "include": { + "title": "Include", + "description": "Chains or regions to include. Can be \"all\" or list of chain specifications.", + "oneOf": [ { - type: "string", - enum: ["all"], + "type": "string", + "enum": [ + "all" + ] }, { - type: "array", - items: { - $ref: "#/components/schemas/BoltzGenChainInclude", - }, - }, + "type": "array", + "items": { + "$ref": "#/components/schemas/BoltzGenChainInclude" + } + } ], - nullable: true, - default: null, - example: "all", - }, - exclude: { - title: "Exclude", - description: "Chains or regions to exclude.", - type: "array", - nullable: true, - default: null, - items: { - $ref: "#/components/schemas/BoltzGenChainInclude", - }, - }, - include_proximity: { - title: "Include Proximity", - description: "Proximity-based inclusion specifications.", - type: "array", - nullable: true, - default: null, - items: { - $ref: "#/components/schemas/BoltzGenChainIncludeProximity", - }, - }, - binding_types: { - title: "Binding Types", - description: "Binding type specifications for chains.", - type: "array", - nullable: true, - default: null, - items: { - $ref: "#/components/schemas/BoltzGenChainBindingType", - }, - }, - structure_groups: { - title: "Structure Groups", - description: - "Structure group specifications for visibility control.", - type: "array", - nullable: true, - default: null, - items: { - $ref: "#/components/schemas/BoltzGenStructureGroup", - }, - }, - design: { - title: "Design", - description: "Design specifications for chains.", - type: "array", - nullable: true, - default: null, - items: { - $ref: "#/components/schemas/BoltzGenChainDesign", - }, - }, - secondary_structure: { - title: "Secondary Structure", - description: "Secondary structure specifications for chains.", - type: "array", - nullable: true, - default: null, - items: { - $ref: "#/components/schemas/BoltzGenChainSecondaryStructure", - }, - }, - design_insertions: { - title: "Design Insertions", - description: "Design insertion specifications.", - type: "array", - nullable: true, - default: null, - items: { - $ref: "#/components/schemas/BoltzGenDesignInsertion", - }, - }, - }, + "nullable": true, + "default": null, + "example": "all" + }, + "exclude": { + "title": "Exclude", + "description": "Chains or regions to exclude.", + "type": "array", + "nullable": true, + "default": null, + "items": { + "$ref": "#/components/schemas/BoltzGenChainInclude" + } + }, + "include_proximity": { + "title": "Include Proximity", + "description": "Proximity-based inclusion specifications.", + "type": "array", + "nullable": true, + "default": null, + "items": { + "$ref": "#/components/schemas/BoltzGenChainIncludeProximity" + } + }, + "binding_types": { + "title": "Binding Types", + "description": "Binding type specifications for chains.", + "type": "array", + "nullable": true, + "default": null, + "items": { + "$ref": "#/components/schemas/BoltzGenChainBindingType" + } + }, + "structure_groups": { + "title": "Structure Groups", + "description": "Structure group specifications for visibility control.", + "type": "array", + "nullable": true, + "default": null, + "items": { + "$ref": "#/components/schemas/BoltzGenStructureGroup" + } + }, + "design": { + "title": "Design", + "description": "Design specifications for chains.", + "type": "array", + "nullable": true, + "default": null, + "items": { + "$ref": "#/components/schemas/BoltzGenChainDesign" + } + }, + "secondary_structure": { + "title": "Secondary Structure", + "description": "Secondary structure specifications for chains.", + "type": "array", + "nullable": true, + "default": null, + "items": { + "$ref": "#/components/schemas/BoltzGenChainSecondaryStructure" + } + }, + "design_insertions": { + "title": "Design Insertions", + "description": "Design insertion specifications.", + "type": "array", + "nullable": true, + "default": null, + "items": { + "$ref": "#/components/schemas/BoltzGenDesignInsertion" + } + } + } }, - BoltzGenEntity: { - title: "BoltzGenEntity", - description: - "Entity wrapper for different entity types (protein, ligand, or file).", - type: "object", - properties: { - protein: { - $ref: "#/components/schemas/BoltzGenProteinEntity", - nullable: true, - default: null, - }, - ligand: { - $ref: "#/components/schemas/BoltzGenLigandEntity", - nullable: true, - default: null, - }, - file: { - $ref: "#/components/schemas/BoltzGenFileEntity", - nullable: true, - default: null, - }, + "BoltzGenEntity": { + "title": "BoltzGenEntity", + "description": "Entity wrapper for different entity types (protein, ligand, or file).", + "type": "object", + "properties": { + "protein": { + "$ref": "#/components/schemas/BoltzGenProteinEntity", + "nullable": true, + "default": null + }, + "ligand": { + "$ref": "#/components/schemas/BoltzGenLigandEntity", + "nullable": true, + "default": null + }, + "file": { + "$ref": "#/components/schemas/BoltzGenFileEntity", + "nullable": true, + "default": null + } }, - oneOf: [ + "oneOf": [ { - required: ["protein"], + "required": [ + "protein" + ] }, { - required: ["ligand"], + "required": [ + "ligand" + ] }, { - required: ["file"], - }, - ], + "required": [ + "file" + ] + } + ] }, - BoltzGenBondConstraint: { - title: "BoltzGenBondConstraint", - description: "Covalent bond constraint between two atoms.", - type: "object", - required: ["atom1", "atom2"], - properties: { - atom1: { - title: "Atom 1", - description: - "First atom specification [CHAIN_ID, RES_IDX, ATOM_NAME].", - type: "array", - minItems: 3, - maxItems: 3, - items: { - oneOf: [ + "BoltzGenBondConstraint": { + "title": "BoltzGenBondConstraint", + "description": "Covalent bond constraint between two atoms.", + "type": "object", + "required": [ + "atom1", + "atom2" + ], + "properties": { + "atom1": { + "title": "Atom 1", + "description": "First atom specification [CHAIN_ID, RES_IDX, ATOM_NAME].", + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": { + "oneOf": [ { - type: "string", + "type": "string" }, { - type: "integer", - }, - ], - }, - example: ["A", 10, "CA"], - }, - atom2: { - title: "Atom 2", - description: - "Second atom specification [CHAIN_ID, RES_IDX, ATOM_NAME].", - type: "array", - minItems: 3, - maxItems: 3, - items: { - oneOf: [ + "type": "integer" + } + ] + }, + "example": [ + "A", + 10, + "CA" + ] + }, + "atom2": { + "title": "Atom 2", + "description": "Second atom specification [CHAIN_ID, RES_IDX, ATOM_NAME].", + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": { + "oneOf": [ { - type: "string", + "type": "string" }, { - type: "integer", - }, - ], - }, - example: ["B", 1, "O"], - }, - }, + "type": "integer" + } + ] + }, + "example": [ + "B", + 1, + "O" + ] + } + } }, - BoltzGenTotalLengthConstraint: { - title: "BoltzGenTotalLengthConstraint", - description: "Total length constraint for the design.", - type: "object", - properties: { - min: { - title: "Minimum Length", - description: "Minimum total length.", - type: "integer", - nullable: true, - default: null, - example: 50, - }, - max: { - title: "Maximum Length", - description: "Maximum total length.", - type: "integer", - nullable: true, - default: null, - example: 200, - }, - }, + "BoltzGenTotalLengthConstraint": { + "title": "BoltzGenTotalLengthConstraint", + "description": "Total length constraint for the design.", + "type": "object", + "properties": { + "min": { + "title": "Minimum Length", + "description": "Minimum total length.", + "type": "integer", + "nullable": true, + "default": null, + "example": 50 + }, + "max": { + "title": "Maximum Length", + "description": "Maximum total length.", + "type": "integer", + "nullable": true, + "default": null, + "example": 200 + } + } }, - BoltzGenConstraint: { - title: "BoltzGenConstraint", - description: "Constraint wrapper for different constraint types.", - type: "object", - properties: { - bond: { - $ref: "#/components/schemas/BoltzGenBondConstraint", - nullable: true, - default: null, - }, - total_len: { - $ref: "#/components/schemas/BoltzGenTotalLengthConstraint", - nullable: true, - default: null, - }, + "BoltzGenConstraint": { + "title": "BoltzGenConstraint", + "description": "Constraint wrapper for different constraint types.", + "type": "object", + "properties": { + "bond": { + "$ref": "#/components/schemas/BoltzGenBondConstraint", + "nullable": true, + "default": null + }, + "total_len": { + "$ref": "#/components/schemas/BoltzGenTotalLengthConstraint", + "nullable": true, + "default": null + } }, - anyOf: [ + "anyOf": [ { - required: ["bond"], + "required": [ + "bond" + ] }, { - required: ["total_len"], - }, - ], + "required": [ + "total_len" + ] + } + ] }, - BoltzGenDesignSpec: { - title: "BoltzGenDesignSpec", - description: - "Complete BoltzGen design specification including entities and constraints.", - type: "object", - required: ["entities"], - properties: { - entities: { - title: "Entities", - description: - "List of entities in the design (proteins, ligands, or files).", - type: "array", - minItems: 1, - items: { - $ref: "#/components/schemas/BoltzGenEntity", - }, - "x-order": 1, - }, - constraints: { - title: "Constraints", - description: "List of constraints for the design.", - type: "array", - nullable: true, - default: null, - items: { - $ref: "#/components/schemas/BoltzGenConstraint", - }, - "x-order": 2, - }, + "BoltzGenDesignSpec": { + "title": "BoltzGenDesignSpec", + "description": "Complete BoltzGen design specification including entities and constraints.", + "type": "object", + "required": [ + "entities" + ], + "properties": { + "entities": { + "title": "Entities", + "description": "List of entities in the design (proteins, ligands, or files).", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/BoltzGenEntity" + }, + "x-order": 1 + }, + "constraints": { + "title": "Constraints", + "description": "List of constraints for the design.", + "type": "array", + "nullable": true, + "default": null, + "items": { + "$ref": "#/components/schemas/BoltzGenConstraint" + }, + "x-order": 2 + } }, - example: { - entities: [ + "example": { + "entities": [ { - protein: { - id: "A", - sequence: "ACDEFGHIKLMNPQRSTVWY", - }, + "protein": { + "id": "A", + "sequence": "ACDEFGHIKLMNPQRSTVWY" + } }, { - ligand: { - id: "B", - ccd: "ATP", - }, - }, + "ligand": { + "id": "B", + "ccd": "ATP" + } + } ], - constraints: [ + "constraints": [ { - bond: { - atom1: ["A", 10, "CA"], - atom2: ["B", 1, "O"], - }, - }, - ], - }, + "bond": { + "atom1": [ + "A", + 10, + "CA" + ], + "atom2": [ + "B", + 1, + "O" + ] + } + } + ] + } }, - DesignRequestBoltzGen: { - title: "DesignRequestBoltzGen", - description: - "Request to design new structures using BoltzGen.\n\n`query_id` or `design_spec` is required.\n", - type: "object", - properties: { - n: { - title: "Number of Designs", - description: "Number of unique design trajectories to run.", - type: "integer", - default: 1, - example: 1, - "x-order": 101, - }, - query_id: { - title: "Query ID", - description: - "ID of query which contains the encoded design request. This design request should be a partially/fully masked structure, which will be designed by the model. Either query_id or design_spec should be specified.", - type: "string", - format: "uuid", - }, - design_spec: { - title: "Design Specification", - description: - "BoltzGen design specification defining entities and constraints.", - $ref: "#/components/schemas/BoltzGenDesignSpec", - "x-order": 102, - }, - structure_text: { - title: "Structure Text", - description: - "String contents of the input PDB/CIF file for file-based entities. This provides the actual structure content for any FileEntity objects in the design_spec.", - type: "string", - nullable: true, - default: null, - example: - "ATOM 1 N ALA A 1 0.000 0.000 0.000 1.00 0.00 N\n...\n", - "x-order": 103, - }, - diffusion_batch_size: { - title: "Diffusion Batch Size", - description: - "The batch size for diffusion sampling. Controls how many samples are processed in parallel during the diffusion process.", - type: "integer", - nullable: true, - default: null, - example: 4, - "x-order": 104, - }, - step_scale: { - title: "Step Scale", - description: - "Scaling factor for the number of diffusion steps. Higher values may improve quality at the cost of longer generation time.", - type: "number", - format: "float", - nullable: true, - default: null, - example: 1, - "x-order": 105, - }, - noise_scale: { - title: "Noise Scale", - description: - "Scaling factor for the noise schedule during diffusion. Controls the amount of noise added at each step of the reverse diffusion process.", - type: "number", - format: "float", - nullable: true, - default: null, - example: 1, - "x-order": 106, - }, + "DesignRequestBoltzGen": { + "title": "DesignRequestBoltzGen", + "description": "Request to design new structures using BoltzGen.\n\n`query_id` or `design_spec` is required.\n", + "type": "object", + "properties": { + "n": { + "title": "Number of Designs", + "description": "Number of unique design trajectories to run.", + "type": "integer", + "default": 1, + "example": 1, + "x-order": 101 + }, + "query_id": { + "title": "Query ID", + "description": "ID of query which contains the encoded design request. This design request should be a partially/fully masked structure, which will be designed by the model. Either query_id or design_spec should be specified.", + "type": "string", + "format": "uuid" + }, + "design_spec": { + "title": "Design Specification", + "description": "BoltzGen design specification defining entities and constraints.", + "$ref": "#/components/schemas/BoltzGenDesignSpec", + "x-order": 102 + }, + "structure_text": { + "title": "Structure Text", + "description": "String contents of the input PDB/CIF file for file-based entities. This provides the actual structure content for any FileEntity objects in the design_spec.", + "type": "string", + "nullable": true, + "default": null, + "example": "ATOM 1 N ALA A 1 0.000 0.000 0.000 1.00 0.00 N\n...\n", + "x-order": 103 + }, + "diffusion_batch_size": { + "title": "Diffusion Batch Size", + "description": "The batch size for diffusion sampling. Controls how many samples are processed in parallel during the diffusion process.", + "type": "integer", + "nullable": true, + "default": null, + "example": 4, + "x-order": 104 + }, + "step_scale": { + "title": "Step Scale", + "description": "Scaling factor for the number of diffusion steps. Higher values may improve quality at the cost of longer generation time.", + "type": "number", + "format": "float", + "nullable": true, + "default": null, + "example": 1, + "x-order": 105 + }, + "noise_scale": { + "title": "Noise Scale", + "description": "Scaling factor for the noise schedule during diffusion. Controls the amount of noise added at each step of the reverse diffusion process.", + "type": "number", + "format": "float", + "nullable": true, + "default": null, + "example": 1, + "x-order": 106 + } }, - examples: { - query: { - n: 1, - query_id: "afc17865-5c97-4b22-9c37-cdf3985e06bb", - }, - unconditional: { - design_spec: { - entities: [ + "examples": { + "query": { + "n": 1, + "query_id": "afc17865-5c97-4b22-9c37-cdf3985e06bb" + }, + "unconditional": { + "design_spec": { + "entities": [ { - protein: { - id: "A", - sequence: "100", - }, - }, - ], - }, - }, - binder_design: { - design_spec: { - entities: [ + "protein": { + "id": "A", + "sequence": "100" + } + } + ] + } + }, + "binder_design": { + "design_spec": { + "entities": [ { - file: { - path: "target.pdb", - include: "all", - }, + "file": { + "path": "target.pdb", + "include": "all" + } }, { - protein: { - id: "B", - sequence: "50..100", - binding_types: "BBBBBBBBBB", - }, - }, - ], - }, - structure_text: "ATOM ...", - }, - protein_ligand: { - design_spec: { - entities: [ + "protein": { + "id": "B", + "sequence": "50..100", + "binding_types": "BBBBBBBBBB" + } + } + ] + }, + "structure_text": "ATOM ..." + }, + "protein_ligand": { + "design_spec": { + "entities": [ { - protein: { - id: "A", - sequence: "80", - }, + "protein": { + "id": "A", + "sequence": "80" + } }, { - ligand: { - id: "B", - ccd: "ATP", - }, - }, + "ligand": { + "id": "B", + "ccd": "ATP" + } + } ], - constraints: [ + "constraints": [ { - bond: { - atom1: ["A", 10, "CA"], - atom2: ["B", 1, "O"], - }, - }, - ], - }, - }, - }, - example: { - n: 1, - query_id: "afc17865-5c97-4b22-9c37-cdf3985e06bb", + "bond": { + "atom1": [ + "A", + 10, + "CA" + ], + "atom2": [ + "B", + 1, + "O" + ] + } + } + ] + } + } }, + "example": { + "n": 1, + "query_id": "afc17865-5c97-4b22-9c37-cdf3985e06bb" + } }, - StructureGenerate: { - title: "StructureGenerate", - description: "Structure generate request metadata.", - allOf: [ + "StructureGenerate": { + "title": "StructureGenerate", + "description": "Structure generate request metadata.", + "allOf": [ { - $ref: "#/components/schemas/Request", + "$ref": "#/components/schemas/Request" }, { - type: "object", - required: ["model_id"], - properties: { - model_id: { - type: "string", - example: "rfdiffusion", - }, - args: { - type: "object", - additionalProperties: true, - }, - }, - }, - ], - }, - OutputFormat: { - title: "OutputFormat", - description: - "Output format of folded structure. Defaults to `mmcif`.\n\nThe value `cif` is accepted as an alias for `mmcif`.\n", - type: "string", - enum: ["pdb", "mmcif", "cif"], - default: "mmcif", + "type": "object", + "required": [ + "model_id" + ], + "properties": { + "model_id": { + "type": "string", + "example": "rfdiffusion" + }, + "args": { + "type": "object", + "additionalProperties": true + } + } + } + ] }, - CIFOutput: { - title: "CIFOutput", - description: "An output CIF structure file.", - type: "string", - example: - 'data_example\n#\n_entry.id example\n#\nloop_\n_entity.id\n_entity.type\n_entity.pdbx_description\n1 polymer "Example protein chain"\n#\nloop_\n_atom_site.group_PDB\n_atom_site.id\n_atom_site.type_symbol\n_atom_site.label_atom_id\n_atom_site.label_comp_id\n_atom_site.label_asym_id\n_atom_site.label_entity_id\n_atom_site.label_seq_id\n_atom_site.Cartn_x\n_atom_site.Cartn_y\n_atom_site.Cartn_z\nATOM 1 N N MET A 1 1 12.011 13.456 14.789\nATOM 2 C CA MET A 1 1 13.123 14.567 15.890\nATOM 3 C C MET A 1 1 14.234 15.678 16.901\nATOM 4 O O MET A 1 1 15.345 16.789 17.012\n#\n', + "OutputFormat": { + "title": "OutputFormat", + "description": "Output format of folded structure. Defaults to `mmcif`.\n\nThe value `cif` is accepted as an alias for `mmcif`.\n", + "type": "string", + "enum": [ + "pdb", + "mmcif", + "cif" + ], + "default": "mmcif" }, - PDBOutput: { - title: "PDBOutput", - description: "An output pdb structure file.", - type: "string", - example: - "HEADER OXYGEN TRANSPORT 29-JUL-76 1HHO \nTITLE DEOXY HUMAN HEMOGLOBIN \nCOMPND MOL_ID: 1; MOLECULE: HEMOGLOBIN; CHAIN: A, B, C, D; \nSOURCE HUMAN (HOMO SAPIENS) \nKEYWDS OXYGEN TRANSPORT, HEME \nEXPDTA X-RAY DIFFRACTION \nAUTHOR F.PERUTZ,R.MATTHEWS \nREVDAT 1 24-FEB-09 1HHO 0 \nSEQRES 1 A 141 VAL LEU SER PRO ALA ASP LYS THR VAL LEU THR PRO GLU GLU \nSEQRES 2 A 141 LYS SER ALA GLY PHE LEU SER PRO GLU GLY ALA GLY\n", + "CIFOutput": { + "title": "CIFOutput", + "description": "An output CIF structure file.", + "type": "string", + "example": "data_example\n#\n_entry.id example\n#\nloop_\n_entity.id\n_entity.type\n_entity.pdbx_description\n1 polymer \"Example protein chain\"\n#\nloop_\n_atom_site.group_PDB\n_atom_site.id\n_atom_site.type_symbol\n_atom_site.label_atom_id\n_atom_site.label_comp_id\n_atom_site.label_asym_id\n_atom_site.label_entity_id\n_atom_site.label_seq_id\n_atom_site.Cartn_x\n_atom_site.Cartn_y\n_atom_site.Cartn_z\nATOM 1 N N MET A 1 1 12.011 13.456 14.789\nATOM 2 C CA MET A 1 1 13.123 14.567 15.890\nATOM 3 C C MET A 1 1 14.234 15.678 16.901\nATOM 4 O O MET A 1 1 15.345 16.789 17.012\n#\n" }, - }, + "PDBOutput": { + "title": "PDBOutput", + "description": "An output pdb structure file.", + "type": "string", + "example": "HEADER OXYGEN TRANSPORT 29-JUL-76 1HHO \nTITLE DEOXY HUMAN HEMOGLOBIN \nCOMPND MOL_ID: 1; MOLECULE: HEMOGLOBIN; CHAIN: A, B, C, D; \nSOURCE HUMAN (HOMO SAPIENS) \nKEYWDS OXYGEN TRANSPORT, HEME \nEXPDTA X-RAY DIFFRACTION \nAUTHOR F.PERUTZ,R.MATTHEWS \nREVDAT 1 24-FEB-09 1HHO 0 \nSEQRES 1 A 141 VAL LEU SER PRO ALA ASP LYS THR VAL LEU THR PRO GLU GLU \nSEQRES 2 A 141 LYS SER ALA GLY PHE LEU SER PRO GLU GLY ALA GLY\n" + } + } }, - tags: [ + "tags": [ { - name: "design", - description: "Design new variants to meet your design objectives", + "name": "design", + "description": "Design new variants to meet your design objectives" }, { - name: "structure generation", - description: - "Generate de novo protein structures based on your target structures", - }, - ], + "name": "structure generation", + "description": "Generate de novo protein structures based on your target structures" + } + ] }; export default designSpec; diff --git a/source/_static/js/embeddingsSpec.js b/source/_static/js/embeddingsSpec.js index 54dbf40..a82c520 100644 --- a/source/_static/js/embeddingsSpec.js +++ b/source/_static/js/embeddingsSpec.js @@ -1,96 +1,98 @@ const embeddingsSpec = { - openapi: "3.0.2", - info: { - title: "OpenProtein Embeddings", - description: - "# Embeddings API\nThe Embeddings API provided by OpenProtein.ai allows you to generate state-of-the-art protein sequence embeddings from both proprietary and open source models.\n\nYou can list the available models with `/embeddings/models` and view a model summary (including output dimensions, citations and more) with `/embeddings/models/{model_id}/metadata`.\n\nCurrently, we support the following models:\n- **PoET**: An OpenProtein.AI conditional protein language model that enables embedding, scoring, and generating sequences conditioned on an input protein family of interest. [Reference](https://papers.nips.cc/paper_files/paper/2023/hash/f4366126eba252699b280e8f93c0ab2f-Abstract-Conference.html).\n- **PoET-2**: An OpenProtein.AI conditional, multimodal protein language model that enables embedding, scoring, and generating sequences conditioned on an input protein family of interest. [Reference](https://proceedings.neurips.cc/paper_files/paper/2025/hash/4d19160864e6a644496d61b21c7e015a-Abstract-Conference.html).\n- **Prot-seq**: An OpenProtein.AI masked protein language model (~300M parameters) trained on UniRef50 with contact and secondary structure prediction as secondary objectives. This model utilizes random Fourier position embeddings and FlashAttention to enable fast inference.\n- **Rotaprot-large-uniref50w**: An OpenProtein.AI masked protein language model (~900M parameters) trained on UniRef100 with sequences weighted inversely proportional to the number of UniRef50 homologs. This model uses rotary relative position embeddings and FlashAttention to enable fast inference.\n- **Rotaprot-large-uniref90-ft**: A version of our proprietary rotaprot-large-uniref50w finetuned on UniRef100 with sequences weighted inversely proportional to the number of UniRef90 cluster members.\n- **ESM1 Models**: Community based ESM1 models, including: *esm1b_t33_650M_UR50S*, *esm1v_t33_650M_UR90S_1*, *esm1v_t33_650M_UR90S_2*, *esm1v_t33_650M_UR90S_3*, *esm1v_t33_650M_UR90S_4*, *esm1v_t33_650M_UR90S_5*. These are based on the ESM1 language model, with different versions having different model parameters and training data. [GitHub link](https://github.com/facebookresearch/esm), [ESM1b reference](https://www.pnas.org/doi/full/10.1073/pnas.2016239118), [ESM1v reference](https://proceedings.neurips.cc/paper/2021/hash/f51338d736f95dd42427296047067694-Abstract.html). Licensed under [MIT](https://choosealicense.com/licenses/mit/).\n- **ESM2 Models**: Community based ESM2 models, including: *esm2_t6_8M_UR50D*, *esm2_t12_35M_UR50D*, *esm2_t30_150M_UR50D*, *esm2_t33_650M_UR50D*. These models are based on the ESM2 language model, with different version having different model parameters and training data. [GitHub link](https://github.com/facebookresearch/esm), [Reference](https://www.science.org/doi/10.1126/science.ade2574). Licensed under [MIT](https://choosealicense.com/licenses/mit/).\n- **ESMC Models**: ESM Cambrian (ESMC) protein language models, including: *esmc-300m*, *esmc-600m*, *esmc-6b*. These are trained on UniRef, MGnify, and JGI, with different versions having different model parameters. [GitHub link](https://github.com/Biohub/esm), [Reference](https://biohub.ai/papers/esm_protein.pdf). Licensed under [MIT](https://choosealicense.com/licenses/mit/).\n- **ProtTrans Models**: Transformer-based models from RostLab, including: *prot_t5_xl_half_uniref50-enc*. These models are based on the ProtTrans models, with different versions having different transformer-based architectures, model parameters and precisions, as well as different training datasets. [GitHub link](https://github.com/agemagician/ProtTrans), [Reference](https://www.biorxiv.org/content/early/2020/07/21/2020.07.12.199554). Licensed under [Academic Free License v3.0 License](https://choosealicense.com/licenses/afl-3.0/).\n- **AbLang2**: An antibody-specific language model that provides residue-level and sequence-level representations for both heavy and light chains. [GitHub link](https://github.com/oxpig/AbLang2), [Reference](https://doi.org/10.1101/2024.02.02.578678). Licensed under [BSD-3](https://choosealicense.com/licenses/bsd-3-clause/).\n- **ProteinMPNN**: A model for inverse-folding of protein structures to predict suitable sequences. [GitHub link](https://github.com/dauparas/ProteinMPNN), [Reference](https://doi.org/10.1126/science.add2187). Licensed under [MIT](https://choosealicense.com/licenses/mit/).\n- **SolubleMPNN**: A variant of ProteinMPNN trained with weights tuned for soluble protein targets. Uses the same inverse-folding pipeline as ProteinMPNN; `soluble_model` is implied by the route, and `model_name` is restricted to the soluble-compatible weights (`v_48_010`, `v_48_020`). [GitHub link](https://github.com/dauparas/ProteinMPNN), [Reference](https://doi.org/10.1126/science.add2187). Licensed under [MIT](https://choosealicense.com/licenses/mit/).\n- **ESM-IF1**: A structure-conditioned inverse-folding model that scores or generates protein sequences given a backbone structure. It has a max sequence length of 500 residues. [GitHub link](https://github.com/facebookresearch/esm), [Reference](https://www.biorxiv.org/content/10.1101/2022.04.10.487779). Licensed under [MIT](https://choosealicense.com/licenses/mit/).\n\n", - version: "1.0.0", + "openapi": "3.0.2", + "info": { + "title": "OpenProtein Embeddings", + "description": "# Embeddings API\nThe Embeddings API provided by OpenProtein.ai allows you to generate state-of-the-art protein sequence embeddings from both proprietary and open source models.\n\nYou can list the available models with `/embeddings/models` and view a model summary (including output dimensions, citations and more) with `/embeddings/models/{model_id}/metadata`.\n\nCurrently, we support the following models:\n- **PoET**: An OpenProtein.AI conditional protein language model that enables embedding, scoring, and generating sequences conditioned on an input protein family of interest. [Reference](https://papers.nips.cc/paper_files/paper/2023/hash/f4366126eba252699b280e8f93c0ab2f-Abstract-Conference.html).\n- **PoET-2**: An OpenProtein.AI conditional, multimodal protein language model that enables embedding, scoring, and generating sequences conditioned on an input protein family of interest. [Reference](https://proceedings.neurips.cc/paper_files/paper/2025/hash/4d19160864e6a644496d61b21c7e015a-Abstract-Conference.html).\n- **Prot-seq**: An OpenProtein.AI masked protein language model (~300M parameters) trained on UniRef50 with contact and secondary structure prediction as secondary objectives. This model utilizes random Fourier position embeddings and FlashAttention to enable fast inference.\n- **Rotaprot-large-uniref50w**: An OpenProtein.AI masked protein language model (~900M parameters) trained on UniRef100 with sequences weighted inversely proportional to the number of UniRef50 homologs. This model uses rotary relative position embeddings and FlashAttention to enable fast inference.\n- **Rotaprot-large-uniref90-ft**: A version of our proprietary rotaprot-large-uniref50w finetuned on UniRef100 with sequences weighted inversely proportional to the number of UniRef90 cluster members.\n- **ESM1 Models**: Community based ESM1 models, including: *esm1b_t33_650M_UR50S*, *esm1v_t33_650M_UR90S_1*, *esm1v_t33_650M_UR90S_2*, *esm1v_t33_650M_UR90S_3*, *esm1v_t33_650M_UR90S_4*, *esm1v_t33_650M_UR90S_5*. These are based on the ESM1 language model, with different versions having different model parameters and training data. [GitHub link](https://github.com/facebookresearch/esm), [ESM1b reference](https://www.pnas.org/doi/full/10.1073/pnas.2016239118), [ESM1v reference](https://proceedings.neurips.cc/paper/2021/hash/f51338d736f95dd42427296047067694-Abstract.html). Licensed under [MIT](https://choosealicense.com/licenses/mit/).\n- **ESM2 Models**: Community based ESM2 models, including: *esm2_t6_8M_UR50D*, *esm2_t12_35M_UR50D*, *esm2_t30_150M_UR50D*, *esm2_t33_650M_UR50D*. These models are based on the ESM2 language model, with different version having different model parameters and training data. [GitHub link](https://github.com/facebookresearch/esm), [Reference](https://www.science.org/doi/10.1126/science.ade2574). Licensed under [MIT](https://choosealicense.com/licenses/mit/).\n- **ESMC Models**: ESM Cambrian (ESMC) protein language models, including: *esmc-300m*, *esmc-600m*, *esmc-6b*. These are trained on UniRef, MGnify, and JGI, with different versions having different model parameters. [GitHub link](https://github.com/Biohub/esm), [Reference](https://biohub.ai/papers/esm_protein.pdf). Licensed under [MIT](https://choosealicense.com/licenses/mit/).\n- **ProtTrans Models**: Transformer-based models from RostLab, including: *prot_t5_xl_half_uniref50-enc*. These models are based on the ProtTrans models, with different versions having different transformer-based architectures, model parameters and precisions, as well as different training datasets. [GitHub link](https://github.com/agemagician/ProtTrans), [Reference](https://www.biorxiv.org/content/early/2020/07/21/2020.07.12.199554). Licensed under [Academic Free License v3.0 License](https://choosealicense.com/licenses/afl-3.0/).\n- **AbLang2**: An antibody-specific language model that provides residue-level and sequence-level representations for both heavy and light chains. [GitHub link](https://github.com/oxpig/AbLang2), [Reference](https://doi.org/10.1101/2024.02.02.578678). Licensed under [BSD-3](https://choosealicense.com/licenses/bsd-3-clause/).\n- **ProteinMPNN**: A model for inverse-folding of protein structures to predict suitable sequences. [GitHub link](https://github.com/dauparas/ProteinMPNN), [Reference](https://doi.org/10.1126/science.add2187). Licensed under [MIT](https://choosealicense.com/licenses/mit/).\n- **SolubleMPNN**: A variant of ProteinMPNN trained with weights tuned for soluble protein targets. Uses the same inverse-folding pipeline as ProteinMPNN; `soluble_model` is implied by the route, and `model_name` is restricted to the soluble-compatible weights (`v_48_010`, `v_48_020`). [GitHub link](https://github.com/dauparas/ProteinMPNN), [Reference](https://doi.org/10.1126/science.add2187). Licensed under [MIT](https://choosealicense.com/licenses/mit/).\n- **ESM-IF1**: A structure-conditioned inverse-folding model that scores or generates protein sequences given a backbone structure. It has a max sequence length of 500 residues. [GitHub link](https://github.com/facebookresearch/esm), [Reference](https://www.biorxiv.org/content/10.1101/2022.04.10.487779). Licensed under [MIT](https://choosealicense.com/licenses/mit/).\n\n", + "version": "1.0.0" }, - paths: { + "paths": { "/api/v1/embeddings/models": { - get: { - tags: ["embeddings"], - summary: "List embeddings models", - description: - "Get available models. By default returns a list of model ID strings.\nUse `verbose=true` to return full model metadata objects.\nUse `output_type` to filter models by supported output types.", - parameters: [ - { - name: "verbose", - in: "query", - required: false, - description: - "When true, return full model metadata instead of just model IDs.", - schema: { - type: "boolean", - default: false, - }, - }, + "get": { + "tags": [ + "embeddings" + ], + "summary": "List embeddings models", + "description": "Get available models. By default returns a list of model ID strings.\nUse `verbose=true` to return full model metadata objects.\nUse `output_type` to filter models by supported output types.", + "parameters": [ { - name: "output_type", - in: "query", - required: false, - description: - "Filter models by supported output type (e.g. `embed`, `logits`, `attn`, `score`, `generate`).\nCan be repeated to match models supporting any of the specified types.", - schema: { - type: "string", - }, - style: "form", - explode: true, + "name": "verbose", + "in": "query", + "required": false, + "description": "When true, return full model metadata instead of just model IDs.", + "schema": { + "type": "boolean", + "default": false + } }, + { + "name": "output_type", + "in": "query", + "required": false, + "description": "Filter models by supported output type (e.g. `embed`, `logits`, `attn`, `score`, `generate`).\nCan be repeated to match models supporting any of the specified types.", + "schema": { + "type": "string" + }, + "style": "form", + "explode": true + } ], - responses: { - 200: { - description: "Available embeddings models returned.", - content: { + "responses": { + "200": { + "description": "Available embeddings models returned.", + "content": { "application/json": { - schema: { - oneOf: [ + "schema": { + "oneOf": [ { - title: "Model IDs", - description: "List of model ID strings (default).", - type: "array", - items: { - type: "string", + "title": "Model IDs", + "description": "List of model ID strings (default).", + "type": "array", + "items": { + "type": "string" }, - example: ["prot-seq", "poet", "..."], + "example": [ + "prot-seq", + "poet", + "..." + ] }, { - title: "Model Metadata", - description: - "List of full model metadata objects (when verbose=true).", - type: "array", - items: { - $ref: "#/components/schemas/ModelMetadata", - }, - }, - ], - }, - }, - }, - }, - }, - security: [ + "title": "Model Metadata", + "description": "List of full model metadata objects (when verbose=true).", + "type": "array", + "items": { + "$ref": "#/components/schemas/ModelMetadata" + } + } + ] + } + } + } + } + }, + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/embeddings/models/{model_id}": { - get: { - tags: ["embeddings"], - summary: "Get embeddings model metadata", - description: "Get information about specific embeddings model.", - parameters: [ - { - name: "model_id", - description: - "Model ID to query.\n\nList models to find available models.\n", - in: "path", - required: true, - schema: { - type: "string", - enum: [ + "get": { + "tags": [ + "embeddings" + ], + "summary": "Get embeddings model metadata", + "description": "Get information about specific embeddings model.", + "parameters": [ + { + "name": "model_id", + "description": "Model ID to query.\n\nList models to find available models.\n", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ "poet", "poet-2", "proteinmpnn", @@ -114,1094 +116,2060 @@ const embeddingsSpec = { "esmc-600m", "esmc-6b", "prott5-xl", - "ablang2", - ], - }, - }, + "ablang2" + ] + } + } ], - responses: { - 200: { - description: "Detailed information about model returned.", - content: { - "application/json": { - schema: { - $ref: "#/components/schemas/ModelMetadata", - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { - "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Model was not found.", - content: { - "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - }, - security: [ + "responses": { + "200": { + "description": "Detailed information about model returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelMetadata" + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Model was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/embeddings/{job_id}": { - get: { - tags: ["embeddings"], - summary: "Get embeddings request metadata", - description: "Get metadata about embeddings request.\n", - parameters: [ - { - name: "job_id", - in: "path", - description: "Job ID of embeddings request", - required: true, - schema: { - type: "string", - format: "uuid", - }, - }, + "get": { + "tags": [ + "embeddings" ], - responses: { - 200: { - description: "Embeddings metadata successfully returned.", - content: { - "application/json": { - schema: { - $ref: "#/components/schemas/Embed", - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { - "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Embeddings job not found.", - content: { - "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - }, - security: [ + "summary": "Get embeddings request metadata", + "description": "Get metadata about embeddings request.\n", + "parameters": [ { - oauth2: [], - }, + "name": "job_id", + "in": "path", + "description": "Job ID of embeddings request", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - }, + "responses": { + "200": { + "description": "Embeddings metadata successfully returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Embed" + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Embeddings job not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + } + ] + } }, "/api/v1/embeddings/{job_id}/sequences": { - get: { - tags: ["embeddings"], - summary: "Get sequences used in request", - description: "Get sequences used in a previous embeddings request.\n", - parameters: [ - { - name: "job_id", - in: "path", - description: "Job ID of sequences to fetch", - required: true, - schema: { - type: "string", - format: "uuid", - }, - }, + "get": { + "tags": [ + "embeddings" ], - responses: { - 200: { - description: "Request sequences", - content: { - "application/json": { - schema: { - type: "array", - items: { - $ref: "#/components/schemas/Sequence", - }, - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { - "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Embeddings job not found.", - content: { - "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - }, - security: [ + "summary": "Get sequences used in request", + "description": "Get sequences used in a previous embeddings request.\n", + "parameters": [ + { + "name": "job_id", + "in": "path", + "description": "Job ID of sequences to fetch", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Request sequences", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sequence" + } + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Embeddings job not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + } + ] + } + }, + "/api/v1/embeddings/{job_id}/stream": { + "get": { + "tags": [ + "embeddings" + ], + "summary": "Stream all vector results", + "description": "Stream the vector results for every sequence in an embeddings job in a single response.\n\nThe body is a sequence of length-prefixed frames, one per sequence, in the same order as the `/sequences` endpoint:\n\n- 8-byte unsigned big-endian integer `n`: length of the payload\n- `n` bytes: the result for that sequence, encoded in numpy (`.npy`) format, identical to `/{job_id}/{sequence}`\n\nThe stream ends when the connection closes after the last frame.\n\nIf a result can't be retrieved partway through, the server writes the plain-text message `Failed to get embeddings. Stream terminated.` without a length prefix and closes the stream. The status is already `200` at that point, so check that you received one frame per sequence.\n\nScore and generate jobs are not supported; use `/{job_id}/scores` or `/{job_id}/generate`.\n\nExample reader:\n\n```python\nimport io\nimport struct\n\nimport numpy as np\nimport requests\n\nwith requests.get(f\"{url}/api/v1/embeddings/{job_id}/stream\", headers=headers, stream=True) as r:\n r.raise_for_status()\n raw = r.raw\n while header := raw.read(8):\n (n,) = struct.unpack(\">Q\", header)\n arr = np.load(io.BytesIO(raw.read(n)))\n```\n", + "parameters": [ { - oauth2: [], + "name": "job_id", + "in": "path", + "description": "Job ID to fetch", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } }, + { + "name": "replicate", + "in": "query", + "description": "Replicate to return, starting at 1, for jobs run with multiple replicates. If omitted, all replicates are returned stacked along a new leading dimension.\n", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } ], - }, + "responses": { + "200": { + "description": "Stream of length-prefixed numpy arrays, one per sequence.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Failed to start the results stream. Try again later or contact support.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Embeddings job not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + } + ] + } }, "/api/v1/embeddings/{job_id}/{sequence}": { - get: { - tags: ["embeddings"], - summary: "Retrieve vector results", - description: "Get vector results for a submitted embeddings job.", - parameters: [ - { - name: "job_id", - in: "path", - description: "Job ID to fetch", - required: true, - schema: { - type: "string", - format: "uuid", - }, - }, + "get": { + "tags": [ + "embeddings" + ], + "summary": "Retrieve vector results", + "description": "Get vector results for a submitted embeddings job.", + "parameters": [ { - name: "sequence", - in: "path", - description: - "Sequence for which to retrieve result. Use `/sequences` endpoint to find sequences used in request.", - required: true, - schema: { - type: "string", - }, + "name": "job_id", + "in": "path", + "description": "Job ID to fetch", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } }, + { + "name": "sequence", + "in": "path", + "description": "Sequence for which to retrieve result. Use `/sequences` endpoint to find sequences used in request.", + "required": true, + "schema": { + "type": "string" + } + } ], - responses: { - 200: { - description: "Result encoded in numpy format", - content: { + "responses": { + "200": { + "description": "Result encoded in numpy format", + "content": { "application/octet-stream": { - schema: { - type: "string", - format: "binary", - example: - "\\x93NUMPY\\x01\\x00v\\x00{'descr': ' 0. Only valid when type is rational_quadratic.", - example: 1, - }, - }, + "example": "rbf" + }, + "multitask": { + "type": "boolean", + "description": "Whether or not to train GP as multitask.", + "example": true, + "default": false + }, + "period": { + "type": "number", + "format": "double", + "description": "Period length for the periodic kernel. Only valid when type is periodic.", + "example": 1 + }, + "alpha": { + "type": "number", + "format": "double", + "description": "Scale-mixture parameter for the rational_quadratic kernel; must be > 0. Only valid when type is rational_quadratic.", + "example": 1 + } + } }, - TrainRequestGP: { - title: "TrainRequestGP", - description: "Request to train a predictor using GP.", - type: "object", - required: ["dataset", "features", "kernel"], - properties: { - name: { - type: "string", - description: "Name of predictor to save.", - }, - description: { - type: "string", - description: "Description of predictor.", + "TrainRequestGP": { + "title": "TrainRequestGP", + "description": "Request to train a predictor using GP.", + "type": "object", + "required": [ + "dataset", + "features", + "kernel" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of predictor to save." }, - dataset: { - $ref: "#/components/schemas/TrainingDataset", + "description": { + "type": "string", + "description": "Description of predictor." }, - features: { - $ref: "#/components/schemas/TrainFeatures", + "dataset": { + "$ref": "#/components/schemas/TrainingDataset" }, - kernel: { - $ref: "#/components/schemas/Kernel", + "features": { + "$ref": "#/components/schemas/TrainFeatures" }, - }, + "kernel": { + "$ref": "#/components/schemas/Kernel" + } + } }, - JobID: { - title: "JobID", - description: "ID of job.", - type: "string", - format: "uuid", - "x-order": 1, + "JobID": { + "title": "JobID", + "description": "ID of job.", + "type": "string", + "format": "uuid", + "x-order": 1 }, - CreatedDate: { - title: "Created Date", - description: "Datetime of created object", - type: "string", - format: "date-time", - example: "2024-01-01T12:34:56.789Z", - "x-order": 4, + "CreatedDate": { + "title": "Created Date", + "description": "Datetime of created object", + "type": "string", + "format": "date-time", + "example": "2024-01-01T12:34:56.789Z", + "x-order": 4 }, - JobStatus: { - title: "JobStatus", - description: "Status of job.", - type: "string", - enum: ["PENDING", "RUNNING", "SUCCESS", "FAILURE"], - "x-order": 7, + "JobStatus": { + "title": "JobStatus", + "description": "Status of job.", + "type": "string", + "enum": [ + "PENDING", + "RUNNING", + "SUCCESS", + "FAILURE" + ], + "x-order": 7 }, - Request: { - title: "Request", - description: "Request for our compute platform.", - type: "object", - required: [ + "Request": { + "title": "Request", + "description": "Request for our compute platform.", + "type": "object", + "required": [ "job_id", "prerequisite_job_id", "created_date", "start_date", "end_date", "status", - "progress_counter", + "progress_counter" ], - properties: { - job_id: { - $ref: "#/components/schemas/JobID", - }, - prerequisite_job_id: { - title: "PrerequisiteJobID", - description: "Prerequisite job ID.", - type: "string", - format: "uuid", - nullable: true, - default: null, - example: null, - "x-order": 2, - }, - created_date: { - $ref: "#/components/schemas/CreatedDate", - }, - start_date: { - title: "StartDate", - description: "Start date of job.", - type: "string", - format: "date-time", - nullable: true, - example: null, - default: null, - "x-order": 5, - }, - end_date: { - title: "EndDate", - description: "End date of job.", - type: "string", - format: "date-time", - nullable: true, - example: null, - default: null, - "x-order": 6, - }, - status: { - $ref: "#/components/schemas/JobStatus", - }, - progress_counter: { - title: "ProgressCounter", - description: "Counter of the progress of job from 0 to 100.", - type: "integer", - minimum: 0, - maximum: 100, - example: 0, - default: 0, - "x-order": 8, - }, - }, + "properties": { + "job_id": { + "$ref": "#/components/schemas/JobID" + }, + "prerequisite_job_id": { + "title": "PrerequisiteJobID", + "description": "Prerequisite job ID.", + "type": "string", + "format": "uuid", + "nullable": true, + "default": null, + "example": null, + "x-order": 2 + }, + "created_date": { + "$ref": "#/components/schemas/CreatedDate" + }, + "start_date": { + "title": "StartDate", + "description": "Start date of job.", + "type": "string", + "format": "date-time", + "nullable": true, + "example": null, + "default": null, + "x-order": 5 + }, + "end_date": { + "title": "EndDate", + "description": "End date of job.", + "type": "string", + "format": "date-time", + "nullable": true, + "example": null, + "default": null, + "x-order": 6 + }, + "status": { + "$ref": "#/components/schemas/JobStatus" + }, + "progress_counter": { + "title": "ProgressCounter", + "description": "Counter of the progress of job from 0 to 100.", + "type": "integer", + "minimum": 0, + "maximum": 100, + "example": 0, + "default": 0, + "x-order": 8 + } + } }, - JobType: { - title: "JobType", - description: "Type of job.", - type: "string", - enum: [ + "JobType": { + "title": "JobType", + "description": "Type of job.", + "type": "string", + "enum": [ "/workflow/preprocess", "/workflow/train", "/workflow/embed/umap", @@ -1630,521 +1729,633 @@ const predictorSpec = { "/predictor/predict_multi", "/predictor/crossvalidate", "/clustering/hierarchical", - "/design", + "/design" ], - "x-order": 3, + "x-order": 3 }, - Job: { - title: "Job", - description: "Job represents a job for our compute platform.", - allOf: [ + "Job": { + "title": "Job", + "description": "Job represents a job for our compute platform.", + "allOf": [ { - $ref: "#/components/schemas/Request", + "$ref": "#/components/schemas/Request" }, { - type: "object", - required: ["job_type"], - properties: { - job_type: { - $ref: "#/components/schemas/JobType", - }, - }, - }, - ], + "type": "object", + "required": [ + "job_type" + ], + "properties": { + "job_type": { + "$ref": "#/components/schemas/JobType" + } + } + } + ] }, - Error: { - title: "Error", - description: "A error object providing details of the error.", - required: ["detail"], - type: "object", - properties: { - detail: { - title: "Detail", - type: "string", - }, - }, + "Error": { + "title": "Error", + "description": "A error object providing details of the error.", + "required": [ + "detail" + ], + "type": "object", + "properties": { + "detail": { + "title": "Detail", + "type": "string" + } + } }, - ValidationError: { - title: "ValidationError", - description: "An invalid object that could not be parsed.", - type: "object", - properties: { - detail: { - title: "ErrorDetailList", - type: "array", - items: { - title: "ErrorDetail", - required: ["loc", "msg", "type"], - type: "object", - properties: { - loc: { - title: "Location", - type: "array", - items: { - type: "integer", - }, - }, - msg: { - title: "Message", - type: "string", - }, - type: { - title: "Error Type", - type: "string", - }, - }, - }, - }, - }, + "ValidationError": { + "title": "ValidationError", + "description": "An invalid object that could not be parsed.", + "type": "object", + "properties": { + "detail": { + "title": "ErrorDetailList", + "type": "array", + "items": { + "title": "ErrorDetail", + "required": [ + "loc", + "msg", + "type" + ], + "type": "object", + "properties": { + "loc": { + "title": "Location", + "type": "array", + "items": { + "type": "integer" + } + }, + "msg": { + "title": "Message", + "type": "string" + }, + "type": { + "title": "Error Type", + "type": "string" + } + } + } + } + } }, - EnsembleRequest: { - title: "EnsembleRequest", - description: "Request to create ensemble predictor.", - type: "object", - required: ["model_ids"], - properties: { - name: { - type: "string", - description: "Name of ensemble predictor to save.", - example: "My Ensemble Model", - }, - description: { - type: "string", - description: "Description of ensemble predictor.", - example: "Ensemble model combining datasets.", - }, - model_ids: { - title: "Model IDs to ensemble.", - type: "array", - items: { - type: "string", - format: "uuid", - }, - }, - }, + "EnsembleRequest": { + "title": "EnsembleRequest", + "description": "Request to create ensemble predictor.", + "type": "object", + "required": [ + "model_ids" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of ensemble predictor to save.", + "example": "My Ensemble Model" + }, + "description": { + "type": "string", + "description": "Description of ensemble predictor.", + "example": "Ensemble model combining datasets." + }, + "model_ids": { + "title": "Model IDs to ensemble.", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } }, - PredictorType: { - title: "PredictorType", - description: "Type of model of the predictor.", - type: "string", - enum: ["GP", "ENSEMBLE"], + "PredictorType": { + "title": "PredictorType", + "description": "Type of model of the predictor.", + "type": "string", + "enum": [ + "GP", + "ENSEMBLE" + ] }, - Constraints: { - title: "Constraints", - description: "Constraints imposed on using the predictor.", - type: "object", - properties: { - sequence_length: { - description: - "Possible constraint on fixed length sequence if no reduction was used to train.", - type: "integer", - example: 1024, - }, - }, + "Constraints": { + "title": "Constraints", + "description": "Constraints imposed on using the predictor.", + "type": "object", + "properties": { + "sequence_length": { + "description": "Possible constraint on fixed length sequence if no reduction was used to train.", + "type": "integer", + "example": 1024 + } + } }, - ModelSpec: { - title: "ModelSpec", - description: "Specification of the predictor's model.", - type: "object", - required: ["type"], - properties: { - type: { - $ref: "#/components/schemas/PredictorType", - }, - constraints: { - $ref: "#/components/schemas/Constraints", + "ModelSpec": { + "title": "ModelSpec", + "description": "Specification of the predictor's model.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/PredictorType" }, - features: { - $ref: "#/components/schemas/TrainFeatures", + "constraints": { + "$ref": "#/components/schemas/Constraints" }, - kernel: { - $ref: "#/components/schemas/Kernel", + "features": { + "$ref": "#/components/schemas/TrainFeatures" }, - }, + "kernel": { + "$ref": "#/components/schemas/Kernel" + } + } }, - CalibrationStats: { - title: "CalibrationStats", - description: "Calibration stats of predictors from latest evaluation.", - type: "object", - properties: { - pearson: { - type: "number", - format: "float", - description: - "Pearson correlation of the predictor's crossvalidation.", - nullable: true, - example: 0.123, - }, - spearman: { - type: "number", - format: "float", - description: - "Spearman correlation of the predictor's crossvalidation.", - nullable: true, - example: 0.248, - }, - ece: { - type: "number", - format: "float", - description: - "Calibration score of the predictor's crossvalidation.", - example: 0.456, - }, - }, + "CalibrationStats": { + "title": "CalibrationStats", + "description": "Calibration stats of predictors from latest evaluation.", + "type": "object", + "properties": { + "pearson": { + "type": "number", + "format": "float", + "description": "Pearson correlation of the predictor's crossvalidation.", + "nullable": true, + "example": 0.123 + }, + "spearman": { + "type": "number", + "format": "float", + "description": "Spearman correlation of the predictor's crossvalidation.", + "nullable": true, + "example": 0.248 + }, + "ece": { + "type": "number", + "format": "float", + "description": "Calibration score of the predictor's crossvalidation.", + "example": 0.456 + } + } }, - CalibrationCurve: { - title: "CalibrationCurve", - description: "Calibration curve of predictors from latest evaluation.", - type: "array", - items: { - type: "object", - required: ["x", "y"], - properties: { - x: { - type: "number", - format: "float", - description: - "Predicted quantile for predictor's crossvalidation.", - }, - y: { - type: "number", - format: "float", - description: "Observed quantile for predictor's crossvalidation.", - }, - }, + "CalibrationCurve": { + "title": "CalibrationCurve", + "description": "Calibration curve of predictors from latest evaluation.", + "type": "array", + "items": { + "type": "object", + "required": [ + "x", + "y" + ], + "properties": { + "x": { + "type": "number", + "format": "float", + "description": "Predicted quantile for predictor's crossvalidation." + }, + "y": { + "type": "number", + "format": "float", + "description": "Observed quantile for predictor's crossvalidation." + } + } }, - nullable: true, - example: [ + "nullable": true, + "example": [ { - x: 0.5, - y: 0.52, - }, - ], + "x": 0.5, + "y": 0.52 + } + ] }, - BasePredictor: { - title: "Predictor", - description: - "Predictor used to run predictions of properties on sequences.", - type: "object", - required: [ + "BasePredictor": { + "title": "Predictor", + "description": "Predictor used to run predictions of properties on sequences.", + "type": "object", + "required": [ "id", "name", "status", "created_date", "owner", "model_spec", - "training_dataset", + "training_dataset" ], - properties: { - id: { - type: "string", - format: "uuid", - description: "ID of predictor.", - "x-order": 0, - }, - name: { - type: "string", - description: "Name of predictor.", - "x-order": 1, - }, - description: { - type: "string", - description: "Description of predictor.", - "x-order": 2, - }, - status: { - $ref: "#/components/schemas/JobStatus", - }, - created_date: { - $ref: "#/components/schemas/CreatedDate", - }, - model_spec: { - $ref: "#/components/schemas/ModelSpec", - }, - training_dataset: { - type: "object", - required: ["assay_id", "properties"], - properties: { - assay_id: { - $ref: "#/components/schemas/AssayID", - }, - properties: { - type: "array", - items: { - type: "string", - }, - example: ["fitness"], - }, - }, - }, - owner: { - type: "string", - example: "openprotein", - }, - stats: { - $ref: "#/components/schemas/CalibrationStats", - example: null, - }, - calibration_curve: { - $ref: "#/components/schemas/CalibrationCurve", - example: null, - }, - }, + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of predictor.", + "x-order": 0 + }, + "name": { + "type": "string", + "description": "Name of predictor.", + "x-order": 1 + }, + "description": { + "type": "string", + "description": "Description of predictor.", + "x-order": 2 + }, + "status": { + "$ref": "#/components/schemas/JobStatus" + }, + "created_date": { + "$ref": "#/components/schemas/CreatedDate" + }, + "model_spec": { + "$ref": "#/components/schemas/ModelSpec" + }, + "training_dataset": { + "type": "object", + "required": [ + "assay_id", + "properties" + ], + "properties": { + "assay_id": { + "$ref": "#/components/schemas/AssayID" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "fitness" + ] + } + } + }, + "owner": { + "type": "string", + "example": "openprotein" + }, + "stats": { + "$ref": "#/components/schemas/CalibrationStats", + "example": null + }, + "calibration_curve": { + "$ref": "#/components/schemas/CalibrationCurve", + "example": null + } + } }, - TrainPredictor: { - title: "TrainPredictor", - allOf: [ + "TrainPredictor": { + "title": "TrainPredictor", + "allOf": [ { - $ref: "#/components/schemas/BasePredictor", + "$ref": "#/components/schemas/BasePredictor" }, { - title: "object", - properties: { - name: { - type: "string", - example: "My GP Model", - }, - description: { - type: "string", - example: "GP model trained on fitness", - }, - training_dataset: { - $ref: "#/components/schemas/TrainingDataset", - }, - }, - }, - ], + "title": "object", + "properties": { + "name": { + "type": "string", + "example": "My GP Model" + }, + "description": { + "type": "string", + "example": "GP model trained on fitness" + }, + "training_dataset": { + "$ref": "#/components/schemas/TrainingDataset" + } + } + } + ] }, - EnsemblePredictor: { - title: "EnsemblePredictor", - allOf: [ + "EnsemblePredictor": { + "title": "EnsemblePredictor", + "allOf": [ { - $ref: "#/components/schemas/BasePredictor", + "$ref": "#/components/schemas/BasePredictor" }, { - type: "object", - required: ["ensemble_model_ids"], - properties: { - name: { - type: "string", - example: "My Ensemble Model", - }, - description: { - type: "string", - example: "Ensemble model combining datasets.", - }, - ensemble_model_ids: { - title: "Ensemble Model IDs", - description: "Model IDs that constitute the ensemble model.", - type: "array", - items: { - type: "string", - format: "uuid", - }, - }, - }, - }, - ], + "type": "object", + "required": [ + "ensemble_model_ids" + ], + "properties": { + "name": { + "type": "string", + "example": "My Ensemble Model" + }, + "description": { + "type": "string", + "example": "Ensemble model combining datasets." + }, + "ensemble_model_ids": { + "title": "Ensemble Model IDs", + "description": "Model IDs that constitute the ensemble model.", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + } + ] }, - Predictor: { - title: "Predictor", - description: "Predictor metadata, with calibration stats if available.", - oneOf: [ + "Predictor": { + "title": "Predictor", + "description": "Predictor metadata, with calibration stats if available.", + "oneOf": [ { - $ref: "#/components/schemas/TrainPredictor", + "$ref": "#/components/schemas/TrainPredictor" }, { - $ref: "#/components/schemas/EnsemblePredictor", - }, - ], + "$ref": "#/components/schemas/EnsemblePredictor" + } + ] }, - TrainGraph: { - title: "TrainGraph", - description: - "Train graph representing the loss curves for a train job.", - type: "object", - required: ["losses"], - properties: { - measurement_name: { - type: "string", - description: - "Measurement name that was trained for this curve. Empty or null if multitask.", - "x-order": 1, - }, - hyperparam_search_step: { - type: "integer", - description: "Step count in the hyperparameter search grid.", - "x-order": 2, - }, - losses: { - type: "array", - description: "Losses per step in the train graph.", + "TrainGraph": { + "title": "TrainGraph", + "description": "Train graph representing the loss curves for a train job.", + "type": "object", + "required": [ + "losses" + ], + "properties": { + "measurement_name": { + "type": "string", + "description": "Measurement name that was trained for this curve. Empty or null if multitask.", + "x-order": 1 + }, + "hyperparam_search_step": { + "type": "integer", + "description": "Step count in the hyperparameter search grid.", + "x-order": 2 + }, + "losses": { + "type": "array", + "description": "Losses per step in the train graph.", "x-order": 3, - items: { - type: "number", - }, - }, - }, + "items": { + "type": "number" + } + } + } }, - TrainPredictorWithTrainGraph: { - title: "TrainPredictorWithTrainGraph", - description: "Predictor with details of train graph if available.", - allOf: [ + "TrainPredictorWithTrainGraph": { + "title": "TrainPredictorWithTrainGraph", + "description": "Predictor with details of train graph if available.", + "allOf": [ { - $ref: "#/components/schemas/TrainPredictor", + "$ref": "#/components/schemas/TrainPredictor" }, { - type: "object", - properties: { - traingraphs: { - type: "array", - description: "Train graphs in the train job.", - items: { - $ref: "#/components/schemas/TrainGraph", - }, - }, - }, - }, - ], + "type": "object", + "properties": { + "traingraphs": { + "type": "array", + "description": "Train graphs in the train job.", + "items": { + "$ref": "#/components/schemas/TrainGraph" + } + } + } + } + ] }, - TrainedPredictor: { - title: "TrainedPredictor", - oneOf: [ + "TrainedPredictor": { + "title": "TrainedPredictor", + "oneOf": [ { - $ref: "#/components/schemas/TrainPredictorWithTrainGraph", + "$ref": "#/components/schemas/TrainPredictorWithTrainGraph" }, { - $ref: "#/components/schemas/EnsemblePredictor", - }, - ], + "$ref": "#/components/schemas/EnsemblePredictor" + } + ] }, - UpdatePredictorRequest: { - title: "UpdatePredictorRequest", - description: "Request to update a predictor.", - type: "object", - properties: { - name: { - type: "string", - description: "Name of predictor to save.", - }, - description: { - type: "string", - description: "Description of predictor.", - }, + "UpdatePredictorRequest": { + "title": "UpdatePredictorRequest", + "description": "Request to update a predictor.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of predictor to save." + }, + "description": { + "type": "string", + "description": "Description of predictor." + } + } + }, + "TaskHyperparameters": { + "title": "TaskHyperparameters", + "description": "Trained hyperparameters of a single task's Gaussian Process, denormalized to data space. The per-subkernel arrays (lengthscale, outputscale, period, alpha) carry one entry per subkernel, with null where that subkernel does not have the parameter (e.g. a linear kernel has no lengthscale).", + "type": "object", + "properties": { + "mean": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Constant mean of the GP prior." + }, + "noise": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Observation noise variance." + }, + "lengthscale": { + "type": "array", + "items": { + "type": "number", + "format": "double", + "nullable": true + }, + "description": "Per-subkernel lengthscales; null where not applicable." + }, + "outputscale": { + "type": "array", + "items": { + "type": "number", + "format": "double", + "nullable": true + }, + "description": "Outputscales (one per scaled subkernel)." + }, + "period": { + "type": "array", + "items": { + "type": "number", + "format": "double", + "nullable": true + }, + "description": "Per-subkernel period lengths; null where the subkernel is not periodic." + }, + "alpha": { + "type": "array", + "items": { + "type": "number", + "format": "double", + "nullable": true + }, + "description": "Per-subkernel rational-quadratic alpha; null where the subkernel is not rational-quadratic." + } + } + }, + "Hyperparameters": { + "title": "Hyperparameters", + "description": "Trained hyperparameters keyed by measurement name.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TaskHyperparameters" }, + "example": { + "measurement_1": { + "mean": 0.12, + "noise": 0.03, + "lengthscale": [ + 0.8 + ], + "outputscale": [ + 2.1 + ], + "period": [ + null + ], + "alpha": [ + null + ] + } + } }, - CrossvalidateJob: { - title: "CrossvalidateJob", - description: "Crossvalidate job.", - allOf: [ + "CrossvalidateJob": { + "title": "CrossvalidateJob", + "description": "Crossvalidate job.", + "allOf": [ { - $ref: "#/components/schemas/Job", + "$ref": "#/components/schemas/Job" }, { - type: "object", - required: ["job_type", "model_id", "n_splits"], - properties: { - job_type: { - type: "string", - example: "/predictor/crossvalidate", - }, - model_id: { - type: "string", - format: "uuid", - }, - n_splits: { - type: "integer", - example: 5, - }, - }, - }, - ], - }, - Sequence: { - title: "Sequence", - description: "Protein sequence", - type: "string", - example: "MSKGEELFTGV", + "type": "object", + "required": [ + "job_type", + "model_id", + "n_splits" + ], + "properties": { + "job_type": { + "type": "string", + "example": "/predictor/crossvalidate" + }, + "model_id": { + "type": "string", + "format": "uuid" + }, + "n_splits": { + "type": "integer", + "example": 5 + } + } + } + ] }, - PredictRequest: { - title: "PredictRequest", - description: "Request to run predictions using a trained predictor.", - type: "object", - required: ["sequences"], - properties: { - sequences: { - title: "Sequences", - type: "array", - items: { - $ref: "#/components/schemas/Sequence", - }, - }, - }, + "Sequence": { + "title": "Sequence", + "description": "Protein sequence", + "type": "string", + "example": "MSKGEELFTGV" }, - PredictSingleSiteRequest: { - title: "PredictSingleSiteRequest", - description: - "Request to run single site predictions using a trained predictor.", - type: "object", - required: ["base_sequence"], - properties: { - base_sequence: { - title: "Base Sequence", - $ref: "#/components/schemas/Sequence", - }, - }, + "PredictRequest": { + "title": "PredictRequest", + "description": "Request to run predictions using a trained predictor.", + "type": "object", + "required": [ + "sequences" + ], + "properties": { + "sequences": { + "title": "Sequences", + "type": "array", + "items": { + "$ref": "#/components/schemas/Sequence" + } + } + } }, - PredictMultiRequest: { - title: "PredictMultiRequest", - description: "Request to run multi-model predictions.", - type: "object", - required: ["model_ids", "sequences"], - properties: { - model_ids: { - title: "Model IDs", - type: "array", - items: { - type: "string", - format: "uuid", - }, - }, - sequences: { - title: "Sequences", - type: "array", - items: { - $ref: "#/components/schemas/Sequence", - }, - }, - }, + "PredictSingleSiteRequest": { + "title": "PredictSingleSiteRequest", + "description": "Request to run single site predictions using a trained predictor.", + "type": "object", + "required": [ + "base_sequence" + ], + "properties": { + "base_sequence": { + "title": "Base Sequence", + "$ref": "#/components/schemas/Sequence" + } + } }, - PredictSingleSiteMultiRequest: { - title: "PredictSingleSiteMultiRequest", - description: "Request to run multi-model single-site predictions.", - type: "object", - required: ["model_ids", "base_sequence"], - properties: { - model_ids: { - title: "Model IDs", - type: "array", - items: { - type: "string", - format: "uuid", - }, - }, - base_sequence: { - title: "Base Sequence", - $ref: "#/components/schemas/Sequence", - }, - }, + "PredictMultiRequest": { + "title": "PredictMultiRequest", + "description": "Request to run multi-model predictions.", + "type": "object", + "required": [ + "model_ids", + "sequences" + ], + "properties": { + "model_ids": { + "title": "Model IDs", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "sequences": { + "title": "Sequences", + "type": "array", + "items": { + "$ref": "#/components/schemas/Sequence" + } + } + } }, - }, + "PredictSingleSiteMultiRequest": { + "title": "PredictSingleSiteMultiRequest", + "description": "Request to run multi-model single-site predictions.", + "type": "object", + "required": [ + "model_ids", + "base_sequence" + ], + "properties": { + "model_ids": { + "title": "Model IDs", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "base_sequence": { + "title": "Base Sequence", + "$ref": "#/components/schemas/Sequence" + } + } + } + } }, - tags: [ + "tags": [ { - name: "predictor", - description: - "Train and use predictor to predict properties for your sequences", - }, - ], + "name": "predictor", + "description": "Train and use predictor to predict properties for your sequences" + } + ] }; export default predictorSpec; diff --git a/source/_static/js/promptSpec.js b/source/_static/js/promptSpec.js index d2e009a..feeee3a 100644 --- a/source/_static/js/promptSpec.js +++ b/source/_static/js/promptSpec.js @@ -1,1365 +1,1373 @@ const promptSpec = { - openapi: "3.0.2", - info: { - title: "OpenProtein Prompt", - description: - "# Prompt API\nThe Prompt API provided by OpenProtein.ai allows you to construct and upload prompts to use with our PoET models.\n", - version: "1.0.0", + "openapi": "3.0.2", + "info": { + "title": "OpenProtein Prompt", + "description": "# Prompt API\nThe Prompt API provided by OpenProtein.ai allows you to construct and upload prompts to use with our PoET models.\n", + "version": "1.0.0" }, - paths: { + "paths": { "/api/v1/prompt/create_prompt": { - post: { - tags: ["Prompt"], - summary: "Create a prompt", - description: - "Create a prompt with provided context and query.\n\nThis endpoint accepts a list of files as context.\n", - operationId: "createPrompt", - requestBody: { - required: true, - content: { + "post": { + "tags": [ + "Prompt" + ], + "summary": "Create a prompt", + "description": "Create a prompt with provided context and query.\n\nThis endpoint accepts a list of files as context.\n", + "operationId": "createPrompt", + "requestBody": { + "required": true, + "content": { "multipart/form-data": { - schema: { - type: "object", - required: ["context"], - properties: { - name: { - type: "string", + "schema": { + "type": "object", + "required": [ + "context" + ], + "properties": { + "name": { + "type": "string" }, - description: { - type: "string", - nullable: true, - default: null, + "description": { + "type": "string", + "nullable": true, + "default": null }, - project_uuid: { - type: "string", - format: "uuid", - description: - "Optional project UUID to attach the prompt to.", + "project_uuid": { + "type": "string", + "format": "uuid", + "description": "Optional project UUID to attach the prompt to." }, - context: { - type: "array", - items: { - type: "string", - format: "binary", + "context": { + "type": "array", + "items": { + "type": "string", + "format": "binary" }, - description: - "A list of zip files, where the i'th file specifies the data\nfor the i'th context in the prompt. Each zip file may\ncontain: \n - fasta files containing lists of sequences\n - cif structure files\nThe file extensions of the zipped files have to match.\n", - }, - }, - }, - }, - }, + "description": "A list of zip files, where the i'th file specifies the data\nfor the i'th context in the prompt. Each zip file may\ncontain: \n - fasta files containing lists of sequences\n - cif structure files\nThe file extensions of the zipped files have to match.\n" + } + } + } + } + } }, - responses: { - 200: { - description: "Prompt created successfully.", - content: { + "responses": { + "200": { + "description": "Prompt created successfully.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/PromptMetadata", - }, - }, - }, - }, - 400: { - description: "Invalid input provided.", - content: { + "schema": { + "$ref": "#/components/schemas/PromptMetadata" + } + } + } + }, + "400": { + "description": "Invalid input provided.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/prompt": { - get: { - tags: ["Prompt"], - summary: "List prompts", - description: "List prompts available.\n", - operationId: "listPrompts", - parameters: [ + "get": { + "tags": [ + "Prompt" + ], + "summary": "List prompts", + "description": "List prompts available.\n", + "operationId": "listPrompts", + "parameters": [ { - name: "project_uuid", - in: "query", - description: "Optional project UUID to filter prompts by.", - required: false, - schema: { - type: "string", - format: "uuid", - }, + "name": "project_uuid", + "in": "query", + "description": "Optional project UUID to filter prompts by.", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } }, { - name: "scope", - in: "query", - description: - "Restrict the listing to the caller's own prompts (`mine`, the\ndefault), platform system prompts (`system`), or both (`all`).", - required: false, - schema: { - type: "string", - enum: ["mine", "system", "all"], - default: "mine", - }, + "name": "scope", + "in": "query", + "description": "Restrict the listing to the caller's own prompts (`mine`, the\ndefault), platform system prompts (`system`), or both (`all`).", + "required": false, + "schema": { + "type": "string", + "enum": [ + "mine", + "system", + "all" + ], + "default": "mine" + } }, { - name: "search", - in: "query", - description: - "Case-insensitive substring matched against prompt name and description.", - required: false, - schema: { - type: "string", - }, + "name": "search", + "in": "query", + "description": "Case-insensitive substring matched against prompt name and description.", + "required": false, + "schema": { + "type": "string" + } }, { - name: "page_size", - in: "query", - description: "Maximum number of prompts to return.", - required: false, - schema: { - type: "integer", - default: 1024, - }, + "name": "page_size", + "in": "query", + "description": "Maximum number of prompts to return.", + "required": false, + "schema": { + "type": "integer", + "default": 1024 + } }, { - name: "page_offset", - in: "query", - description: "Number of prompts to skip before returning results.", - required: false, - schema: { - type: "integer", - default: 0, - }, - }, + "name": "page_offset", + "in": "query", + "description": "Number of prompts to skip before returning results.", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + } ], - responses: { - 200: { - description: "List of prompts", - content: { + "responses": { + "200": { + "description": "List of prompts", + "content": { "application/json": { - schema: { - description: "List of prompts", - type: "array", - items: { - $ref: "#/components/schemas/PromptMetadata", - }, - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { + "schema": { + "description": "List of prompts", + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptMetadata" + } + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/prompt/query": { - get: { - tags: ["Query"], - summary: "List queries", - description: "List queries available.\n", - operationId: "listQueries", - parameters: [ + "get": { + "tags": [ + "Query" + ], + "summary": "List queries", + "description": "List queries available.\n", + "operationId": "listQueries", + "parameters": [ { - name: "project_uuid", - in: "query", - description: "Optional project UUID to filter queries by.", - required: false, - schema: { - type: "string", - format: "uuid", - }, - }, + "name": "project_uuid", + "in": "query", + "description": "Optional project UUID to filter queries by.", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - responses: { - 200: { - description: "List of queries", - content: { + "responses": { + "200": { + "description": "List of queries", + "content": { "application/json": { - schema: { - description: "List of queries", - type: "array", - items: { - $ref: "#/components/schemas/QueryMetadata", - }, - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { + "schema": { + "description": "List of queries", + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryMetadata" + } + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], + "oauth2": [] + } + ] }, - post: { - tags: ["Query"], - summary: "Create a query", - description: - "Create a query to be used to augment prompts for queries.\n\nThis endpoint accepts a single file as a query.\n", - operationId: "createQuery", - requestBody: { - required: true, - content: { + "post": { + "tags": [ + "Query" + ], + "summary": "Create a query", + "description": "Create a query to be used to augment prompts for queries.\n\nThis endpoint accepts a single file as a query.\n", + "operationId": "createQuery", + "requestBody": { + "required": true, + "content": { "multipart/form-data": { - schema: { - type: "object", - required: ["query"], - properties: { - project_uuid: { - type: "string", - format: "uuid", - description: - "Optional project UUID to attach the query to.", - }, - query: { - type: "string", - format: "binary", - description: - "A file specifying the query.\nThe file may be a specify a sequence (fasta) or a\nstructure (cif). The file extension have to match.\n", + "schema": { + "type": "object", + "required": [ + "query" + ], + "properties": { + "project_uuid": { + "type": "string", + "format": "uuid", + "description": "Optional project UUID to attach the query to." }, - }, - }, - }, - }, + "query": { + "type": "string", + "format": "binary", + "description": "A file specifying the query.\nThe file may be a specify a sequence (fasta) or a\nstructure (cif). The file extension have to match.\n" + } + } + } + } + } }, - responses: { - 200: { - description: "Query created successfully.", - content: { + "responses": { + "200": { + "description": "Query created successfully.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/QueryMetadata", - }, - }, - }, - }, - 400: { - description: "Invalid input provided.", - content: { + "schema": { + "$ref": "#/components/schemas/QueryMetadata" + } + } + } + }, + "400": { + "description": "Invalid input provided.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/prompt/query/{query_id}": { - get: { - tags: ["Query"], - summary: "Get query metadata", - description: "Get metadata of a query.", - parameters: [ + "get": { + "tags": [ + "Query" + ], + "summary": "Get query metadata", + "description": "Get metadata of a query.", + "parameters": [ { - name: "query_id", - in: "path", - description: "Query ID to fetch metadata", - required: true, - schema: { - type: "string", - format: "uuid", - }, - }, + "name": "query_id", + "in": "path", + "description": "Query ID to fetch metadata", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - operationId: "getQueryMetadata", - responses: { - 200: { - description: "The metadata of the query.", - content: { + "operationId": "getQueryMetadata", + "responses": { + "200": { + "description": "The metadata of the query.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/QueryMetadata", - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { + "schema": { + "$ref": "#/components/schemas/QueryMetadata" + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Query not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Query not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], + "oauth2": [] + } + ] }, - put: { - tags: ["Query"], - summary: "Update query metadata", - description: - "Update the project attachment of a query.\n\nOnly the fields provided in the request body are changed; fields that\nare omitted retain their existing value. Nullable fields may be cleared\nby passing an explicit null value.", - parameters: [ + "put": { + "tags": [ + "Query" + ], + "summary": "Update query metadata", + "description": "Update the project attachment of a query.\n\nOnly the fields provided in the request body are changed; fields that\nare omitted retain their existing value. Nullable fields may be cleared\nby passing an explicit null value.", + "parameters": [ { - name: "query_id", - in: "path", - description: "Query ID to update", - required: true, - schema: { - type: "string", - format: "uuid", - }, - }, + "name": "query_id", + "in": "path", + "description": "Query ID to update", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - operationId: "updateQuery", - requestBody: { - description: "Fields to update on the query.", - required: true, - content: { + "operationId": "updateQuery", + "requestBody": { + "description": "Fields to update on the query.", + "required": true, + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/QueryUpdate", - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/QueryUpdate" + } + } + } }, - responses: { - 200: { - description: "The updated query metadata.", - content: { + "responses": { + "200": { + "description": "The updated query metadata.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/QueryMetadata", - }, - }, - }, - }, - 400: { - description: "Invalid input provided.", - content: { + "schema": { + "$ref": "#/components/schemas/QueryMetadata" + } + } + } + }, + "400": { + "description": "Invalid input provided.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Query not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Query not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/prompt/query/{query_id}/content": { - get: { - tags: ["Query"], - summary: "Get query content", - description: - "Get content of query by downloading the uploaded query file.", - parameters: [ + "get": { + "tags": [ + "Query" + ], + "summary": "Get query content", + "description": "Get content of query by downloading the uploaded query file.", + "parameters": [ { - name: "query_id", - in: "path", - description: "Query ID to fetch", - required: true, - schema: { - type: "string", - format: "uuid", - }, - }, + "name": "query_id", + "in": "path", + "description": "Query ID to fetch", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - operationId: "getQuery", - responses: { - 200: { - description: - "The query file in either fasta or cif format depending on whether a sequence or structure was uploaded.", - content: { + "operationId": "getQuery", + "responses": { + "200": { + "description": "The query file in either fasta or cif format depending on whether a sequence or structure was uploaded.", + "content": { "text/x-fasta": { - schema: { - type: "string", - format: "binary", - example: "", - }, + "schema": { + "type": "string", + "format": "binary", + "example": "" + } }, "chemical/x-mmcif": { - schema: { - type: "string", - format: "binary", - example: "", - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { + "schema": { + "type": "string", + "format": "binary", + "example": "" + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Query not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Query not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/prompt/{prompt_id}": { - get: { - tags: ["Prompt"], - summary: "Get prompt metadata", - description: "Get metadata of a prompt.", - parameters: [ + "get": { + "tags": [ + "Prompt" + ], + "summary": "Get prompt metadata", + "description": "Get metadata of a prompt.", + "parameters": [ { - name: "prompt_id", - in: "path", - description: "Prompt ID to fetch metadata", - required: true, - schema: { - type: "string", - format: "uuid", - }, - }, + "name": "prompt_id", + "in": "path", + "description": "Prompt ID to fetch metadata", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - operationId: "getPromptMetadata", - responses: { - 200: { - description: "The metadata of the prompt.", - content: { + "operationId": "getPromptMetadata", + "responses": { + "200": { + "description": "The metadata of the prompt.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/PromptMetadata", - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { + "schema": { + "$ref": "#/components/schemas/PromptMetadata" + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Prompt not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Prompt not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], + "oauth2": [] + } + ] }, - put: { - tags: ["Prompt"], - summary: "Update prompt metadata", - description: - "Update the name, description, or project attachment of a prompt.\n\nOnly the fields provided in the request body are changed; fields that\nare omitted retain their existing value. Nullable fields may be cleared\nby passing an explicit null value.", - parameters: [ + "put": { + "tags": [ + "Prompt" + ], + "summary": "Update prompt metadata", + "description": "Update the name, description, or project attachment of a prompt.\n\nOnly the fields provided in the request body are changed; fields that\nare omitted retain their existing value. Nullable fields may be cleared\nby passing an explicit null value.", + "parameters": [ { - name: "prompt_id", - in: "path", - description: "Prompt ID to update", - required: true, - schema: { - type: "string", - format: "uuid", - }, - }, + "name": "prompt_id", + "in": "path", + "description": "Prompt ID to update", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - operationId: "updatePrompt", - requestBody: { - description: "Fields to update on the prompt.", - required: true, - content: { + "operationId": "updatePrompt", + "requestBody": { + "description": "Fields to update on the prompt.", + "required": true, + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/PromptUpdate", - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/PromptUpdate" + } + } + } }, - responses: { - 200: { - description: "The updated prompt metadata.", - content: { + "responses": { + "200": { + "description": "The updated prompt metadata.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/PromptMetadata", - }, - }, - }, - }, - 400: { - description: "Invalid input provided.", - content: { + "schema": { + "$ref": "#/components/schemas/PromptMetadata" + } + } + } + }, + "400": { + "description": "Invalid input provided.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 403: { - description: - "The target prompt is a platform system prompt and cannot be modified.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "The target prompt is a platform system prompt and cannot be modified.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Prompt not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Prompt not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/prompt/{prompt_id}/content": { - get: { - tags: ["Prompt"], - summary: "Get prompt content", - description: - "Get content of prompt by downloading the uploaded context files in a single zip.", - parameters: [ + "get": { + "tags": [ + "Prompt" + ], + "summary": "Get prompt content", + "description": "Get content of prompt by downloading the uploaded context files in a single zip.", + "parameters": [ { - name: "prompt_id", - in: "path", - description: "Prompt ID to fetch", - required: true, - schema: { - type: "string", - format: "uuid", - }, - }, + "name": "prompt_id", + "in": "path", + "description": "Prompt ID to fetch", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - operationId: "getPrompt", - responses: { - 200: { - description: - "The prompt containing the context files in a zip file.", - content: { + "operationId": "getPrompt", + "responses": { + "200": { + "description": "The prompt containing the context files in a zip file.", + "content": { "application/zip": { - schema: { - type: "string", - format: "binary", - example: "", - }, - }, - }, - }, - 401: { - description: - "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", - content: { + "schema": { + "type": "string", + "format": "binary", + "example": "" + } + } + } + }, + "401": { + "description": "Bad or expired token. This can happen if the token is revoked or expired. User should re-authenticate with their credentials.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Prompt not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Prompt not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/prompt/edit_protein": { - post: { - tags: ["Structure"], - summary: "Edit protein structure", - description: - 'Edit a Protein object by specifying aligned reference and new sequences, and a structure mask.\nHandles insertions, deletions, point mutations, and structure masking.\n\n**Advanced Multi-File Support:**\nInstead of passing a single `protein` file, you may supply multiple files into the `structures` array\nand provide a `config` JSON string to control how they are edited and grouped. By using `config`,\nyou can:\n- Construct 3D rigid bodies (groups) from multiple disparate chains.\n- Introduce sequence-only chains.\n- Rename chain IDs dynamically to avoid collisions natively.\n- Apply unique sequences, structure masks, binding tracks, and pLDDT overrides to any chains within the group structure.\n\nExample `config` JSON payload:\n```json\n{\n "groups": [\n {\n "structures": [\n {\n "file_index": 0,\n "chain_ids": {"A": "X", "B": "Y"},\n "edits": {\n "X": {\n "reference_sequence": "ACDEFG",\n "new_sequence": "ACHEFG",\n "structure_mask": "SSXSSS",\n "binding": "UUBUUU",\n "plddt": 72.5\n }\n }\n }\n ],\n "sequences": [\n {\n "sequence": "ACDEF",\n "chain_id": "Z"\n }\n ]\n }\n ]\n}\n```\n\n**Config Field Details:**\n- **`groups`**: An array where each item defines a rigid-body group. All structures and sequences within the same group will have their relative positions fixed.\n- **`file_index`**: The integer index of the file in the `structures` array. `0` refers to the first file uploaded.\n- **`chain_ids` (optional)**: Renames chains from the input structure. A mapping of `{"original_id": "new_id"}`.\n If provided, this acts as an **explicit inclusion list**: only chains mapped here will be extracted.\n Unmapped chains are ignored. Map a chain to itself (e.g., `{"A": "A"}`) to keep it without renaming.\n- **`edits` (optional)**: Specifies modifications to be applied to specific chains (by their assigned ID). Each chain edit can describe all residue-level outputs for that chain:\n - **Sequence edit** via `reference_sequence` and `new_sequence`\n - **Structure edit** via `structure_mask`\n - **Binding edit** via `binding`, an aligned string using `B` (binding), `N` (not binding), `U` (unknown), and `-` (deleted / no residue)\n - **pLDDT override** via `plddt`, a scalar from `0` to `100` applied to final residues with known CA coordinates. Residues without structure keep `NaN`.\n- **`sequences`**: Used to supply sequence-only protein chains directly as strings without a structure file.\n\nLegacy single-file usage (via `protein`, `reference_sequence`, `new_sequence`, and `structure_mask`) remains fully supported if `config` and `structures` are omitted.\n', - operationId: "editProteinStructure", - requestBody: { - required: true, - content: { + "post": { + "tags": [ + "Structure" + ], + "summary": "Edit protein structure", + "description": "Edit a Protein object by specifying aligned reference and new sequences, and a structure mask.\nHandles insertions, deletions, point mutations, and structure masking.\n\n**Advanced Multi-File Support:**\nInstead of passing a single `protein` file, you may supply multiple files into the `structures` array\nand provide a `config` JSON string to control how they are edited and grouped. By using `config`,\nyou can:\n- Construct 3D rigid bodies (groups) from multiple disparate chains.\n- Introduce sequence-only chains.\n- Rename chain IDs dynamically to avoid collisions natively.\n- Apply unique sequences, structure masks, binding tracks, and pLDDT overrides to any chains within the group structure.\n\nExample `config` JSON payload:\n```json\n{\n \"groups\": [\n {\n \"structures\": [\n {\n \"file_index\": 0,\n \"chain_ids\": {\"A\": \"X\", \"B\": \"Y\"},\n \"edits\": {\n \"X\": {\n \"reference_sequence\": \"ACDEFG\",\n \"new_sequence\": \"ACHEFG\",\n \"structure_mask\": \"SSXSSS\",\n \"binding\": \"UUBUUU\",\n \"plddt\": 72.5\n }\n }\n }\n ],\n \"sequences\": [\n {\n \"sequence\": \"ACDEF\",\n \"chain_id\": \"Z\"\n }\n ]\n }\n ]\n}\n```\n\n**Config Field Details:**\n- **`groups`**: An array where each item defines a rigid-body group. All structures and sequences within the same group will have their relative positions fixed.\n- **`file_index`**: The integer index of the file in the `structures` array. `0` refers to the first file uploaded.\n- **`chain_ids` (optional)**: Renames chains from the input structure. A mapping of `{\"original_id\": \"new_id\"}`.\n If provided, this acts as an **explicit inclusion list**: only chains mapped here will be extracted.\n Unmapped chains are ignored. Map a chain to itself (e.g., `{\"A\": \"A\"}`) to keep it without renaming.\n- **`edits` (optional)**: Specifies modifications to be applied to specific chains (by their assigned ID). Each chain edit can describe all residue-level outputs for that chain:\n - **Sequence edit** via `reference_sequence` and `new_sequence`\n - **Structure edit** via `structure_mask`\n - **Binding edit** via `binding`, an aligned string using `B` (binding), `N` (not binding), `U` (unknown), and `-` (deleted / no residue)\n - **pLDDT override** via `plddt`, a scalar from `0` to `100` applied to final residues with known CA coordinates. Residues without structure keep `NaN`.\n- **`sequences`**: Used to supply sequence-only protein chains directly as strings without a structure file.\n\nLegacy single-file usage (via `protein`, `reference_sequence`, `new_sequence`, and `structure_mask`) remains fully supported if `config` and `structures` are omitted.\n", + "operationId": "editProteinStructure", + "requestBody": { + "required": true, + "content": { "multipart/form-data": { - schema: { - type: "object", - properties: { - protein: { - type: "string", - format: "binary", - description: "CIF file containing the protein structure.", + "schema": { + "type": "object", + "properties": { + "protein": { + "type": "string", + "format": "binary", + "description": "CIF file containing the protein structure." }, - reference_sequence: { - type: "string", - description: 'Reference sequence (may include "-").', + "reference_sequence": { + "type": "string", + "description": "Reference sequence (may include \"-\")." }, - new_sequence: { - type: "string", - description: 'New sequence (may include "-").', + "new_sequence": { + "type": "string", + "description": "New sequence (may include \"-\")." }, - structure_mask: { - type: "string", - description: 'String of "S" and "X" for structure masking.', + "structure_mask": { + "type": "string", + "description": "String of \"S\" and \"X\" for structure masking." }, - structures: { - type: "array", - items: { - type: "string", - format: "binary", + "structures": { + "type": "array", + "items": { + "type": "string", + "format": "binary" }, - description: - "Array of CIF or PDB files containing protein structures.", + "description": "Array of CIF or PDB files containing protein structures." }, - config: { - description: "Configuration for groups and edits.", - allOf: [ + "config": { + "description": "Configuration for groups and edits.", + "allOf": [ { - $ref: "#/components/schemas/EditProteinConfig", - }, - ], - }, - }, - }, - }, - }, + "$ref": "#/components/schemas/EditProteinConfig" + } + ] + } + } + } + } + } }, - responses: { - 200: { - description: "Edited protein CIF file", - content: { + "responses": { + "200": { + "description": "Edited protein CIF file", + "content": { "chemical/x-mmcif": { - schema: { - type: "string", - format: "binary", - }, - }, - }, - }, - 400: { - description: "Invalid input", - content: { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Invalid input", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/prompt/extract_chain": { - post: { - tags: ["Structure"], - summary: "Extract chain", - description: "Extract chain from protein complex.\n", - operationId: "extractChain", - requestBody: { - required: true, - content: { + "post": { + "tags": [ + "Structure" + ], + "summary": "Extract chain", + "description": "Extract chain from protein complex.\n", + "operationId": "extractChain", + "requestBody": { + "required": true, + "content": { "multipart/form-data": { - schema: { - type: "object", - properties: { - protein: { - type: "string", - format: "binary", - description: "CIF file containing the protein complex.", - }, - chain_id: { - type: "string", - description: "Chain ID to extract from protein file.", + "schema": { + "type": "object", + "properties": { + "protein": { + "type": "string", + "format": "binary", + "description": "CIF file containing the protein complex." }, - use_bfactor_as_plddt: { - type: "boolean", - description: "Use bfactor as pLDDT.", + "chain_id": { + "type": "string", + "description": "Chain ID to extract from protein file." }, + "use_bfactor_as_plddt": { + "type": "boolean", + "description": "Use bfactor as pLDDT." + } }, - required: ["protein", "chain_id", "use_bfactor_as_plddt"], - }, - }, - }, + "required": [ + "protein", + "chain_id", + "use_bfactor_as_plddt" + ] + } + } + } }, - responses: { - 200: { - description: "Extracted protein as CIF file.", - content: { + "responses": { + "200": { + "description": "Extracted protein as CIF file.", + "content": { "chemical/x-mmcif": { - schema: { - type: "string", - format: "binary", - }, - }, - }, - }, - 400: { - description: "Invalid input", - content: { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Invalid input", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/prompt/normalize_structure": { - post: { - tags: ["Structure"], - summary: "Normalize a protein structure file", - description: - "Normalize a protein structure by converting it into standardized CIF format.\nSupports input in both PDB and CIF formats.", - operationId: "normalizeStructure", - requestBody: { - required: true, - content: { + "post": { + "tags": [ + "Structure" + ], + "summary": "Normalize a protein structure file", + "description": "Normalize a protein structure by converting it into standardized CIF format.\nSupports input in both PDB and CIF formats.", + "operationId": "normalizeStructure", + "requestBody": { + "required": true, + "content": { "multipart/form-data": { - schema: { - type: "object", - required: ["protein"], - properties: { - protein: { - type: "string", - format: "binary", - description: "Protein structure file in PDB or CIF format.", - }, - plddt: { - type: "string", - description: - "Optional scalar pLDDT override applied to all atoms in the normalized CIF output. Provide a number between 0 and 100 inclusive.", + "schema": { + "type": "object", + "required": [ + "protein" + ], + "properties": { + "protein": { + "type": "string", + "format": "binary", + "description": "Protein structure file in PDB or CIF format." }, - }, - }, - }, - }, + "plddt": { + "type": "string", + "description": "Optional scalar pLDDT override applied to all atoms in the normalized CIF output. Provide a number between 0 and 100 inclusive." + } + } + } + } + } }, - responses: { - 200: { - description: "Normalized protein CIF file.", - content: { + "responses": { + "200": { + "description": "Normalized protein CIF file.", + "content": { "chemical/x-mmcif": { - schema: { - type: "string", - format: "binary", - }, - }, - }, - }, - 400: { - description: "Invalid input", - content: { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Invalid input", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/prompt/sequence_align_batch": { - post: { - tags: ["Align"], - summary: - "Batch sequence alignment and identity computation (Streaming)", - description: - "Align the query sequence against each target sequence using pairwise alignment\nand compute sequence identity.\n\n**Streaming Endpoint:** Returns a stream of JSON objects (NDJSON), where each line\ncorresponds to one target sequence in the order provided.", - operationId: "sequenceAlignBatch", - requestBody: { - required: true, - content: { + "post": { + "tags": [ + "Align" + ], + "summary": "Batch sequence alignment and identity computation (Streaming)", + "description": "Align the query sequence against each target sequence using pairwise alignment\nand compute sequence identity.\n\n**Streaming Endpoint:** Returns a stream of JSON objects (NDJSON), where each line\ncorresponds to one target sequence in the order provided.", + "operationId": "sequenceAlignBatch", + "requestBody": { + "required": true, + "content": { "application/json": { - schema: { - type: "object", - required: ["query_sequence", "target_sequences"], - properties: { - query_sequence: { - type: "string", - description: - "Query protein sequence (single-letter amino acid codes).\nUse `:` to separate chains of a multichain query; target sequences\nmust then have the same number of chains, aligned chain-by-position.", + "schema": { + "type": "object", + "required": [ + "query_sequence", + "target_sequences" + ], + "properties": { + "query_sequence": { + "type": "string", + "description": "Query protein sequence (single-letter amino acid codes).\nUse `:` to separate chains of a multichain query; target sequences\nmust then have the same number of chains, aligned chain-by-position." }, - target_sequences: { - type: "array", - items: { - type: "string", + "target_sequences": { + "type": "array", + "items": { + "type": "string" }, - description: - "List of target protein sequences. Each entry may be multichain\nusing `:` separators; its chain count must match the query.", - }, - return_alignment: { - type: "boolean", - description: - "Whether to return aligned query and target sequences as tuples.", - default: false, + "description": "List of target protein sequences. Each entry may be multichain\nusing `:` separators; its chain count must match the query." }, - }, + "return_alignment": { + "type": "boolean", + "description": "Whether to return aligned query and target sequences as tuples.", + "default": false + } + } }, - example: { - query_sequence: "MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ", - target_sequences: [ + "example": { + "query_sequence": "MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ", + "target_sequences": [ "MKTAYIAKQRQISFVKSHFSRQLDERLGLIEVQ", - "ARNMKTAYIAKQRQISYVKSHFSRQLDERLGLIEVQ", + "ARNMKTAYIAKQRQISYVKSHFSRQLDERLGLIEVQ" ], - return_alignment: true, - }, - }, - }, + "return_alignment": true + } + } + } }, - responses: { - 200: { - description: - "Stream of sequence identities (and optionally alignments).\nEach line is a JSON object representing the result for a single target.", - content: { + "responses": { + "200": { + "description": "Stream of sequence identities (and optionally alignments).\nEach line is a JSON object representing the result for a single target.", + "content": { "application/x-ndjson": { - schema: { - type: "object", - properties: { - identity: { - type: "number", - format: "float", - description: - "Sequence identity for this target, normalized to alignment length (0-1).", + "schema": { + "type": "object", + "properties": { + "identity": { + "type": "number", + "format": "float", + "description": "Sequence identity for this target, normalized to alignment length (0-1)." }, - alignment: { - type: "array", - items: { - type: "string", + "alignment": { + "type": "array", + "items": { + "type": "string" }, - description: - "Tuple of (aligned_query_sequence, aligned_target_sequence).\nFor multichain inputs, chains are joined with `:` within each\naligned string in the same order as the query chains.\nPresent if `return_alignment=true`.", - }, + "description": "Tuple of (aligned_query_sequence, aligned_target_sequence).\nFor multichain inputs, chains are joined with `:` within each\naligned string in the same order as the query chains.\nPresent if `return_alignment=true`." + } }, - example: { - identity: 0.97, - alignment: [ + "example": { + "identity": 0.97, + "alignment": [ "MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ", - "MKTAYIAKQRQISFVKSHFSRQLDERLGLIEVQ", - ], - }, - }, - }, - }, - }, - 400: { - description: "Invalid input provided.", - content: { + "MKTAYIAKQRQISFVKSHFSRQLDERLGLIEVQ" + ] + } + } + } + } + }, + "400": { + "description": "Invalid input provided.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/prompt/structure_align_batch_by_id": { - post: { - tags: ["Align"], - summary: "Batch structure alignment using specified method (Streaming)", - description: - "Perform structure-based alignment between query structures and targets.\n\nExactly one of `protein` or `design_id` must be provided as the query.\nWhen `design_id` is given, it references a fold job with N design\nstructures, and `targets_id` must contain a positive multiple of N\nstructures. Design `i` is aligned against `targets[i*k : (i+1)*k]`\nwhere `k = len(targets) / len(designs)`. Each result row carries a\n`design_index` (0-indexed) so callers can regroup the stream.\n\n**Streaming Endpoint:** Returns a stream of JSON objects (NDJSON), where each line\ncorresponds to one (query, target) pair.", - operationId: "structureAlignBatchById", - requestBody: { - required: true, - content: { + "post": { + "tags": [ + "Align" + ], + "summary": "Batch structure alignment using specified method (Streaming)", + "description": "Perform structure-based alignment between query structures and targets.\n\nExactly one of `protein` or `design_id` must be provided as the query.\nWhen `design_id` is given, it references a fold job with N design\nstructures, and `targets_id` must contain a positive multiple of N\nstructures. Design `i` is aligned against `targets[i*k : (i+1)*k]`\nwhere `k = len(targets) / len(designs)`. Each result row carries a\n`design_index` (0-indexed) so callers can regroup the stream.\n\n**Streaming Endpoint:** Returns a stream of JSON objects (NDJSON), where each line\ncorresponds to one (query, target) pair.", + "operationId": "structureAlignBatchById", + "requestBody": { + "required": true, + "content": { "multipart/form-data": { - schema: { - type: "object", - required: [ + "schema": { + "type": "object", + "required": [ "targets_id", "method", "return_transform", "return_alignment", "return_identities", - "return_plddt", + "return_plddt" ], - properties: { - protein: { - type: "string", - format: "binary", - description: - "CIF or PDB file containing the query structure. All protein\nchains in the file are used; non-protein chains are filtered\nor rejected per the service's `REJECT_NON_PROTEIN_CHAINS`\nsetting. Targets must have matching chain ids.\nMutually exclusive with `design_id`; exactly one of the two\nmust be provided.", + "properties": { + "protein": { + "type": "string", + "format": "binary", + "description": "CIF or PDB file containing the query structure. All protein\nchains in the file are used; non-protein chains are filtered\nor rejected per the service's `REJECT_NON_PROTEIN_CHAINS`\nsetting. Targets must have matching chain ids.\nMutually exclusive with `design_id`; exactly one of the two\nmust be provided." }, - design_id: { - type: "string", - format: "uuid", - description: - "Fold job ID referencing a **collection** of N query\nstructures (e.g. designs from RFdiffusion or BoltzGen).\nWhen provided, `targets_id` must contain N*k structures\nand design `i` is aligned against `targets[i*k:(i+1)*k]`.\nMutually exclusive with `protein`; exactly one of the two\nmust be provided.", + "design_id": { + "type": "string", + "format": "uuid", + "description": "Fold job ID referencing a **collection** of N query\nstructures (e.g. designs from RFdiffusion or BoltzGen).\nWhen provided, `targets_id` must contain N*k structures\nand design `i` is aligned against `targets[i*k:(i+1)*k]`.\nMutually exclusive with `protein`; exactly one of the two\nmust be provided." }, - targets_id: { - type: "string", - format: "uuid", - description: - "Target ID referencing a **collection** of structures to align against.", + "targets_id": { + "type": "string", + "format": "uuid", + "description": "Target ID referencing a **collection** of structures to align against." }, - method: { - type: "string", - description: - 'The alignment method to use. Supported values are "kabsch", "nwalign", and "tmalign".', - default: "tmalign", + "method": { + "type": "string", + "description": "The alignment method to use. Supported values are \"kabsch\", \"nwalign\", and \"tmalign\".", + "default": "tmalign" }, - return_transform: { - type: "boolean", - description: - "Whether to return 3x3 rotation matrices and 3x1 translation vectors.", - default: false, + "return_transform": { + "type": "boolean", + "description": "Whether to return 3x3 rotation matrices and 3x1 translation vectors.", + "default": false }, - return_alignment: { - type: "boolean", - description: - "Whether to return aligned query and target sequences as tuples.", - default: false, + "return_alignment": { + "type": "boolean", + "description": "Whether to return aligned query and target sequences as tuples.", + "default": false }, - return_identities: { - type: "boolean", - description: - "Whether to return sequence identities normalized to alignment length (0-1).", - default: false, + "return_identities": { + "type": "boolean", + "description": "Whether to return sequence identities normalized to alignment length (0-1).", + "default": false }, - return_plddt: { - type: "boolean", - description: "Whether to return mean pLDDT per target.", - default: false, - }, - }, - }, - example: { - protein: "", - targets_id: "1dfcb748-0f66-4cd0-9fbf-6c5b0da32512", - method: "tmalign", - return_transform: true, - return_alignment: false, - return_identities: true, - return_plddt: true, + "return_plddt": { + "type": "boolean", + "description": "Whether to return mean pLDDT per target.", + "default": false + } + } }, - }, - }, + "example": { + "protein": "", + "targets_id": "1dfcb748-0f66-4cd0-9fbf-6c5b0da32512", + "method": "tmalign", + "return_transform": true, + "return_alignment": false, + "return_identities": true, + "return_plddt": true + } + } + } }, - responses: { - 200: { - description: - "Stream of structure alignment results.\nEach line is a JSON object representing the result for a single target.", - content: { + "responses": { + "200": { + "description": "Stream of structure alignment results.\nEach line is a JSON object representing the result for a single target.", + "content": { "application/x-ndjson": { - schema: { - type: "object", - properties: { - tmscore: { - type: "number", - format: "float", - description: "TM-score for this target structure.", + "schema": { + "type": "object", + "properties": { + "tmscore": { + "type": "number", + "format": "float", + "description": "TM-score for this target structure." }, - rmsd: { - type: "number", - format: "float", - description: "RMSD for this target structure.", + "rmsd": { + "type": "number", + "format": "float", + "description": "RMSD for this target structure." }, - identity: { - type: "number", - format: "float", - description: - "Sequence identity for this target, normalized to alignment length (0-1).\nPresent if `return_identities=true`.", + "identity": { + "type": "number", + "format": "float", + "description": "Sequence identity for this target, normalized to alignment length (0-1).\nPresent if `return_identities=true`." }, - R: { - type: "array", - items: { - type: "array", - items: { - type: "number", - format: "float", - }, + "R": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } }, - description: - "3x3 rotation matrix for this target (present if `return_transform=true`).", + "description": "3x3 rotation matrix for this target (present if `return_transform=true`)." }, - t: { - type: "array", - items: { - type: "number", - format: "float", + "t": { + "type": "array", + "items": { + "type": "number", + "format": "float" }, - description: - "3x1 translation vector for this target (present if `return_transform=true`).", + "description": "3x1 translation vector for this target (present if `return_transform=true`)." }, - alignment: { - type: "array", - items: { - type: "string", + "alignment": { + "type": "array", + "items": { + "type": "string" }, - description: - "Tuple of (aligned_query_sequence, aligned_target_sequence).\nFor multichain inputs, chains are joined with `:` in the\norder of the query chain ids.\nPresent if `return_alignment=true`.", - }, - plddt: { - type: "number", - format: "float", - description: - "Mean pLDDT for this target, averaged across all chains\n(NaN residues excluded). Present if `return_plddt=true`.", + "description": "Tuple of (aligned_query_sequence, aligned_target_sequence).\nFor multichain inputs, chains are joined with `:` in the\norder of the query chain ids.\nPresent if `return_alignment=true`." }, - design_index: { - type: "integer", - description: - "0-indexed position of the query design within `design_id`.\nPresent only when `design_id` was provided in the request;\nomitted when the request used an uploaded `protein`.", + "plddt": { + "type": "number", + "format": "float", + "description": "Mean pLDDT for this target, averaged across all chains\n(NaN residues excluded). Present if `return_plddt=true`." }, + "design_index": { + "type": "integer", + "description": "0-indexed position of the query design within `design_id`.\nPresent only when `design_id` was provided in the request;\nomitted when the request used an uploaded `protein`." + } }, - example: { - tmscore: 0.89, - rmsd: 1.82, - identity: 0.95, - R: [ - [0.998, -0.015, 0.062], - [0.017, 0.999, -0.041], - [-0.061, 0.042, 0.997], + "example": { + "tmscore": 0.89, + "rmsd": 1.82, + "identity": 0.95, + "R": [ + [ + 0.998, + -0.015, + 0.062 + ], + [ + 0.017, + 0.999, + -0.041 + ], + [ + -0.061, + 0.042, + 0.997 + ] ], - t: [1.23, -0.45, 0.12], - plddt: 87.3, - design_index: 0, - }, - }, - }, - }, - }, - 400: { - description: "Invalid input provided.", - content: { + "t": [ + 1.23, + -0.45, + 0.12 + ], + "plddt": 87.3, + "design_index": 0 + } + } + } + } + }, + "400": { + "description": "Invalid input provided.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, + "oauth2": [] + } + ] + } }, "/api/v1/prompt/plddt_batch_by_id": { - get: { - tags: ["Structure"], - summary: "Get mean pLDDT for all structures in targets_id (Streaming)", - description: - "Retrieve the mean pLDDT scores for all structures contained within the collection\nidentified by `targets_id`.\n\n**Streaming Endpoint:** Returns a stream of JSON objects (NDJSON).", - operationId: "getPlddtBatchById", - parameters: [ + "get": { + "tags": [ + "Structure" + ], + "summary": "Get mean pLDDT for all structures in targets_id (Streaming)", + "description": "Retrieve the mean pLDDT scores for all structures contained within the collection\nidentified by `targets_id`.\n\n**Streaming Endpoint:** Returns a stream of JSON objects (NDJSON).", + "operationId": "getPlddtBatchById", + "parameters": [ { - name: "targets_id", - in: "query", - description: - "Target ID referencing a **collection** of structures.", - required: true, - schema: { - type: "string", - format: "uuid", - }, - }, + "name": "targets_id", + "in": "query", + "description": "Target ID referencing a **collection** of structures.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - responses: { - 200: { - description: "Stream of pLDDT scores.", - content: { + "responses": { + "200": { + "description": "Stream of pLDDT scores.", + "content": { "application/x-ndjson": { - schema: { - type: "object", - properties: { - plddt: { - type: "number", - format: "float", - description: - "Mean pLDDT for a single target structure, averaged across\nall chains (NaN residues excluded).", - }, - }, - example: { - plddt: 87.3, + "schema": { + "type": "object", + "properties": { + "plddt": { + "type": "number", + "format": "float", + "description": "Mean pLDDT for a single target structure, averaged across\nall chains (NaN residues excluded)." + } }, - }, - }, - }, - }, - 400: { - description: "Invalid input provided.", - content: { + "example": { + "plddt": 87.3 + } + } + } + } + }, + "400": { + "description": "Invalid input provided.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 401: { - description: "Unauthorized.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, - 404: { - description: "Targets ID not found.", - content: { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Targets ID not found.", + "content": { "application/json": { - schema: { - $ref: "#/components/schemas/Error", - }, - }, - }, - }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } }, - security: [ + "security": [ { - oauth2: [], - }, - ], - }, - }, + "oauth2": [] + } + ] + } + } }, - components: { - securitySchemes: { - oauth2: { - type: "oauth2", - flows: { - password: { - tokenUrl: "/api/v1/auth/login", - scopes: {}, - }, - }, - }, + "components": { + "securitySchemes": { + "oauth2": { + "type": "oauth2", + "flows": { + "password": { + "tokenUrl": "/api/v1/auth/login", + "scopes": {} + } + } + } }, - schemas: { - PromptMetadata: { - title: "PromptMetadata", - description: - "The metadata of a prompt entity containing sequences and/or structures as context and an optional query used to condition PoET models.", - type: "object", - required: [ + "schemas": { + "PromptMetadata": { + "title": "PromptMetadata", + "description": "The metadata of a prompt entity containing sequences and/or structures as context and an optional query used to condition PoET models.", + "type": "object", + "required": [ "id", "name", "description", @@ -1367,317 +1375,313 @@ const promptSpec = { "num_replicates", "job_id", "status", - "project_uuid", + "project_uuid" ], - properties: { - id: { - type: "string", - format: "uuid", - description: "Prompt unique identifier.", - }, - name: { - type: "string", - description: "Name of the prompt", - example: "My Awesome Prompt", - }, - description: { - type: "string", - description: "Description of the prompt", - example: "Prompt for use with top secret project.", - nullable: true, - }, - created_date: { - type: "string", - format: "date-time", - description: "The date the prompt was created.", - }, - num_replicates: { - type: "integer", - description: "Number of replicates provided as context.", - }, - job_id: { - type: "string", - format: "uuid", - description: "Job ID of any associated job for the prompt.", - nullable: true, - }, - status: { - type: "string", - description: "Status of the prompt.", - }, - project_uuid: { - type: "string", - format: "uuid", - description: "Project this prompt is attached to.", - nullable: true, - }, - sequence_length: { - title: "Sequence Length", - description: - "Length of the prompt's context chains. Set when every chain across\nevery Complex across every replicate has the same length; null when\nchain lengths vary or no context has been parsed yet.", - type: "integer", - nullable: true, - }, - is_system: { - type: "boolean", - default: false, - description: - "True for platform-curated system prompts available to every user.\nSystem prompts are read-only over the HTTP API; users cannot create,\nmodify, or delete them. False or absent for user-uploaded prompts.", - }, - }, + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Prompt unique identifier." + }, + "name": { + "type": "string", + "description": "Name of the prompt", + "example": "My Awesome Prompt" + }, + "description": { + "type": "string", + "description": "Description of the prompt", + "example": "Prompt for use with top secret project.", + "nullable": true + }, + "created_date": { + "type": "string", + "format": "date-time", + "description": "The date the prompt was created." + }, + "num_replicates": { + "type": "integer", + "description": "Number of replicates provided as context." + }, + "job_id": { + "type": "string", + "format": "uuid", + "description": "Job ID of any associated job for the prompt.", + "nullable": true + }, + "status": { + "type": "string", + "description": "Status of the prompt." + }, + "project_uuid": { + "type": "string", + "format": "uuid", + "description": "Project this prompt is attached to.", + "nullable": true + }, + "sequence_length": { + "title": "Sequence Length", + "description": "Length of the prompt's context chains. Set when every chain across\nevery Complex across every replicate has the same length; null when\nchain lengths vary or no context has been parsed yet.", + "type": "integer", + "nullable": true + }, + "is_system": { + "type": "boolean", + "default": false, + "description": "True for platform-curated system prompts available to every user.\nSystem prompts are read-only over the HTTP API; users cannot create,\nmodify, or delete them. False or absent for user-uploaded prompts." + } + } }, - Error: { - title: "Error", - description: "A error object providing details of the error.", - required: ["detail"], - type: "object", - properties: { - detail: { - title: "Detail", - type: "string", - }, - }, + "Error": { + "title": "Error", + "description": "A error object providing details of the error.", + "required": [ + "detail" + ], + "type": "object", + "properties": { + "detail": { + "title": "Detail", + "type": "string" + } + } }, - QueryMetadata: { - title: "QueryMetadata", - description: - "The metadata of a query entity containing the sequence and/or structure used as a query to condition PoET2 models.", - type: "object", - required: ["id", "name", "created_date", "project_uuid"], - properties: { - id: { - type: "string", - format: "uuid", - description: "Query unique identifier.", - }, - name: { - type: "string", - description: - "Display name of the query. Defaults to the query's UUID string when the\nuser has not set a name explicitly; clearing the name via PUT (passing\n`null` to `QueryUpdate.name`) resets it to this default.", - example: "My Awesome Query", - }, - created_date: { - type: "string", - format: "date-time", - description: "The date the query was created.", - }, - project_uuid: { - type: "string", - format: "uuid", - description: "Project this query is attached to.", - nullable: true, - }, - sequence_length: { - title: "Sequence Length", - description: - "Length of the query's protein chain(s). Set when every chain in the\nquery has the same length; null when chains differ in length.", - type: "integer", - nullable: true, - }, - }, + "QueryMetadata": { + "title": "QueryMetadata", + "description": "The metadata of a query entity containing the sequence and/or structure used as a query to condition PoET2 models.", + "type": "object", + "required": [ + "id", + "name", + "created_date", + "project_uuid" + ], + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Query unique identifier." + }, + "name": { + "type": "string", + "description": "Display name of the query. Defaults to the query's UUID string when the\nuser has not set a name explicitly; clearing the name via PUT (passing\n`null` to `QueryUpdate.name`) resets it to this default.", + "example": "My Awesome Query" + }, + "created_date": { + "type": "string", + "format": "date-time", + "description": "The date the query was created." + }, + "project_uuid": { + "type": "string", + "format": "uuid", + "description": "Project this query is attached to.", + "nullable": true + }, + "sequence_length": { + "title": "Sequence Length", + "description": "Length of the query's protein chain(s). Set when every chain in the\nquery has the same length; null when chains differ in length.", + "type": "integer", + "nullable": true + } + } }, - QueryUpdate: { - title: "QueryUpdate", - description: - "Fields to update on a query. Omitted fields are left unchanged; fields\nprovided with an explicit null value (for nullable fields) are cleared.", - type: "object", - properties: { - name: { - type: "string", - description: "Name of the query.", - example: "My Awesome Query", - nullable: true, - }, - project_uuid: { - type: "string", - format: "uuid", - description: "Project to attach the query to.", - nullable: true, - }, - }, + "QueryUpdate": { + "title": "QueryUpdate", + "description": "Fields to update on a query. Omitted fields are left unchanged; fields\nprovided with an explicit null value (for nullable fields) are cleared.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the query.", + "example": "My Awesome Query", + "nullable": true + }, + "project_uuid": { + "type": "string", + "format": "uuid", + "description": "Project to attach the query to.", + "nullable": true + } + } }, - PromptUpdate: { - title: "PromptUpdate", - description: - "Fields to update on a prompt. Omitted fields are left unchanged; fields\nprovided with an explicit null value (for nullable fields) are cleared.", - type: "object", - properties: { - name: { - type: "string", - description: "Name of the prompt.", - example: "My Awesome Prompt", - }, - description: { - type: "string", - description: "Description of the prompt.", - example: "Prompt for use with top secret project.", - nullable: true, - }, - project_uuid: { - type: "string", - format: "uuid", - description: "Project to attach the prompt to.", - nullable: true, - }, - }, + "PromptUpdate": { + "title": "PromptUpdate", + "description": "Fields to update on a prompt. Omitted fields are left unchanged; fields\nprovided with an explicit null value (for nullable fields) are cleared.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the prompt.", + "example": "My Awesome Prompt" + }, + "description": { + "type": "string", + "description": "Description of the prompt.", + "example": "Prompt for use with top secret project.", + "nullable": true + }, + "project_uuid": { + "type": "string", + "format": "uuid", + "description": "Project to attach the prompt to.", + "nullable": true + } + } }, - EditProteinChainEditConfig: { - title: "EditProteinChainEditConfig", - type: "object", - properties: { - reference_sequence: { - type: "string", - }, - new_sequence: { - type: "string", - }, - structure_mask: { - type: "string", - }, - binding: { - type: "string", - description: - "Optional aligned binding track for the edited chain, in addition to sequence and structure edits. Uses `B` (binding), `N` (not binding), `U` (unknown), and `-` (deleted / no residue).", - }, - plddt: { - type: "number", - minimum: 0, - maximum: 100, - description: - "Optional scalar pLDDT override for the final edited chain. Applied only at residues with known CA coordinates; residues without structure keep NaN.", - }, - }, + "EditProteinChainEditConfig": { + "title": "EditProteinChainEditConfig", + "type": "object", + "properties": { + "reference_sequence": { + "type": "string" + }, + "new_sequence": { + "type": "string" + }, + "structure_mask": { + "type": "string" + }, + "binding": { + "type": "string", + "description": "Optional aligned binding track for the edited chain, in addition to sequence and structure edits. Uses `B` (binding), `N` (not binding), `U` (unknown), and `-` (deleted / no residue)." + }, + "plddt": { + "type": "number", + "minimum": 0, + "maximum": 100, + "description": "Optional scalar pLDDT override for the final edited chain. Applied only at residues with known CA coordinates; residues without structure keep NaN." + } + } }, - EditProteinStructureConfig: { - title: "EditProteinStructureConfig", - type: "object", - properties: { - file_index: { - type: "integer", - description: "Index of the file in the uploaded structures array.", - }, - chain_ids: { - type: "object", - additionalProperties: { - type: "string", - }, - description: "Mapping of original chain IDs to new chain IDs.", - example: { - A: "X", - B: "Y", - }, - }, - edits: { - type: "object", - additionalProperties: { - $ref: "#/components/schemas/EditProteinChainEditConfig", - }, - description: - "Edits to apply to the chains (keyed by the assigned chain ID).", - example: { - X: { - reference_sequence: "ACDEFG", - new_sequence: "ACHEFG", - structure_mask: "SSXSSS", - binding: "UUBUUU", - }, - }, - }, - }, + "EditProteinStructureConfig": { + "title": "EditProteinStructureConfig", + "type": "object", + "properties": { + "file_index": { + "type": "integer", + "description": "Index of the file in the uploaded structures array." + }, + "chain_ids": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Mapping of original chain IDs to new chain IDs.", + "example": { + "A": "X", + "B": "Y" + } + }, + "edits": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EditProteinChainEditConfig" + }, + "description": "Edits to apply to the chains (keyed by the assigned chain ID).", + "example": { + "X": { + "reference_sequence": "ACDEFG", + "new_sequence": "ACHEFG", + "structure_mask": "SSXSSS", + "binding": "UUBUUU" + } + } + } + } }, - EditProteinSequenceConfig: { - title: "EditProteinSequenceConfig", - type: "object", - properties: { - sequence: { - type: "string", - }, - chain_id: { - type: "string", - }, - }, + "EditProteinSequenceConfig": { + "title": "EditProteinSequenceConfig", + "type": "object", + "properties": { + "sequence": { + "type": "string" + }, + "chain_id": { + "type": "string" + } + } }, - EditProteinGroup: { - title: "EditProteinGroup", - type: "object", - properties: { - structures: { - type: "array", - items: { - $ref: "#/components/schemas/EditProteinStructureConfig", - }, - }, - sequences: { - type: "array", - items: { - $ref: "#/components/schemas/EditProteinSequenceConfig", - }, - }, - }, + "EditProteinGroup": { + "title": "EditProteinGroup", + "type": "object", + "properties": { + "structures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EditProteinStructureConfig" + } + }, + "sequences": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EditProteinSequenceConfig" + } + } + } }, - EditProteinConfig: { - title: "EditProteinConfig", - description: - "Configuration for editing and combining multiple protein chains.", - type: "object", - properties: { - groups: { - type: "array", - items: { - $ref: "#/components/schemas/EditProteinGroup", - }, - }, + "EditProteinConfig": { + "title": "EditProteinConfig", + "description": "Configuration for editing and combining multiple protein chains.", + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EditProteinGroup" + } + } }, - example: { - groups: [ + "example": { + "groups": [ { - structures: [ + "structures": [ { - file_index: 0, - chain_ids: { - A: "X", - B: "Y", - }, - edits: { - X: { - reference_sequence: "ACDEFG", - new_sequence: "ACHEFG", - structure_mask: "SSXSSS", - binding: "UUBUUU", - plddt: 72.5, - }, + "file_index": 0, + "chain_ids": { + "A": "X", + "B": "Y" }, - }, + "edits": { + "X": { + "reference_sequence": "ACDEFG", + "new_sequence": "ACHEFG", + "structure_mask": "SSXSSS", + "binding": "UUBUUU", + "plddt": 72.5 + } + } + } ], - sequences: [ + "sequences": [ { - sequence: "MKL", - chain_id: "Z", - }, - ], - }, - ], - }, - }, - }, + "sequence": "MKL", + "chain_id": "Z" + } + ] + } + ] + } + } + } }, - tags: [ + "tags": [ { - name: "Prompt", - description: "Prompt _context_ upload, get, and list operations.", + "name": "Prompt", + "description": "Prompt _context_ upload, get, and list operations." }, { - name: "Query", - description: "Prompt _query_ upload, get, and list operations.", + "name": "Query", + "description": "Prompt _query_ upload, get, and list operations." }, { - name: "Structure", - description: "Structure editing and normalization operations.", + "name": "Structure", + "description": "Structure editing and normalization operations." }, { - name: "Align", - description: "Structure and sequence alignment operations.", - }, - ], + "name": "Align", + "description": "Structure and sequence alignment operations." + } + ] }; export default promptSpec;