llm.md

Maritime LLM

Run agents

Maritime LLM is an OpenAI-compatible model endpoint for your agents. Each call uses a per-agent token and draws down your prepaid AI credits. You do not need an OpenAI account.

Endpoint and token

Variable Value
OPENAI_BASE_URL https://api.maritime.sh/api/llm/v1
OPENAI_API_KEY A per-agent token that starts with mllm_

Maritime writes both variables to the agent's environment. There is no account-wide key, and the endpoint accepts OpenAI API paths with GET and POST. It speaks the OpenAI format only, so Anthropic clients need your own ANTHROPIC_API_KEY.

Get the credentials

Templates and known harnesses, such as OpenClaw, Hermes, ZeroClaw, CrewAI, and LangGraph, get both variables when you create the agent.

An agent with framework custom, docker, or auto starts with neither variable, because Maritime does not know how your application reads them. To add them, use one of these options:

The last two options replace an OPENAI_API_KEY that the agent already has.

Call a model

Any client that reads the two variables works without other configuration. This example runs inside the agent:

from openai import OpenAI

client = OpenAI()
response = client.chat.completions.create(
    model="gpt-5.4",
    messages=[{"role": "user", "content": "Say hello."}],
)
print(response.choices[0].message.content)

The same call with curl:

curl "$OPENAI_BASE_URL/chat/completions" \
    -H "Authorization: Bearer $OPENAI_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"model": "gpt-5.4", "messages": [{"role": "user", "content": "Say hello."}]}'

EU routing

EU routing is set per account and is available on request. There is no separate EU URL. You keep the same base URL and token, and Maritime sends calls that use an mllm_ token to eu.api.openai.com.

Use your own key

To pay OpenAI directly, set OPENAI_API_KEY to your own key as a secret env var. Calls with your own key do not use AI credits and have no Maritime spend limit.

If the agent keeps the Maritime base URL, the endpoint forwards your key to api.openai.com. This also applies to an account that has EU routing.

Errors

The endpoint returns OpenAI's own response and status code for a call that reaches OpenAI. Maritime adds these errors:

Status Meaning
401 The request has no Authorization bearer token
402 The account has no AI credits left. The error code is budget_exhausted. Do not retry until you add credits
404 The token belongs to an agent that no longer exists
429 The agent reached its monthly spend limit. Retry after the Retry-After value, or raise the limit (see spend limits)
503 Maritime could not select a route for the call. Retry later