Learn how to authenticate with Morph API using Bearer tokens
Authorization: Bearer your-morph-api-key
https://api.morphllm.com/v1
from openai import OpenAI client = OpenAI( api_key="your-morph-api-key", base_url="https://api.morphllm.com/v1" ) # Test the connection response = client.chat.completions.create( model="morph-v3-fast", messages=[{ "role": "user", "content": "<code>def hello():\n print('Hello World')</code>\n<update>def hello():\n print('Hello Morph!')</update>" }] ) print(response.choices[0].message.content)