Eval runs
Pay for one local eval iteration
Collect the declared prompt fee and reserve one iteration atomically before execution. Retries with the same identity reuse the receipt; changed requests conflict. Uploads claim the payment without charging again.
POST
/
projects
/
{projectId}
/
eval-ingest
/
pay-iteration
Pay for one local eval iteration
curl --request POST \
--url https://app.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"runStartId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"iterationKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"caseId": "<string>",
"billableSteps": 4503599627370496
}
'import requests
url = "https://app.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration"
payload = {
"runStartId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"iterationKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"caseId": "<string>",
"billableSteps": 4503599627370496
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
runStartId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
iterationKey: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
caseId: '<string>',
billableSteps: 4503599627370496
})
};
fetch('https://app.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration', 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.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration",
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([
'runStartId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'iterationKey' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'caseId' => '<string>',
'billableSteps' => 4503599627370496
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration"
payload := strings.NewReader("{\n \"runStartId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"iterationKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"caseId\": \"<string>\",\n \"billableSteps\": 4503599627370496\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"runStartId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"iterationKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"caseId\": \"<string>\",\n \"billableSteps\": 4503599627370496\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"runStartId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"iterationKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"caseId\": \"<string>\",\n \"billableSteps\": 4503599627370496\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
MCPJam API key (sk_…). Create one at Settings → API keys. Guest sessions cannot use the API, and API keys cannot manage other API keys.
Path Parameters
Project id, or default to resolve the authenticated organization's Default project.
Body
application/json
Response
Iteration payment receipt with paymentId, runStartId, iterationKey and billableSteps.
Was this page helpful?
⌘I
Pay for one local eval iteration
curl --request POST \
--url https://app.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"runStartId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"iterationKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"caseId": "<string>",
"billableSteps": 4503599627370496
}
'import requests
url = "https://app.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration"
payload = {
"runStartId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"iterationKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"caseId": "<string>",
"billableSteps": 4503599627370496
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
runStartId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
iterationKey: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
caseId: '<string>',
billableSteps: 4503599627370496
})
};
fetch('https://app.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration', 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.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration",
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([
'runStartId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'iterationKey' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'caseId' => '<string>',
'billableSteps' => 4503599627370496
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration"
payload := strings.NewReader("{\n \"runStartId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"iterationKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"caseId\": \"<string>\",\n \"billableSteps\": 4503599627370496\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"runStartId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"iterationKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"caseId\": \"<string>\",\n \"billableSteps\": 4503599627370496\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.mcpjam.com/api/v1/projects/{projectId}/eval-ingest/pay-iteration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"runStartId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"iterationKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"caseId\": \"<string>\",\n \"billableSteps\": 4503599627370496\n}"
response = http.request(request)
puts response.read_body
