Skip to main content

Morph

Morph serves open weight models and code editing models through an OpenAI compatible API. Use the morph/ prefix in LiteLLM requests

PropertyDetails
Provider route on LiteLLMmorph/
API basehttps://api.morphllm.com/v1
API keyMORPH_API_KEY
Supported LiteLLM endpoint/chat/completions
Morph docsOpen source models
Dedicated capacityDedicated inference

API key​

export MORPH_API_KEY="your-api-key"

Supported models​

The current serverless models are listed below. Morph publishes the live catalog, context windows, and prices at /api/models/json

ModelLiteLLM modelContextInput types
Kimi K3morph/morph-kimik31MText, image
Kimi K3 Fastmorph/morph-kimik3-fast1MText, image
GLM 5.3morph/morph-glm53-744b1MText
GLM 5.3 Flashmorph/morph-glm53flash1MText, image, video
DeepSeek V4 Flash 0731morph/morph-dsv4flash1MText
Morph v3 Fast Applymorph/morph-v3-fast262KText
Morph v3 Large Applymorph/morph-v3-large262KText

Python SDK​

import os

from litellm import completion

os.environ["MORPH_API_KEY"] = "your-api-key"

response = completion(
model="morph/morph-glm53-744b",
messages=[{"role": "user", "content": "Explain prefix caching in two sentences."}],
)

print(response.choices[0].message.content)

Streaming​

from litellm import completion

response = completion(
model="morph/morph-glm53-744b",
messages=[{"role": "user", "content": "Write a small Python rate limiter."}],
stream=True,
)

for chunk in response:
print(chunk.choices[0].delta.content or "", end="")

LiteLLM Proxy​

Add Morph models to config.yaml:

model_list:
- model_name: morph-glm
litellm_params:
model: morph/morph-glm53-744b
api_key: os.environ/MORPH_API_KEY

- model_name: morph-kimi
litellm_params:
model: morph/morph-kimik3
api_key: os.environ/MORPH_API_KEY

Start the proxy:

litellm --config config.yaml

Call it with any OpenAI compatible client:

from openai import OpenAI

client = OpenAI(
api_key="your-litellm-key",
base_url="http://localhost:4000",
)

response = client.chat.completions.create(
model="morph-glm",
messages=[{"role": "user", "content": "Hello from LiteLLM"}],
)

print(response.choices[0].message.content)

Dedicated inference endpoints​

Morph also offers reserved capacity behind an isolated OpenAI compatible endpoint. Set api_base to the URL returned when the endpoint is provisioned and keep the morph/ provider prefix:

model_list:
- model_name: dedicated-deepseek
litellm_params:
model: morph/your-dedicated-model
api_base: https://your-endpoint.morphllm.com/v1
api_key: os.environ/MORPH_API_KEY

See Morph dedicated inference for available models, capacity planning, and deployment through the Morph CLI

Custom API base​

Set MORPH_API_BASE for all Morph requests, or pass api_base on one request:

from litellm import completion

response = completion(
model="morph/morph-glm53-744b",
messages=[{"role": "user", "content": "Hello"}],
api_base="https://api.morphllm.com/v1",
)
🚅
LiteLLM Enterprise
SSO/SAML, audit logs, spend tracking, multi-team management, and guardrails — built for production.
Learn more →