100 free credits. No credit card required. Get a key

Plan the calls for a task

A task in plain words becomes the chain of calls that does it, with links and handles from the task filled in and the total cost.

GET /v1/utility/planBeta0 credits per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/utility/plan?task=comments%20on%20https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 0 credits
{
"task": "comments on https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"recipe": null,
"understood": {
"links": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"handles": [],
"query": null
},
"steps": [
{
"step": 1,
"endpoint": "youtube.video.comments",
"tool": "youtube_video_comments",
"method": "GET",
"path": "/v1/youtube/videos/{id}/comments",
"params": {
"id": "dQw4w9WgXcQ"
},
"credits": 1,
"why": "Reads https://www.youtube.com/watch?v=dQw4w9WgXcQ the way the task asks."
}
],
"missing_inputs": [],
"total_credits": 1,
"keyless_usd": 0.01,
"note": "Call the steps in order; a later step takes ids from the one before it. Costs are per call; failed calls are free."
}

Parameters

NameTypeDescription
taskquerystringWhat you want, in plain words. Example: get the comments on https://www.youtube.com/watch?v=dQw4w9WgXcQ.
queryquerystringSame as task.
Status codes
StatusMeaning
200The plan: steps, missing inputs, total cost.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404No such endpoint, recipe or platform.
429Too many requests. Wait for Retry-After seconds.
503Utility is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

Questions

Does it cost anything?

No. Discovery endpoints are free and need no API key, so an agent can look around before it signs up.

Reddit, X and every other platform named here are trademarks of their owners. We are not affiliated with or endorsed by any of them.