max developers SDK 0.4.0
API reference

Start Run

POST /groups/{group_id}/workspace/runs

This operation can change data. Use resources you control.

This operation can spend credits. Save the request or run identifier before retrying.

Request fields

FieldLocationTypeRequired
group_idpathstringRequired
agent_idbodystringRequired
promptbodystringRequired
request_idbodystringRequired
titlebodystringRequired

Examples

Use the environment settings from Quickstart. Replace sample resource IDs with your own. The examples show the required request shape.

import { MaxClient } from "@elmax/api";

const max = new MaxClient({
  baseURL: process.env.MAX_API_URL,
  apiKey: process.env.MAX_API_KEY,
});

const result = await max.api.postGroupsGroupIdWorkspaceRuns({
  "path": {
    "group_id": "grp_example"
  },
  "body": {
    "agent_id": "agt_example",
    "title": "Welcome",
    "prompt": "Summarize these notes.",
    "request_id": "example"
  }
});
console.log(result);
import os
from elmax_ai import MaxClient

with MaxClient(base_url=os.environ["MAX_API_URL"], api_key=os.environ["MAX_API_KEY"]) as max:
    result = max.api.post_groups_group_id_workspace_runs(**{'path': {'group_id': 'grp_example'},
 'body': {'agent_id': 'agt_example',
          'title': 'Welcome',
          'prompt': 'Summarize these notes.',
          'request_id': 'example'}})
    print(result)

Errors and recovery