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

# Start a AlphaFold run

> Predicts a protein's 3D structure from its amino-acid sequence with AlphaFold 2 (ColabFold): one or more proteins predicted separately, or several chains folded together as a complex. Returns five ranked models per prediction with confidence scores. Alignments of related proteins, and templates from the PDB when asked for, are found inside Revilico.

Starts a run and returns it with status `queued`; poll GET /v1/runs/{runId} until it finishes. Runs spend credits.

**Limits:** `maxSequences`: 20, `minResiduesPerSequence`: 16, `maxResiduesPerPrediction`: 1500, `modelsPerSeed`: 5.

How the engine works and how to read its results: [AlphaFold documentation](/docs/alphafold-openfold).

**Scope:** `runs:write`.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/engines/alphafold/runs
openapi: 3.1.0
info:
  title: Revilico API
  version: 1.0.0
  description: >-
    Run Revilico's computational chemistry and biology engines from your own
    code: upload input files, start runs, follow them and read their results.
servers:
  - url: https://public-api.revilico.bio
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Who you are, your credits and what your runs have used.
  - name: Engines
    description: The engines you can run, their parameter schemas and examples.
  - name: Files
    description: 'Upload input files: create an upload, then PUT the bytes.'
  - name: Runs
    description: Start, follow and cancel engine runs.
  - name: Results and outputs
    description: 'Read what a run produced: results, files and outputs.'
  - name: Projects
    description: Group runs into the projects you see in the web app.
  - name: Sharing
    description: >-
      Share runs with people in your organization, as in the web app's Pipeline
      sharing.
  - name: Notes
    description: >-
      RevNotes: read, write and share the rich-text notes and note folders of
      the web app's RevNotes panel, in markdown or HTML.
  - name: Drive
    description: >-
      Your RevDrive files and shared drives, as in the web app: browse, read,
      use files as run inputs, save outputs, and organize. Ids: `dfile_…` and
      `dfld_…` in a personal Drive, `drive_…` for a shared drive, `sdfile_…` and
      `sdfld_…` in one.
  - name: Engine runs
    description: >-
      Start a run of one engine, with that engine's parameters and input files.
      Same endpoint as **Start a run**.
  - name: Health
    description: Service status. Needs no API key.
paths:
  /v1/engines/alphafold/runs:
    post:
      tags:
        - Engine runs
      summary: Start a AlphaFold run
      description: >-
        Predicts a protein's 3D structure from its amino-acid sequence with
        AlphaFold 2 (ColabFold): one or more proteins predicted separately, or
        several chains folded together as a complex. Returns five ranked models
        per prediction with confidence scores. Alignments of related proteins,
        and templates from the PDB when asked for, are found inside Revilico.


        Starts a run and returns it with status `queued`; poll GET
        /v1/runs/{runId} until it finishes. Runs spend credits.


        **Limits:** `maxSequences`: 20, `minResiduesPerSequence`: 16,
        `maxResiduesPerPrediction`: 1500, `modelsPerSeed`: 5.


        How the engine works and how to read its results: [AlphaFold
        documentation](/docs/alphafold-openfold).


        **Scope:** `runs:write`.
      operationId: engineRuns.alphafold
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: A name for the run, shown in the web app.
                  type: string
                  maxLength: 200
                parameters:
                  type: object
                  properties:
                    sequences:
                      minItems: 1
                      maxItems: 20
                      type: array
                      items:
                        type: string
                        minLength: 16
                        maxLength: 1500
                        pattern: ^[ACDEFGHIKLMNPQRSTVWYX]+$
                        description: >-
                          One protein chain in one-letter amino-acid codes
                          (ACDEFGHIKLMNPQRSTVWYX; X for unknown), 16–1500
                          residues.
                      description: >-
                        The protein chains to predict, 1–20. Each is predicted
                        on its own unless complex is true.
                    complex:
                      default: false
                      description: >-
                        Fold all the sequences together as one complex of chains
                        that bind each other (a dimer, say; repeat a sequence
                        for each copy). False predicts each sequence separately.
                        Only matters with 2+ sequences. A complex may have at
                        most 1500 residues in total.
                      type: boolean
                    alignment:
                      default: local
                      description: >-
                        Whether to build an alignment of related proteins first,
                        which usually makes predictions of natural proteins much
                        more accurate. "local" (default) searches UniRef30
                        inside Revilico; if that search fails, the run fails.
                        The first run on a fresh machine spends about 8 minutes
                        copying the search databases. "none" uses the sequence
                        alone: faster, but confidence for natural proteins is
                        often low.
                      type: string
                      enum:
                        - local
                        - none
                    templates:
                      default: none
                      description: >-
                        Whether to guide the prediction with solved structures
                        of similar proteins. "pdb" searches a copy of the
                        Protein Data Bank (PDB) kept inside Revilico and uses
                        the closest matches; if none match, the run predicts
                        without them. It helps most when the alignment finds few
                        related proteins, or with alignment "none". "none"
                        (default) uses no templates.
                      type: string
                      enum:
                        - none
                        - pdb
                    relax_top_models:
                      default: 5
                      description: >-
                        How many of the 5 ranked models to clean up with a short
                        physics-based relaxation (fixes clashes and bond
                        geometry). 0 skips it, which is faster.
                      type: number
                      enum:
                        - 0
                        - 1
                        - 5
                    relax_max_iterations:
                      default: 200
                      description: Relaxation steps per model; 0 runs until it converges.
                      type: number
                      enum:
                        - 0
                        - 200
                        - 2000
                    model_type:
                      default: auto
                      description: >-
                        Model weights. "auto" (default) uses
                        alphafold2_multimer_v3 when complex is true and
                        alphafold2_ptm otherwise. alphafold2_ptm suits single
                        chains; the alphafold2_multimer versions are trained on
                        complexes (v3 is the newest).
                      type: string
                      enum:
                        - auto
                        - alphafold2_ptm
                        - alphafold2_multimer_v1
                        - alphafold2_multimer_v2
                        - alphafold2_multimer_v3
                        - deepfold_v1
                    num_recycles:
                      default: 3
                      description: >-
                        Refinement passes per model. More can help hard targets
                        and take longer. auto: 20 for multimer models, 3
                        otherwise.
                      anyOf:
                        - type: string
                          const: auto
                        - type: number
                          enum:
                            - 0
                            - 1
                            - 3
                            - 6
                            - 12
                            - 24
                            - 48
                    recycle_early_stop_tolerance:
                      default: auto
                      description: >-
                        Stop recycling once the structure moves less than this
                        (Å) between passes. auto: 0.5 for multimer models, off
                        otherwise.
                      anyOf:
                        - type: string
                          const: auto
                        - type: number
                          enum:
                            - 0
                            - 0.5
                            - 1
                    num_seeds:
                      default: 1
                      description: >-
                        Random seeds per model. Each seed adds 5 models to rank,
                        and run time grows in step.
                      type: number
                      enum:
                        - 1
                        - 2
                        - 4
                        - 8
                        - 16
                    use_dropout:
                      default: false
                      description: >-
                        Sample the model with dropout on, for more varied
                        models. Usually combined with several seeds.
                      type: boolean
                  required:
                    - sequences
                  additionalProperties: false
                inputs:
                  type: object
                  properties: {}
                  additionalProperties: false
                budget:
                  description: Most credits the run may spend; it is stopped beyond that.
                  type: number
                  exclusiveMinimum: 0
                projectId:
                  description: >-
                    Add the run to this project (`proj_…`); needs editor or
                    owner on it.
                  type: string
              required:
                - parameters
              additionalProperties: false
            examples:
              defaults:
                summary: >-
                  Predict one protein, with an alignment of related proteins
                  built inside Revilico.
                value:
                  name: Ubiquitin structure
                  parameters:
                    sequences:
                      - >-
                        MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG
                  inputs: {}
              separate-proteins:
                summary: >-
                  Predict two unrelated proteins in one run, each on its own,
                  relaxing only the best model of each.
                value:
                  name: Ubiquitin and CDK2 fragment
                  parameters:
                    sequences:
                      - >-
                        MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG
                      - >-
                        MENFQKVEKIGEGTYGVVYKARNKLTGEVVALKKIRLDTETEGVPSTAIREISLLKELNHPNIVKLLDVIHTENKLYLVFEFLHQDLKKFMDASA
                    relax_top_models: 1
                  inputs: {}
              sequence-only:
                summary: >-
                  Predict from the sequence alone, without an alignment: faster,
                  less accurate for natural proteins.
                value:
                  name: Ubiquitin, sequence only
                  parameters:
                    sequences:
                      - >-
                        MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG
                    alignment: none
                  inputs: {}
              pdb-templates:
                summary: >-
                  Guide the prediction with solved structures of similar
                  proteins from the PDB, found inside Revilico.
                value:
                  name: Ubiquitin with PDB templates
                  parameters:
                    sequences:
                      - >-
                        MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG
                    templates: pdb
                  inputs: {}
              homodimer:
                summary: >-
                  Fold two copies of a chain together as a complex; the default
                  model type picks the multimer model.
                value:
                  name: Ubiquitin dimer
                  parameters:
                    sequences:
                      - >-
                        MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG
                      - >-
                        MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG
                    complex: true
                  inputs: {}
      responses:
        '202':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Run'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '402':
          $ref: '#/components/responses/402'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '422':
          $ref: '#/components/responses/422'
        '500':
          $ref: '#/components/responses/500'
        '502':
          $ref: '#/components/responses/502'
components:
  schemas:
    Run:
      type: object
      properties:
        id:
          type: string
          description: Run id, `run_…`.
        engine:
          type: string
          description: Engine slug, e.g. `revredox`.
        name:
          type:
            - string
            - 'null'
        access:
          type: string
          enum:
            - owner
            - shared
            - project
          description: >-
            Why you can see the run: you started it, it was shared with you, or
            it is in a project you belong to. Only the owner can cancel it or
            read its inputs.
        owner:
          type: object
          properties:
            name:
              type:
                - string
                - 'null'
            email:
              type: string
          required:
            - name
            - email
          description: Who started the run.
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
            - cancelled
          description: >-
            queued until the engine picks the run up; succeeded, failed and
            cancelled are final.
        statusReason:
          description: >-
            Why a cancelled run stopped: `user`, `insufficient_credits` or
            `budget_exceeded`. Null otherwise.
          type:
            - string
            - 'null'
        progress:
          type: number
          description: Progress the engine reports; 0 until it reports any.
        createdAt:
          type: string
          format: date-time
        startedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        endedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        budget:
          description: Most credits the run may spend, if one was set.
          type:
            - number
            - 'null'
        creditsUsed:
          type: number
          description: Credits charged to the run so far.
        error:
          anyOf:
            - type: object
              properties:
                message:
                  type: string
              required:
                - message
            - type: 'null'
          description: Set when status is failed.
        children:
          type: object
          properties:
            total:
              type: number
            queued:
              type: number
            running:
              type: number
            succeeded:
              type: number
            failed:
              type: number
            cancelled:
              type: number
          required:
            - total
            - queued
            - running
            - succeeded
            - failed
            - cancelled
          description: >-
            For engines that run each input as its own job: how many children
            are in each status. GET /v1/runs/{runId}/children lists them.
        links:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: string
          description: >-
            Related endpoints: self, inputs (owner only), results, outputs,
            files.
        warnings:
          description: >-
            Set when the run was created but a follow-up step, such as adding it
            to a project, failed.
          type: array
          items:
            type: string
      required:
        - id
        - engine
        - name
        - access
        - owner
        - status
        - statusReason
        - progress
        - createdAt
        - startedAt
        - endedAt
        - budget
        - creditsUsed
        - error
        - links
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - VALIDATION_FAILED
                - INVALID_ID
                - INVALID_PARAMETERS
                - INPUT_LIMIT_EXCEEDED
                - NOT_FOUND
                - FORBIDDEN
                - METHOD_NOT_ALLOWED
                - CONFLICT
                - PAYLOAD_TOO_LARGE
                - MISSING_CREDENTIALS
                - INVALID_CREDENTIALS
                - WRONG_ENVIRONMENT
                - CREDENTIALS_EXPIRED
                - CREDENTIALS_REVOKED
                - ACCOUNT_INACTIVE
                - API_ACCESS_NOT_ENABLED
                - INSUFFICIENT_SCOPE
                - SESSION_REQUIRED
                - TOO_MANY_AUTH_FAILURES
                - API_KEY_LIMIT_REACHED
                - ENGINE_NOT_ENABLED
                - DOCS_NOT_AVAILABLE
                - INSUFFICIENT_CREDITS
                - RUN_NOT_COMPLETE
                - ENGINE_SUBMIT_FAILED
                - RATE_LIMITED
                - SERVICE_UNAVAILABLE
                - INTERNAL_ERROR
              description: Stable within /v1; branch on this, not on the message.
            message:
              type: string
              description: Readable explanation, for people.
            details:
              description: >-
                Extra context, e.g. `issues` ({ path, message }[]) for
                validation errors.
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
          required:
            - code
            - message
      required:
        - error
  responses:
    '400':
      description: >-
        The request is malformed. `error.code` is one of `VALIDATION_FAILED`,
        `INVALID_ID`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: VALIDATION_FAILED
              message: The request is malformed.
    '401':
      description: >-
        The API key is missing or not valid. `error.code` is one of
        `MISSING_CREDENTIALS`, `INVALID_CREDENTIALS`, `WRONG_ENVIRONMENT`,
        `CREDENTIALS_EXPIRED`, `CREDENTIALS_REVOKED`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: MISSING_CREDENTIALS
              message: The API key is missing or not valid.
    '402':
      description: >-
        Your organization doesn't have enough credits. `error.code` is one of
        `INSUFFICIENT_CREDITS`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INSUFFICIENT_CREDITS
              message: Your organization doesn't have enough credits.
    '403':
      description: >-
        The key may not do this. `error.code` is one of `INSUFFICIENT_SCOPE`,
        `API_ACCESS_NOT_ENABLED`, `ENGINE_NOT_ENABLED`, `ACCOUNT_INACTIVE`,
        `FORBIDDEN`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INSUFFICIENT_SCOPE
              message: The key may not do this.
    '404':
      description: Not found, or not visible to you. `error.code` is one of `NOT_FOUND`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: NOT_FOUND
              message: Not found, or not visible to you.
    '422':
      description: >-
        The parameters or input files don't fit the engine. `error.code` is one
        of `INVALID_PARAMETERS`, `INPUT_LIMIT_EXCEEDED`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INVALID_PARAMETERS
              message: The parameters or input files don't fit the engine.
    '500':
      description: >-
        Something went wrong on our side. `error.code` is one of
        `INTERNAL_ERROR`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INTERNAL_ERROR
              message: Something went wrong on our side.
    '502':
      description: >-
        The engine service rejected or failed the request. `error.code` is one
        of `ENGINE_SUBMIT_FAILED`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: ENGINE_SUBMIT_FAILED
              message: The engine service rejected or failed the request.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key from the web app (**Settings → Developer**), sent as
        `Authorization: Bearer rvl_live_…`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.