Files

93 lines
2.7 KiB
JSON

[
[
{
"a": "Models",
"href": "/models"
},
{
"a": "Morph",
"href": "/models/morph"
},
{
"h1": "Morph V3 Large"
},
{
"p": "Morph's high-accuracy apply model for complex code edits."
},
{
"a": "Get API key",
"href": "https://platform.hanzo.ai/api-keys"
},
{
"a": "Try in Chat",
"href": "/chat"
}
],
[
{
"h2": "Specifications"
}
],
[
{
"h2": "Quick start"
},
{
"a": "Get an API key →",
"href": "https://platform.hanzo.ai/api-keys"
},
{
"button": "TypeScript"
},
{
"button": "Python"
},
{
"button": "cURL"
},
{
"button": "Go"
},
{
"code": "import OpenAI from ' openai ' const client = new OpenAI ({ apiKey : process.env.HANZO_API_KEY , baseURL : ' https://api.hanzo.ai/v1 ' }) const response = await client.chat.completions. create ({ model : ' morph/morph-v3-large ' , messages : [{ role : ' user ' , content : ' Hello! ' }] }) console. log ( response.choices [ 0 ] .message.content )"
},
{
"code": "from openai import OpenAI client = OpenAI ( api_key=os . environ [ \" HANZO_API_KEY \" ], base_url= \" https://api.hanzo.ai/v1 \" ) response = client . chat . completions . create ( model= \" morph/morph-v3-large \" , messages= [{ \" role \" : \" user \" , \" content \" : \" Hello! \" }] ) print ( response . choices [ 0 ]. message . content )"
},
{
"code": "curl https://api.hanzo.ai/v1/chat/completions \\ -H \" Content-Type: application/json \" \\ -H \" Authorization: Bearer $ HANZO_API_KEY \" \\ -d ' { \"model\": \"morph/morph-v3-large\", \"messages\": [{\"role\": \"user\", \"content\": \"Hello!\"}] } '"
},
{
"code": "package main import ( \" context \" \" fmt \" \" os \" \" github.com/sashabaranov/go-openai \" ) func main () { cfg := openai . DefaultConfig ( os . Getenv ( \" HANZO_API_KEY \" )) cfg . BaseURL = \" https://api.hanzo.ai/v1 \" client := openai . NewClientWithConfig ( cfg ) resp , _ := client . CreateChatCompletion ( context . Background (), openai . ChatCompletionRequest { Model : \" morph/morph-v3-large \" , Messages : [] openai . ChatCompletionMessage { { Role : openai . ChatMessageRoleUser , Content : \" Hello! \" }, }, }, ) fmt . Println ( resp . Choices [ 0 ]. Message . Content ) }"
}
],
[
{
"h2": "More from Morph"
},
{
"a": "Morph V3 Fast 262K Morph's fastest apply model for code edits. ~10,500 tokens/sec with 96% accuracy for rapid code transformations. The model requires the prompt to be in the following format: <instruction>{instruction}</instruction> <code>{initial_code}</code> <update>{edit_snippet}</update>...",
"href": "/models/morph/morph-v3-fast"
},
{
"a": "View all Morph models →",
"href": "/models/morph"
}
],
[
{
"h2": "Use Morph V3 Large via Hanzo AI"
},
{
"p": "One API key. Every major model. OpenAI-compatible. Start free."
},
{
"a": "Get an API key",
"href": "https://platform.hanzo.ai/api-keys"
},
{
"a": "Browse All Models",
"href": "/models"
}
]
]