---
title: "Create a template Nucleotide Alignment"
method: POST
path: "/nucleotide-alignments:create-template-alignment"
tags: ["nucleotideAlignments"]
---

# Create a template Nucleotide Alignment

`POST /nucleotide-alignments:create-template-alignment`

## Request

- Base URL: `https://{tenant_name}.benchling.com/api/v2`
- URL: `https://{tenant_name}.benchling.com/api/v2/nucleotide-alignments:create-template-alignment`
- Auth: HTTP bearer

Create a template Nucleotide Alignment

## Request body

- NucleotideTemplateAlignmentCreate
  - `algorithm` 'mafft' | 'clustalo', required
  - `clustaloOptions` NucleotideAlignmentBaseClustaloOptions: Options to pass to the ClustalO algorithm, only applicable for ClustalO.
    - `maxGuidetreeIterations` integer: Max guide tree iterations within combined iterations. Use -1 for no max (all iterations will include guide tree iterations).
    - `maxHmmIterations` integer: Max HMM iterations within combined iterations. Use -1 for no max (all iterations will include HMM iterations).
    - `mbedGuideTree` boolean: Whether mBed-like clustering guide tree should be used (faster to use it).
    - `mbedIteration` boolean: Whether mBed-like clustering iteration should be used (faster to use it).
    - `numCombinedIterations` integer: Number of (combined guide-tree/HMM) iterations.
  - `files` NucleotideAlignmentBaseFilesItems[], required
    - union
      - NucleotideAlignmentBaseFilesItems0
        - `sequenceId` string
      - NucleotideAlignmentFile
        - `data` string, byte
        - `name` string
  - `mafftOptions` NucleotideAlignmentBaseMafftOptions: Options to pass to the MAFFT algorithm, only applicable for MAFFT.
    - `adjustDirection` 'fast' | 'accurate' | 'disabled': Adjust direction: * `fast`: Enabled, quickly. * `accurate`: Enabled, accurately (slow). * `disabled`: Disabled, fastest.
    - `gapExtensionPenalty` number, double: Gap extension penalty.
    - `gapOpenPenalty` number, double: Gap open penalty.
    - `maxIterations` integer: Max refinement iterations. Not applicable for auto strategy, as it will be selected automatically.
    - `retree` integer: Tree rebuilding. Only used for 6-mer strategy.
    - `strategy` 'auto' | 'sixmer' | 'localpair' | 'globalpair': MAFFT Strategy: * `auto`: Pick a strategy automatically based on the count and size of inputs. * `sixmer`: Use 6-mer distance for constructing the guide tree. * `localpair`: Compute local pairwise alignments using Smith-Waterman for constructing the guide tree and iterative refinement. * `globalpair`: Compute global pairwise alignments using Needleman-Wunsch for constructing the guide tree and iterative refinement.
  - `name` string
  - `templateSequenceId` string, required

## Response `202`

This endpoint launches a [long-running task](https://docs.benchling.com/docs/api/v2/benchling-api/tasks/get-task) and returns the Task ID of the launched task.
When successful, the task returns the [Nucleotide Alignment](https://docs.benchling.com/docs/api/v2/benchling-api/nucleotide-alignments/get-nucleotide-alignment) resource that was created.

- AsyncTaskLink
  - `taskId` string

---

[API](https://skmtc.dev/benchling/apis/benchling-api-2.md) - [All operations](https://skmtc.dev/benchling/apis/benchling-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/benchling/apis/benchling-api-2/revisions/01d2fa8523cd?raw)
