Models
Simulate a model
Run a dry-run simulation against a model using provided input values. Does not create a model run or persist results.
POST
/
models
/
{model_id}
/
simulate
Simulate a model
curl --request POST \
--url https://app.gomangrove.com/api/v1/models/{model_id}/simulate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"inputs": {
"feedstock-volume": 1000,
"carbon-content": 0.45
},
"start_time": "2025-01-01T00:00:00Z",
"end_time": "2025-03-31T23:59:59Z"
}
'import requests
url = "https://app.gomangrove.com/api/v1/models/{model_id}/simulate"
payload = {
"inputs": {
"feedstock-volume": 1000,
"carbon-content": 0.45
},
"start_time": "2025-01-01T00:00:00Z",
"end_time": "2025-03-31T23:59:59Z"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inputs: {'feedstock-volume': 1000, 'carbon-content': 0.45},
start_time: '2025-01-01T00:00:00Z',
end_time: '2025-03-31T23:59:59Z'
})
};
fetch('https://app.gomangrove.com/api/v1/models/{model_id}/simulate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.gomangrove.com/api/v1/models/{model_id}/simulate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inputs' => [
'feedstock-volume' => 1000,
'carbon-content' => 0.45
],
'start_time' => '2025-01-01T00:00:00Z',
'end_time' => '2025-03-31T23:59:59Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.gomangrove.com/api/v1/models/{model_id}/simulate"
payload := strings.NewReader("{\n \"inputs\": {\n \"feedstock-volume\": 1000,\n \"carbon-content\": 0.45\n },\n \"start_time\": \"2025-01-01T00:00:00Z\",\n \"end_time\": \"2025-03-31T23:59:59Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.gomangrove.com/api/v1/models/{model_id}/simulate")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"inputs\": {\n \"feedstock-volume\": 1000,\n \"carbon-content\": 0.45\n },\n \"start_time\": \"2025-01-01T00:00:00Z\",\n \"end_time\": \"2025-03-31T23:59:59Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gomangrove.com/api/v1/models/{model_id}/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputs\": {\n \"feedstock-volume\": 1000,\n \"carbon-content\": 0.45\n },\n \"start_time\": \"2025-01-01T00:00:00Z\",\n \"end_time\": \"2025-03-31T23:59:59Z\"\n}"
response = http.request(request)
puts response.read_body{
"results": {
"net-carbon-removal": 450.5,
"emissions": 12.3
},
"errors": [],
"execution_time_ms": 45.2
}Authorizations
Path Parameters
Model friendly ID (e.g., mdl_abc123def456)
Body
application/json
⌘I
Simulate a model
curl --request POST \
--url https://app.gomangrove.com/api/v1/models/{model_id}/simulate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"inputs": {
"feedstock-volume": 1000,
"carbon-content": 0.45
},
"start_time": "2025-01-01T00:00:00Z",
"end_time": "2025-03-31T23:59:59Z"
}
'import requests
url = "https://app.gomangrove.com/api/v1/models/{model_id}/simulate"
payload = {
"inputs": {
"feedstock-volume": 1000,
"carbon-content": 0.45
},
"start_time": "2025-01-01T00:00:00Z",
"end_time": "2025-03-31T23:59:59Z"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inputs: {'feedstock-volume': 1000, 'carbon-content': 0.45},
start_time: '2025-01-01T00:00:00Z',
end_time: '2025-03-31T23:59:59Z'
})
};
fetch('https://app.gomangrove.com/api/v1/models/{model_id}/simulate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.gomangrove.com/api/v1/models/{model_id}/simulate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inputs' => [
'feedstock-volume' => 1000,
'carbon-content' => 0.45
],
'start_time' => '2025-01-01T00:00:00Z',
'end_time' => '2025-03-31T23:59:59Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.gomangrove.com/api/v1/models/{model_id}/simulate"
payload := strings.NewReader("{\n \"inputs\": {\n \"feedstock-volume\": 1000,\n \"carbon-content\": 0.45\n },\n \"start_time\": \"2025-01-01T00:00:00Z\",\n \"end_time\": \"2025-03-31T23:59:59Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.gomangrove.com/api/v1/models/{model_id}/simulate")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"inputs\": {\n \"feedstock-volume\": 1000,\n \"carbon-content\": 0.45\n },\n \"start_time\": \"2025-01-01T00:00:00Z\",\n \"end_time\": \"2025-03-31T23:59:59Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gomangrove.com/api/v1/models/{model_id}/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputs\": {\n \"feedstock-volume\": 1000,\n \"carbon-content\": 0.45\n },\n \"start_time\": \"2025-01-01T00:00:00Z\",\n \"end_time\": \"2025-03-31T23:59:59Z\"\n}"
response = http.request(request)
puts response.read_body{
"results": {
"net-carbon-removal": 450.5,
"emissions": 12.3
},
"errors": [],
"execution_time_ms": 45.2
}