Skip to main content
🔒 CONFIDENTIAL - INTERNAL USE ONLYThis page contains proprietary enterprise API documentation and is linked to your account. Do not share any information mentioned here with anyone external to your company. This documentation is for internal development and integration purposes only.

Quickstart

Switch to instruction-guided editing with 98% accuracy in 3 steps.

Prerequisites

  • Enterprise API key from your Morph account
  • Access to https://api.morphllm.com/v1/

1. Configure Your Edit Tool

Set up your AI agent to generate the proper instructions guided format for the highest accuracy editing.
Edit File Tool Description:
Parameters:
  • target_filepath (string, required): The path of the target file to modify
  • instructions (string, required): A single sentence written in the first person describing what you’re changing. Used to help disambiguate uncertainty in the edit.
  • code_edit (string, required): Specify ONLY the precise lines of code that you wish to edit. Use // ... existing code ... for unchanged sections.
The instructions field should be generated by your AI model, not user input. Follow the tool description above nearly verbatim - terminology like “use it to disambiguate uncertainty in the edit” should be used. Example: “I am adding error handling to the user authentication function”

2. Send to Morph Enterprise API

3. Handle the Response

Extract the merged code from the enterprise API response. Response Format:
Extract the Final Code:

Enterprise Features

Perfect Accuracy

Instruction-guided editing achieves 98% accuracy on complex code changes

44k Input Tokens

Handle entire large files, complete modules, and complex codebases

36k Output Tokens

Generate complete implementations, full refactors, and comprehensive updates
Migration from Standard API:
Enterprise API requires an <instruction> field but maintains backward compatibility with existing <update> patterns.