GiuliaAPIDocumentationTry the agent demo

Getting started

Run your first simulation.

The same Python example as the homepage: create a scenario, run it, and read mean UE throughput.

1. Open the notebook

Open the existing notebook in Google Colab to try the example in your browser. You need an API key from your deployment administrator; see access and authentication.

To run the example locally, install requests:

python -m pip install requests

2. Create, run, and read results

Replace your-api-key with your key. This example creates an urban macro downlink scenario with one episode. It uses the returned sim_id to run that simulation and retrieve its results.

import requests

base = "https://www.giuliaAPI.com"
headers = {
    "X-API-Key": "your-api-key",
}

# Create a simulation in your API-key workspace.
sim = requests.post(f"{base}/api/create_simulation", headers=headers, json={
    "scenario_model": "ITU_R_M2135_UMa",
    "ue_distribution": "uniform",
    "link_direction": "downlink",
    "number_of_episodes": 1,
}).json()

# Run the simulation using its returned ID.
requests.post(f"{base}/api/run_simulation", headers=headers, json={"sim_id": sim["sim_id"]})

# Read aggregated results from that simulation.
results = requests.post(f"{base}/api/get_aggregated_results", headers=headers, json={
    "sim_id": sim["sim_id"],
    "kpis": ["ue_throughput_Mbps"],
    "group_by": "all",
    "metrics": ["mean"],
}).json()

mean_throughput = results["data"]["ue_throughput_Mbps"]["all"]["mean"]
print(f"Mean UE throughput is {mean_throughput:.2f} Mbps")

3. Read the output

The example prints mean UE throughput in Mbps. The value is in data.ue_throughput_Mbps.all.mean and depends on the simulated scenario. It is an average across UE observations, not total network throughput.

Explore the KPI reference for other metrics, or the tool reference for available operations.

Next steps

When finished, use delete_simulation with the returned sim_id to release the simulation. See workspaces and lifecycle for retention and cleanup, or troubleshooting if a request fails.