下载地址
https://www.zhengdianxue.com/wp-content/uploads/skills/org-i17594xw--afci-text-to-image.zip将提示词发送给你的 AI 安装该 skills
请根据 https://skillhub.cn/install/skillhub.md,安装 @org-i17594xw/afci-text-to-image。根据文字描述生成一张 AI 图片,适用于插画、海报、产品视觉和场景概念图,支持按次付费调用。
阅读全文 (展开查看完整说明)
概述
AFCI Text to Image
Package version: 1.1.0.
Invoke this endpoint only through SkillHub's authenticated Skill transport. The platform must attach its verified caller identity, timestamp, nonce, body digest, and signature. Never synthesize, copy, or retry those authentication headers yourself. A 401 means authentication or nonce validation failed; a 503 CALLER_AUTH_PROTOCOL_UNAVAILABLE means the merchant has not activated the official verifier. Stop without paying in either case.
Generate one image through the paid asynchronous API. Do not send personal identity data, credentials, payment details, illegal content, or prompts that violate third-party rights. Refuse impersonation, non-consensual intimate content, identity fraud, or a request to reproduce protected work as if it were an authorized original. For recognizable real people, confirm the user has a legitimate, consent-respecting use before proceeding.
Request
POST https://api.hpminiprogram.top/api/v1/skill-pay/images/text-to-image
Content-Type: application/json
Idempotency-Key: <UUID v4>Use the strict body:
{
"prompt": "A concise, self-contained image description",
"outputCount": 1
}Generate one UUID v4 and preserve it. Do not add fields. Keep the prompt and body identical after payment. After trimming surrounding whitespace, prompt must contain 1 through 800 characters. Prompts containing URLs, contact details, prohibited content, or unsafe impersonation requests can be rejected with 400 CONTENT_REVIEW_REJECTED; revise only with the user's agreement and use a new idempotency key only when the body actually changes.
Complete payment
- Check that
weixinpay_payis available. If unavailable, tell the user that this Agent cannot complete the paid request and stop. - POST without
X-Out-Trade-No. - On
402, preserveWeixinPay-RequiredandX-Out-Trade-Nofrom the response headers. The body also carries payment guidance. - Pass the
WeixinPay-Requiredvalue aspaymentCodetoweixinpay_payand obtain explicit user authorization. - After payment succeeds, POST the exact same body using the same
Idempotency-Key, plus the savedX-Out-Trade-No. - A newly queued task returns
202 ACCEPTED; savetask.idandtask.statusUrl. If the same paid request already reached a terminal state, the POST can instead return200with the full terminaltask; handle it using the status rules below. A repeated paid request must reuse the same task and must not create another charge.
The accepted response has this shape:
{
"code": "ACCEPTED",
"requestId": "uuid",
"outTradeNo": "SP...",
"alreadyFulfilled": false,
"task": {
"id": "uuid",
"status": "pending",
"statusUrl": "https://api.hpminiprogram.top/api/v1/skill-pay/images/tasks/uuid",
"nextPollAfterMs": 2000
}
}If a 402 omits either payment header, do not pay; report an invalid payment response and retry later with the same idempotency key. Never report success from a caller-supplied payment flag. If paid retry returns 402, wait briefly and retry the same order. Treat 409 as body mismatch and 410 as order expiry. If an upstream capacity layer returns 429, honor Retry-After; the Skill API itself does not apply a per-caller daily order quota. Before payment, retry network/5xx failures with the same idempotency key at most twice. After payment, preserve the order and task identifiers and never create a replacement order merely because a response is uncertain. If the paid POST returns a network error or 5xx, retry that same POST with the same body, idempotency key, and order number up to three times; this is also how to recover the existing task or its refund state after an enqueue failure.
Poll and return the image
Before using task.statusUrl, require HTTPS origin https://api.hpminiprogram.top and a path beginning /api/v1/skill-pay/images/tasks/. Reject any other origin or path. GET that URL with the saved X-Out-Trade-No header.
Poll for at most 10 minutes. Use nextPollAfterMs when it is an integer from 1000 through 30000; otherwise wait 2000 ms. Do not busy-loop. For 429, honor Retry-After; for a network error or 5xx, back off up to 10 seconds and keep the same task. If the deadline expires, report that generation is still pending and preserve the task URL and order number for a later status check.
202: generation is queued or running; poll later.200withcode: "SUCCESS"andtask.status: "succeeded": readtask.images[]; each item containsurl,mimeType, andsizeBytes. Return the supplied image URL and a short description.200with a failed orrefund_requiredtask: reporttask.errorCodeandtask.refundStatus(required,processing, orfailed) without inventing an image or claiming a completed refund. Preserve the same task and order for recovery; never open a replacement paid order.200withcode: "REFUNDED"andtask.status: "refunded": report that the recorded refund has completed; do not claim an image was generated.401,403, or404: stop; do not send the order header to another URL.- A malformed response or unexpected status/code is a service error, not a generated image.
Generated image URLs are short-lived, typically about five minutes. Present or download them promptly and tell the user that an expired URL requires checking the same task again, not creating a new paid order.
Do not expose provider credentials, internal object keys, prompts from other requests, moderation details, or server logs.