max developers SDK 0.4.0
API reference

Import Max Code Project

POST /v1/max-code/projects/import

This operation can change data. Use resources you control.

Request fields

FieldLocationTypeRequired
agent_idbodystring | nullOptional
api_key_idbodystring | nullOptional
api_key_namebodystring | nullOptional
entrybodystring | nullOptional
filesbodyList of objectRequired
session_idbodystring | nullOptional
titlebodystring | nullOptional

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.postV1MaxCodeProjectsImport({
  "body": {
    "files": [
      {
        "path": "index.html",
        "language": "html",
        "content": "<h1>Support</h1>"
      }
    ],
    "title": "Support dashboard",
    "entry": "index.html"
  }
});
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_v1_max_code_projects_import(**{'body': {'files': [{'path': 'index.html',
                     'language': 'html',
                     'content': '<h1>Support</h1>'}],
          'title': 'Support dashboard',
          'entry': 'index.html'}})
    print(result)
Response fields

Errors and recovery