Skip to main content
The Morse API is compatible with OpenAI’s Chat Completions API. Any client that lets you set a base URL can call it.

Create a key

  1. In the Morse app, open Settings and choose API keys.
  2. Click Create key and give the key a name.
  3. Copy the key. Morse shows it only once.
Store the key in an environment variable on the machine that calls the API:
A key pays for every request from your credits. If your balance is empty, buy credits first, or the API answers 402. See Billing.

Send a request

The base URL is https://api.trymorse.ai/v1.
The reply is a chat.completion object in OpenAI’s format.

Use the OpenAI SDKs

Set the SDK’s base URL to Morse’s and pass your key. Python:
JavaScript:
Run this code on a server, not in a web page. See Authentication.

Next steps