Documentation Index
Fetch the complete documentation index at: https://aimp.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Python SDK
Use plain HTTP for simple server integrations. Use the AIMP Python packages when
you are authoring or publishing model projects.
Consumer execution with Python
import os
import requests
gateway_url = os.environ["AIMP_GATEWAY_URL"].rstrip("/")
payload = {
"model": "demo-model",
"mode": "execute",
"scope": "playground",
"input": {"text": "Hello from Python"},
"params": {},
}
response = requests.post(
f"{gateway_url}/api/runs",
headers={"X-API-Key": os.environ["AIMP_API_KEY"]},
json=payload,
timeout=60,
)
response.raise_for_status()
print(response.json())
Model authoring packages
Model authors install the SDK inside model projects:
python -m pip install ai-marketplace-sdk
The runtime entrypoint for model containers is:
python -m aimp_sdk.model_runner --module /app/main.py
When to use the CLI
Use the CLI for project scaffolding, contract validation, login, and publish
operations:
ai init demo-model --yes
ai contract validate --json
ai publish --configure --json
ai push
Continue with CLI publish if you are publishing a model.