curl --request POST \
--url https://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"actions": [
{
"field_sid": "<string>",
"force_rerun": true,
"field_type": "action_ai_research",
"payload": {},
"tool_sid": "<string>",
"provider": "<string>",
"model": "<string>",
"play_sid": "<string>"
}
],
"playtable_sid": "<string>",
"rows": 500000
}
'import requests
url = "https://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits"
payload = {
"actions": [
{
"field_sid": "<string>",
"force_rerun": True,
"field_type": "action_ai_research",
"payload": {},
"tool_sid": "<string>",
"provider": "<string>",
"model": "<string>",
"play_sid": "<string>"
}
],
"playtable_sid": "<string>",
"rows": 500000
}
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Team-SID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
actions: [
{
field_sid: '<string>',
force_rerun: true,
field_type: 'action_ai_research',
payload: {},
tool_sid: '<string>',
provider: '<string>',
model: '<string>',
play_sid: '<string>'
}
],
playtable_sid: '<string>',
rows: 500000
})
};
fetch('https://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits', 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://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits",
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([
'actions' => [
[
'field_sid' => '<string>',
'force_rerun' => true,
'field_type' => 'action_ai_research',
'payload' => [
],
'tool_sid' => '<string>',
'provider' => '<string>',
'model' => '<string>',
'play_sid' => '<string>'
]
],
'playtable_sid' => '<string>',
'rows' => 500000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Team-SID: <api-key>"
],
]);
$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://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits"
payload := strings.NewReader("{\n \"actions\": [\n {\n \"field_sid\": \"<string>\",\n \"force_rerun\": true,\n \"field_type\": \"action_ai_research\",\n \"payload\": {},\n \"tool_sid\": \"<string>\",\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"play_sid\": \"<string>\"\n }\n ],\n \"playtable_sid\": \"<string>\",\n \"rows\": 500000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<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://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"actions\": [\n {\n \"field_sid\": \"<string>\",\n \"force_rerun\": true,\n \"field_type\": \"action_ai_research\",\n \"payload\": {},\n \"tool_sid\": \"<string>\",\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"play_sid\": \"<string>\"\n }\n ],\n \"playtable_sid\": \"<string>\",\n \"rows\": 500000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actions\": [\n {\n \"field_sid\": \"<string>\",\n \"force_rerun\": true,\n \"field_type\": \"action_ai_research\",\n \"payload\": {},\n \"tool_sid\": \"<string>\",\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"play_sid\": \"<string>\"\n }\n ],\n \"playtable_sid\": \"<string>\",\n \"rows\": 500000\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "action",
"action": "<string>",
"item": "<unknown>",
"result": {
"min": 123,
"expected": 123,
"max": 123,
"currency": "credits",
"priced_at": "<string>",
"basis": {
"rows": {
"form": "<string>",
"requested": 123,
"matched": 123
},
"rows_sampled": 1,
"sampled": true
},
"actions": [
{
"type": "column",
"min": 123,
"expected": 123,
"max": 123,
"rows": 1,
"per_row": {
"min": 123,
"expected": 123,
"max": 123
},
"detail": {}
}
]
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}{
"success": false,
"error": {
"code": "validation_failed",
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"severity": "hard",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}{
"success": false,
"error": {
"code": "validation_failed",
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"severity": "hard",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}Estimate credits
What anything that spends credits would cost BEFORE it spends them, in one answer: the money-honesty gate (call it, tell the user the range, then act). actions[] carries 1..20 of: column (a saved action column run over the rows: field_sid, force_rerun, cells not_run | error; the columns of one table are priced as ONE run: the registry’s per-step ranges, an email lane by outcome, a Use AI column on a sample); column_draft (a Use AI column before it exists: field_type action_ai_research and the draft payload, on the grid playtable_sid + object_type name; one action per model compares models); unit (one call of one tool times the rows: tool_sid, a column catalog read such as get_person_posts, or in:.); semantic_index (a column’s Semantic search switched on or to another embed model: field_sid, provider, model; the backfill now, a later value as a range in per_row); play (one run of a play now: play_sid; matched, acted, skipped, the ceiling and the month in detail). rows is a count (0..1000000) or the run’s scope (object_sids XOR view_sid / filter); omitted, a column prices the whole table, a unit one call. Answers min, expected and max in credits (pass max as max_budget to create_playtable_run, never expected), the basis and each action’s numbers, rows, per_row and detail. No writes, no charges. What was spent is the credit ledger.
Contract:
- MCP tool
estimate_credits, registry packagemcp.playtables/playtable_fields, mountplaytables.columns. - Operation
action, response envelopeaction. - Flags: read only.
curl --request POST \
--url https://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"actions": [
{
"field_sid": "<string>",
"force_rerun": true,
"field_type": "action_ai_research",
"payload": {},
"tool_sid": "<string>",
"provider": "<string>",
"model": "<string>",
"play_sid": "<string>"
}
],
"playtable_sid": "<string>",
"rows": 500000
}
'import requests
url = "https://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits"
payload = {
"actions": [
{
"field_sid": "<string>",
"force_rerun": True,
"field_type": "action_ai_research",
"payload": {},
"tool_sid": "<string>",
"provider": "<string>",
"model": "<string>",
"play_sid": "<string>"
}
],
"playtable_sid": "<string>",
"rows": 500000
}
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Team-SID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
actions: [
{
field_sid: '<string>',
force_rerun: true,
field_type: 'action_ai_research',
payload: {},
tool_sid: '<string>',
provider: '<string>',
model: '<string>',
play_sid: '<string>'
}
],
playtable_sid: '<string>',
rows: 500000
})
};
fetch('https://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits', 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://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits",
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([
'actions' => [
[
'field_sid' => '<string>',
'force_rerun' => true,
'field_type' => 'action_ai_research',
'payload' => [
],
'tool_sid' => '<string>',
'provider' => '<string>',
'model' => '<string>',
'play_sid' => '<string>'
]
],
'playtable_sid' => '<string>',
'rows' => 500000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Team-SID: <api-key>"
],
]);
$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://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits"
payload := strings.NewReader("{\n \"actions\": [\n {\n \"field_sid\": \"<string>\",\n \"force_rerun\": true,\n \"field_type\": \"action_ai_research\",\n \"payload\": {},\n \"tool_sid\": \"<string>\",\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"play_sid\": \"<string>\"\n }\n ],\n \"playtable_sid\": \"<string>\",\n \"rows\": 500000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<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://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"actions\": [\n {\n \"field_sid\": \"<string>\",\n \"force_rerun\": true,\n \"field_type\": \"action_ai_research\",\n \"payload\": {},\n \"tool_sid\": \"<string>\",\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"play_sid\": \"<string>\"\n }\n ],\n \"playtable_sid\": \"<string>\",\n \"rows\": 500000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api2.getsales.io/playtables/v1/api/playtable-fields/estimate-credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actions\": [\n {\n \"field_sid\": \"<string>\",\n \"force_rerun\": true,\n \"field_type\": \"action_ai_research\",\n \"payload\": {},\n \"tool_sid\": \"<string>\",\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"play_sid\": \"<string>\"\n }\n ],\n \"playtable_sid\": \"<string>\",\n \"rows\": 500000\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "action",
"action": "<string>",
"item": "<unknown>",
"result": {
"min": 123,
"expected": 123,
"max": 123,
"currency": "credits",
"priced_at": "<string>",
"basis": {
"rows": {
"form": "<string>",
"requested": 123,
"matched": 123
},
"rows_sampled": 1,
"sampled": true
},
"actions": [
{
"type": "column",
"min": 123,
"expected": 123,
"max": 123,
"rows": 1,
"per_row": {
"min": 123,
"expected": 123,
"max": 123
},
"detail": {}
}
]
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}{
"success": false,
"error": {
"code": "validation_failed",
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"severity": "hard",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}{
"success": false,
"error": {
"code": "validation_failed",
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"severity": "hard",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}Authorizations
Body
Request body of estimate_credits.