TanqoryDocs

tanqoryExtAiGenerate

  • Mutation
  • Markets, tax and languages

Runs one generator on input and bills the store's AI credits (feature of the generator). idempotencyKey names the click (8–128 letters, digits, _ or -): the same key returns the same output and is billed once. The staff member needs ai.use and the generator's own permission. Refusals before any spend: INSUFFICIENT_CREDITS, SPEND_LIMIT_REACHED, THROTTLED, UNAVAILABLE_IN_REGION.

Arguments

ArgumentTypeRequiredDefault
generatorString!Required
idempotencyKeyString!Required
inputJSON!Required

Returns

TanqoryExtAiGeneratePayload

FieldTypeDescription
resultTanqoryExtAiGenerateResult
userErrors[TanqoryExtAiGenerateUserError!]!

Example request

A starting point: required arguments as variables and a few fields of the result. Replace the placeholders.

Set STORE_ID and TANQORY_ACCESS_TOKEN in your environment first (Make your first API call).

curl
curl -X POST "https://api.tanqory.com/admin/2026-10/stores/$STORE_ID/graphql" \
  -H "Authorization: Bearer $TANQORY_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"query":"mutation TanqoryExtAiGenerate($generator: String!, $idempotencyKey: String!, $input: JSON!) {\n  tanqoryExtAiGenerate(generator: $generator, idempotencyKey: $idempotencyKey, input: $input) {\n    userErrors {\n      code\n      field\n      message\n    }\n  }\n}","variables":{"generator":"","idempotencyKey":"","input":""}}'

Built from commit c0b3fb3fdef7 · API version 2026-10