picsart_preflight
ActiveTool of Picsart GenAI
Free pre-flight check before `picsart_generate`: in ONE call it (1) validates a candidate params object against the model's parameter schema + inter-parameter constraints, and (2) quotes the credit cost — without running the model or charging the user. Use this after assembling params (user input, derived defaults, model swaps) and before generating, to surface bad arguments and show cost. Do NOT use it to look up which params a model accepts (use `picsart_model_params`) or to actually generate (use `picsart_generate`). Required inputs: `model` id and a `params` object (put the `prompt` inside `params`). Example: `{ model: "flux-2-pro", params: { prompt: "a cat in a hat", aspectRatio: "16:9", count: 1 } }`. Returns `{ model, valid, errors?, credits }`: `valid`/`errors` are from local validation (always present, no auth needed; `errors` only when invalid); `credits` is the dry-run cost (a number), or `null` when pricing is unavailable or the request is unauthenticated.
Parameters schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"model",
"params"
],
"properties": {
"model": {
"type": "string",
"description": "Model ID"
},
"params": {
"type": "object",
"description": "Candidate params (include the prompt). Validated locally and priced.",
"additionalProperties": {}
}
},
"additionalProperties": false
}No endpoints wrapped at confidence ≥ 0.50.
Parent server
Picsart GenAI
1/7 registries