Agents and SDKs

Use Runlode with OpenAI SDKs and agent tools such as Hermes Agent: base URL, key and model ID.

Any OpenAI-compatible client#

Runlode speaks the OpenAI chat completions format, including streaming and tool calls. A client needs three values: the base URL, a Runlode API key and a model ID from GET /v1/models.

Base URL   https://api.runlode.xyz/v1
API key    $RUNLODE_KEY
Model      deepseek-v4.1-flash

Hermes Agent#

Run hermes model, choose Custom endpoint, and enter the base URL, your key and a model ID. Or set it in ~/.hermes/config.yaml:

model:
  provider: custom
  base_url: https://api.runlode.xyz/v1
  default: deepseek-v4.1-flash
  key_env: RUNLODE_KEY

Put RUNLODE_KEY=run_… in ~/.hermes/.env. Hermes streams and uses tools; pick a model that supports tool calling.

OpenAI SDK with streaming and tools#

from openai import OpenAI
import os

client = OpenAI(base_url="https://api.runlode.xyz/v1", api_key=os.environ["RUNLODE_KEY"])
stream = client.chat.completions.create(
    model="deepseek-v4.1-flash",
    messages=[{"role": "user", "content": "What time is it in UTC?"}],
    tools=[{"type": "function", "function": {"name": "get_time", "parameters": {"type": "object", "properties": {}}}}],
    stream=True,
)
for chunk in stream:
    for choice in chunk.choices:
        print(choice.delta)

Each step of an agent sends the whole conversation and the tool list again, so agents use many more tokens than single prompts. Watch Usage and your AI balance.

Search documentation

Start typing to search the documentation.