{
  "components": {
    "callbacks": {},
    "examples": {},
    "headers": {},
    "links": {},
    "parameters": {},
    "pathItems": {},
    "requestBodies": {},
    "responses": {},
    "schemas": {},
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "",
    "title": "AISA Twitter Relay",
    "version": "1",
    "x-aisa-capabilities": {
      "idempotency": "Idempotency-Key",
      "max_price": "X-AISA-Max-Price-USD",
      "quote": {
        "header": "X-AISA-Cost-Mode",
        "value": "quote"
      }
    },
    "x-aisa-catalogs": {
      "aisa-twitter": {
        "description": "",
        "title": "AISA Twitter Relay",
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          }
        },
        "x-aisa-document": {
          "facts_hash": "4629b96294875c448210d32f1a74b44ad7bab9721bd58b505e76c72a31741c73",
          "generator_version": "3",
          "protocol_version": "1",
          "schema_version": "1"
        },
        "x-aisa-plans": {
          "builder": 1.0,
          "display_plan": "payg",
          "payg": 1.0,
          "similarweb_payg": 1.0,
          "team": 1.0,
          "version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb"
        }
      }
    },
    "x-aisa-configured-paths": [
      "/apis/v1/twitter/auth_twitter",
      "/apis/v1/twitter/delete_twitter",
      "/apis/v1/twitter/follow_twitter",
      "/apis/v1/twitter/like_twitter",
      "/apis/v1/twitter/post_twitter",
      "/apis/v1/twitter/unfollow_twitter",
      "/apis/v1/twitter/unlike_twitter",
      "/apis/v1/twitter/upload_media"
    ],
    "x-aisa-document": {
      "composer_version": "26",
      "document_hash": "sha256:5a5596edff34913b2b6ac7492f35424686bfbccea75dab5db87e566bd58bb5ba",
      "facts_hash": "4629b96294875c448210d32f1a74b44ad7bab9721bd58b505e76c72a31741c73",
      "generator_version": "3",
      "protocol_version": "1",
      "response_pending": [],
      "schema_version": "1"
    },
    "x-aisa-plans": {
      "builder": 1.0,
      "display_plan": "payg",
      "payg": 1.0,
      "similarweb_payg": 1.0,
      "team": 1.0,
      "version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb"
    },
    "x-aisa-provider": "aisa-twitter"
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "openapi": "3.1.0",
  "paths": {
    "/apis/v1/twitter/auth_twitter": {
      "post": {
        "description": "默认价格配置\n\n<!-- aisa-pricing:start -->\n公开参考价格：每次成功请求 $0.000001 USD。 最终费用以账户适用价格及实际结算为准。\n<!-- aisa-pricing:end -->",
        "operationId": "authTwitterUser",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "aisa_api_key": "sk-aisa-...",
                "scopes": [
                  "follows.write",
                  "tweet.read",
                  "users.read"
                ]
              },
              "schema": {
                "properties": {
                  "aisa_api_key": {
                    "description": "Your AIsa API key (the `sk-aisa-...` value). REQUIRED in the JSON body in addition to the `Authorization: Bearer` header — the OAuth session is bound to this key. Sending only the header returns HTTP 422; sending only the body returns 404.",
                    "type": "string"
                  },
                  "scopes": {
                    "description": "要请求的可选 X OAuth 2.0 scope 列表。默认为 AIsa 的 Twitter 写入端点所需的集合：`follows.write`、`tweet.read`、`users.read`、`tweet.write`、`like.write`、`dm.read`、`dm.write`。",
                    "example": [
                      "follows.write",
                      "tweet.read",
                      "users.read"
                    ],
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "aisa_api_key"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "auth_url": "https://twitter.com/i/oauth2/authorize?response_type=code&client_id=AIsa&redirect_uri=https%3A%2F%2Fapi.aisa.one%2Fapis%2Fv1%2Ftwitter%2Foauth_callback&scope=follows.write%20tweet.read%20users.read&state=0c2...d1f&code_challenge=...&code_challenge_method=S256",
                  "expires_at": "2026-04-18T07:00:00Z",
                  "state": "0c2ad1f..."
                },
                "schema": {
                  "properties": {
                    "auth_url": {
                      "description": "短期有效的 X OAuth 授权 URL。在浏览器中打开该 URL，以便源用户批准所请求的权限范围。",
                      "format": "uri",
                      "type": "string"
                    },
                    "expires_at": {
                      "description": "`auth_url` 的过期时间。如果用户在此时间之前尚未完成流程，请请求一个新的 URL。",
                      "format": "date-time",
                      "type": "string"
                    },
                    "state": {
                      "description": "不透明的 CSRF state token，X 重定向回 AIsa 回调地址时，AIsa 将对其进行验证。如果需要关联此流程，请将其存储在客户端。",
                      "type": "string"
                    }
                  },
                  "required": [
                    "auth_url",
                    "state"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "已生成授权 URL。"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "OAuth_Twitter",
        "tags": [
          "default"
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "mpp": false,
          "mpp_methods": [],
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "x402": false
        },
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-category": "1",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-auth-twitter",
        "x-aisa-passthrough": true,
        "x-aisa-pricing": {
          "cost_contract": "explicit_zero",
          "customer_pricing": "fixed_success",
          "default_request_estimate_usd": 1e-06,
          "estimate_source": "profile_seed",
          "evidence_source": "request_snapshot"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": false,
          "request_wins": true
        },
        "x-aisa-response-source": {
          "content_hash": "sha256:d15181c8ed5401f11986eccf0af7bdc6f00112525fb33221644d7ad9962fe9ee",
          "kind": "upstream_success_contract",
          "source": {
            "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
            "converter": "scripts/import_existing_contracts.py@1",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "kind": "manual",
            "owner": "AIsa-team/docs",
            "path_space": "public",
            "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json"
          }
        },
        "x-aisa-revision": {
          "customer_pricing_ref": "43e3b1dc8aa7",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "46366661447c"
        },
        "x-aisa-runtime-operation": {
          "method": "ANY",
          "operation_id": "authTwitterUser",
          "path": "/apis/v1/twitter/auth_twitter"
        },
        "x-aisa-source": {
          "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
          "converter": "scripts/import_existing_contracts.py@1",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "kind": "manual",
          "owner": "AIsa-team/docs",
          "path_space": "public",
          "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/auth_twitter",
        "x-aisa-validation": "provider",
        "x-codeSamples": [
          {
            "label": "Reference example",
            "lang": "text",
            "source": "# Fixed reference example. Playground inputs do not update this sample.\ncurl --request POST \\\n  --url https://api.aisa.one/apis/v1/twitter/auth_twitter \\\n  --header 'Authorization: Bearer <token>' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"aisa_api_key\": \"sk-aisa-...\",\n  \"scopes\": [\n    \"follows.write\",\n    \"tweet.read\",\n    \"users.read\"\n  ]\n}'"
          }
        ]
      }
    },
    "/apis/v1/twitter/delete_twitter": {
      "post": {
        "description": "<!-- aisa-pricing:start -->\n公开参考价格：每次成功请求 $0.01 USD。 最终费用以账户适用价格及实际结算为准。\n<!-- aisa-pricing:end -->",
        "operationId": "any_aisa_twitter_apis_v1_twitter_delete_twitter",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "aisa_api_key": {
                    "description": "AIsa API key bound to the OAuth account; the wrapper requires this body field in addition to gateway authorization.",
                    "maxLength": 64,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tweet_id": {
                    "description": "The service strips surrounding whitespace first; the result must contain 1 to 64 characters. Length limits apply after normalization, not to the raw input.",
                    "type": "string",
                    "x-aisa-normalization": "strip",
                    "x-aisa-normalized-schema": {
                      "maxLength": 64,
                      "minLength": 1,
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "aisa_api_key",
                  "tweet_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "anyOf": [
                        {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null,
                      "description": "The owning service explicitly declares an optional dictionary of arbitrary values; nested Twitter result fields are opaque."
                    },
                    "msg": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful ApiResponse serialized by the owning service."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "Delete Tweet",
        "tags": [
          "default"
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "mpp": false,
          "mpp_methods": [],
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "x402": false
        },
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-category": "1",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-twitter/any_aisa_twitter_apis_v1_twitter_delete_twitter",
        "x-aisa-passthrough": true,
        "x-aisa-pricing": {
          "cost_contract": "fixed_success",
          "customer_multiplier": 1.0,
          "customer_pricing": "provider_cost_multiplier",
          "default_request_estimate_usd": 0.01,
          "estimate_source": "profile_seed",
          "evidence_source": "request_snapshot"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": false,
          "request_wins": true
        },
        "x-aisa-response-source": {
          "content_hash": "sha256:ceb00d7daef54bfee7ee74b3f14ce581f3ea92eb5631594e80cbafd3cb2c09c8",
          "kind": "upstream_success_contract",
          "source": {
            "content_hash": "sha256:7773cb5df79a9e270b725d7868f1f07c2bb511b882f9df0147caa3adfe9dcf5c",
            "converter": "scripts/wrapper_twitter_reference.py@3",
            "fetched_at": "2026-10-09T03:20:49.419328+00:00",
            "kind": "provider_openapi",
            "owner": "AIsa-team/docs",
            "policy_revision": "sha256:27265d53afb79ad24305d7888027ef69b1eef9755db30d6573a42639318ceea7",
            "refresh_policy": "pinned",
            "refresh_reason": "Owning-service route and schema commit is immutable; adopting a later revision requires declaration and binding review.",
            "review_period_days": 30,
            "source_pages": [
              {
                "raw_content_hash": "sha256:96c8d64c69f46aa82764b646496b66a64faebbb39eceadd6473ce4a540416617",
                "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/api/routes/twitter.py"
              },
              {
                "raw_content_hash": "sha256:eabe5a7587890c1754ea0175a97fe88a91afe1e98a80c1c22bbee58926a4c3f4",
                "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/schemas/twitter.py"
              }
            ],
            "source_revision": "9481772229feb96eed7fef509234d089cd0d7ec3",
            "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/api/routes/twitter.py"
          }
        },
        "x-aisa-revision": {
          "customer_pricing_ref": "fa0983997e25",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "a72356d3edb9"
        },
        "x-aisa-runtime-operation": {
          "method": "ANY",
          "operation_id": "any_aisa_twitter_apis_v1_twitter_delete_twitter",
          "path": "/apis/v1/twitter/delete_twitter"
        },
        "x-aisa-source": {
          "content_hash": "sha256:7773cb5df79a9e270b725d7868f1f07c2bb511b882f9df0147caa3adfe9dcf5c",
          "converter": "scripts/wrapper_twitter_reference.py@3",
          "fetched_at": "2026-10-09T03:20:49.419328+00:00",
          "kind": "provider_openapi",
          "owner": "AIsa-team/docs",
          "policy_revision": "sha256:27265d53afb79ad24305d7888027ef69b1eef9755db30d6573a42639318ceea7",
          "refresh_policy": "pinned",
          "refresh_reason": "Owning-service route and schema commit is immutable; adopting a later revision requires declaration and binding review.",
          "review_period_days": 30,
          "source_pages": [
            {
              "raw_content_hash": "sha256:96c8d64c69f46aa82764b646496b66a64faebbb39eceadd6473ce4a540416617",
              "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/api/routes/twitter.py"
            },
            {
              "raw_content_hash": "sha256:eabe5a7587890c1754ea0175a97fe88a91afe1e98a80c1c22bbee58926a4c3f4",
              "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/schemas/twitter.py"
            }
          ],
          "source_revision": "9481772229feb96eed7fef509234d089cd0d7ec3",
          "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/api/routes/twitter.py"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/delete_twitter",
        "x-aisa-validation": "provider"
      }
    },
    "/apis/v1/twitter/follow_twitter": {
      "post": {
        "description": "使已认证的源用户在 X/Twitter 上关注指定的目标用户。此操作映射[官方 X v2 `POST /2/users/{id}/following` 端点](https://docs.x.com/x-api/users/follow-user)，并通过 AIsa 网关路由。\n\n**身份认证。**这是一项写入操作，需要源用户的 OAuth 会话，并将其关联到您的 AIsa API 密钥。调用 `POST /apis/v1/twitter/auth_twitter` 一次即可关联您的 X 账户——之后，AIsa 会自动为使用您的密钥发送的每个写入请求使用该会话。\n\n**权限范围。**底层 X 会话必须具有 `follows.write`、`tweet.read` 和 `users.read`。\n\n<!-- aisa-pricing:start -->\n公开参考价格：每次成功请求 $0.015 USD。 最终费用以账户适用价格及实际结算为准。\n<!-- aisa-pricing:end -->",
        "operationId": "followTwitterUser",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "follow_user": {
                  "summary": "Follow @TwitterDev (id 2244994945)",
                  "value": {
                    "target_user_id": "2244994945"
                  }
                }
              },
              "schema": {
                "properties": {
                  "target_user_id": {
                    "description": "要关注的 X/Twitter 用户的数字 ID。必须匹配 X 正则表达式 `^[0-9]{1,19}$`。",
                    "example": "6253282",
                    "pattern": "^[0-9]{1,19}$",
                    "type": "string"
                  }
                },
                "required": [
                  "target_user_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "following": true,
                    "pending_follow": false
                  }
                },
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "following": {
                          "description": "当源用户现在已关注目标用户时为 `true`。",
                          "type": "boolean"
                        },
                        "pending_follow": {
                          "description": "当关注请求已发送给受保护账户且正在等待批准时为 `true`。",
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "关注成功（或已处于关注状态）。"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "Follow User",
        "tags": [
          "default"
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "mpp": false,
          "mpp_methods": [],
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "x402": false
        },
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-category": "1",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-follow-twitter",
        "x-aisa-passthrough": true,
        "x-aisa-pricing": {
          "cost_contract": "fixed_success",
          "customer_multiplier": 1.0,
          "customer_pricing": "provider_cost_multiplier",
          "default_request_estimate_usd": 0.015,
          "estimate_source": "profile_seed",
          "evidence_source": "request_snapshot"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": false,
          "request_wins": true
        },
        "x-aisa-response-source": {
          "content_hash": "sha256:5dbcf0479b1a98eedc56be5743e32861e896a403de07df6fe64d7ae4edcbcd10",
          "kind": "upstream_success_contract",
          "source": {
            "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
            "converter": "scripts/import_existing_contracts.py@1",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "kind": "manual",
            "owner": "AIsa-team/docs",
            "path_space": "public",
            "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json"
          }
        },
        "x-aisa-revision": {
          "customer_pricing_ref": "e7cbd5023d16",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "b6e4993af8a2"
        },
        "x-aisa-runtime-operation": {
          "method": "ANY",
          "operation_id": "followTwitterUser",
          "path": "/apis/v1/twitter/follow_twitter"
        },
        "x-aisa-source": {
          "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
          "converter": "scripts/import_existing_contracts.py@1",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "kind": "manual",
          "owner": "AIsa-team/docs",
          "path_space": "public",
          "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/follow_twitter",
        "x-aisa-validation": "provider",
        "x-codeSamples": [
          {
            "label": "Reference example",
            "lang": "text",
            "source": "# Fixed reference example. Playground inputs do not update this sample.\ncurl --request POST \\\n  --url https://api.aisa.one/apis/v1/twitter/follow_twitter \\\n  --header 'Authorization: Bearer <token>' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"target_user_id\": \"6253282\"\n}'"
          }
        ]
      }
    },
    "/apis/v1/twitter/like_twitter": {
      "post": {
        "description": "代表已认证的源用户点赞推文。此接口映射[官方 X v2 `POST /2/users/{id}/likes` 端点](https://docs.x.com/x-api/users/like-post)，并通过 AIsa 网关路由。\n\n**身份验证。**需要源用户的 OAuth 会话，并将其关联到您的 AIsa API 密钥。通过 `POST /apis/v1/twitter/auth_twitter` 关联一次账户即可。\n\n**权限范围。**底层 X 会话必须具有 `like.write`、`tweet.read` 和 `users.read` 权限。\n\n点赞已点赞的推文不会执行任何操作，但仍会返回 `200` 和 `liked: true`。\n\n<!-- aisa-pricing:start -->\n公开参考价格：每次成功请求 $0.015 USD。 最终费用以账户适用价格及实际结算为准。\n<!-- aisa-pricing:end -->",
        "operationId": "likeTwitter",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "like_tweet": {
                  "summary": "Like tweet 1346889436626259968",
                  "value": {
                    "tweet_id": "1346889436626259968"
                  }
                }
              },
              "schema": {
                "properties": {
                  "tweet_id": {
                    "description": "要点赞的推文数字 ID。必须匹配 X 的正则表达式 `^[0-9]{1,19}$`。",
                    "example": "1346889436626259968",
                    "pattern": "^[0-9]{1,19}$",
                    "type": "string"
                  }
                },
                "required": [
                  "tweet_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "liked": true
                  }
                },
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "liked": {
                          "description": "源用户点赞目标推文后为 `true`。",
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "点赞成功（或已点赞）。"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "Like Tweet",
        "tags": [
          "default"
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "mpp": false,
          "mpp_methods": [],
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "x402": false
        },
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-category": "1",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-like-twitter",
        "x-aisa-passthrough": true,
        "x-aisa-pricing": {
          "cost_contract": "fixed_success",
          "customer_multiplier": 1.0,
          "customer_pricing": "provider_cost_multiplier",
          "default_request_estimate_usd": 0.015,
          "estimate_source": "profile_seed",
          "evidence_source": "request_snapshot"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": false,
          "request_wins": true
        },
        "x-aisa-response-source": {
          "content_hash": "sha256:cff3e9cc2594065e99166601d9b244af882d345ea64b1041b96707365ca0a9ba",
          "kind": "upstream_success_contract",
          "source": {
            "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
            "converter": "scripts/import_existing_contracts.py@1",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "kind": "manual",
            "owner": "AIsa-team/docs",
            "path_space": "public",
            "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json"
          }
        },
        "x-aisa-revision": {
          "customer_pricing_ref": "e7cbd5023d16",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "4fd1032a2ef1"
        },
        "x-aisa-runtime-operation": {
          "method": "ANY",
          "operation_id": "likeTwitter",
          "path": "/apis/v1/twitter/like_twitter"
        },
        "x-aisa-source": {
          "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
          "converter": "scripts/import_existing_contracts.py@1",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "kind": "manual",
          "owner": "AIsa-team/docs",
          "path_space": "public",
          "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/like_twitter",
        "x-aisa-validation": "provider",
        "x-codeSamples": [
          {
            "label": "Reference example",
            "lang": "text",
            "source": "# Fixed reference example. Playground inputs do not update this sample.\ncurl --request POST \\\n  --url https://api.aisa.one/apis/v1/twitter/like_twitter \\\n  --header 'Authorization: Bearer <token>' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"tweet_id\": \"1346889436626259968\"\n}'"
          }
        ]
      }
    },
    "/apis/v1/twitter/post_twitter": {
      "post": {
        "description": "代表已认证的源用户发布新推文，或编辑现有推文。此接口镜像[官方 X v2 `POST /2/tweets` 端点](https://docs.x.com/x-api/posts/create-post)，并通过 AIsa 网关路由。\n\n**身份验证。**需要源用户的 OAuth 会话，并将其关联到你的 AIsa API 密钥。通过 `POST /apis/v1/twitter/auth_twitter` 完成一次账户关联。\n\n**权限范围。**底层 X 会话必须具有 `tweet.read`、`tweet.write` 和 `users.read` 权限。\n\n**互斥字段。**`media`、`poll`、`quote_tweet_id` 和 `card_uri` 不能在同一请求中组合使用。最多只能设置其中一个字段。\n\n<!-- aisa-pricing:start -->\n按用量计费；默认请求预估费用：$0.015 USD（不是固定价格）。 最终费用以账户适用价格及实际结算为准。\n<!-- aisa-pricing:end -->",
        "operationId": "postTwitter",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "default": {
                  "value": {
                    "content": "",
                    "in_reply_to_tweet_id": ""
                  }
                },
                "minimal": {
                  "value": {}
                }
              },
              "schema": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "allOf": [
                              {
                                "properties": {
                                  "content": {
                                    "not": {
                                      "const": ""
                                    }
                                  }
                                },
                                "required": [
                                  "content"
                                ]
                              },
                              {
                                "properties": {
                                  "content": {
                                    "default": "",
                                    "maxLength": 280,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "content"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "content": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "content"
                                  ]
                                }
                              },
                              {
                                "properties": {
                                  "text": {
                                    "not": {
                                      "const": ""
                                    }
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              },
                              {
                                "properties": {
                                  "text": {
                                    "default": "",
                                    "maxLength": 280,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "content": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "content"
                                  ]
                                }
                              },
                              {
                                "not": {
                                  "properties": {
                                    "text": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "text"
                                  ]
                                }
                              },
                              {
                                "anyOf": [
                                  {
                                    "properties": {
                                      "content": {
                                        "allOf": [
                                          {
                                            "default": "",
                                            "maxLength": 280,
                                            "type": "string"
                                          },
                                          {
                                            "const": ""
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "content"
                                    ]
                                  },
                                  {
                                    "properties": {
                                      "text": {
                                        "allOf": [
                                          {
                                            "default": "",
                                            "maxLength": 280,
                                            "type": "string"
                                          },
                                          {
                                            "const": ""
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "text"
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "not": {
                          "anyOf": [
                            {
                              "properties": {
                                "content": {}
                              },
                              "required": [
                                "content"
                              ]
                            },
                            {
                              "properties": {
                                "text": {}
                              },
                              "required": [
                                "text"
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "allOf": [
                              {
                                "properties": {
                                  "in_reply_to_tweet_id": {
                                    "not": {
                                      "const": ""
                                    }
                                  }
                                },
                                "required": [
                                  "in_reply_to_tweet_id"
                                ]
                              },
                              {
                                "properties": {
                                  "in_reply_to_tweet_id": {
                                    "default": "",
                                    "maxLength": 64,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "in_reply_to_tweet_id"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "in_reply_to_tweet_id": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "in_reply_to_tweet_id"
                                  ]
                                }
                              },
                              {
                                "properties": {
                                  "reply": {
                                    "properties": {
                                      "in_reply_to_tweet_id": {
                                        "not": {
                                          "const": ""
                                        }
                                      }
                                    },
                                    "required": [
                                      "in_reply_to_tweet_id"
                                    ]
                                  }
                                },
                                "required": [
                                  "reply"
                                ]
                              },
                              {
                                "properties": {
                                  "reply": {
                                    "properties": {
                                      "in_reply_to_tweet_id": {
                                        "default": "",
                                        "maxLength": 64,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "in_reply_to_tweet_id"
                                    ]
                                  }
                                },
                                "required": [
                                  "reply"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "in_reply_to_tweet_id": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "in_reply_to_tweet_id"
                                  ]
                                }
                              },
                              {
                                "not": {
                                  "properties": {
                                    "reply": {
                                      "properties": {
                                        "in_reply_to_tweet_id": {
                                          "not": {
                                            "const": ""
                                          }
                                        }
                                      },
                                      "required": [
                                        "in_reply_to_tweet_id"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reply"
                                  ]
                                }
                              },
                              {
                                "anyOf": [
                                  {
                                    "properties": {
                                      "in_reply_to_tweet_id": {
                                        "allOf": [
                                          {
                                            "default": "",
                                            "maxLength": 64,
                                            "type": "string"
                                          },
                                          {
                                            "const": ""
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "in_reply_to_tweet_id"
                                    ]
                                  },
                                  {
                                    "properties": {
                                      "reply": {
                                        "properties": {
                                          "in_reply_to_tweet_id": {
                                            "allOf": [
                                              {
                                                "default": "",
                                                "maxLength": 64,
                                                "type": "string"
                                              },
                                              {
                                                "const": ""
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "in_reply_to_tweet_id"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "reply"
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "not": {
                          "anyOf": [
                            {
                              "properties": {
                                "in_reply_to_tweet_id": {}
                              },
                              "required": [
                                "in_reply_to_tweet_id"
                              ]
                            },
                            {
                              "properties": {
                                "reply": {
                                  "properties": {
                                    "in_reply_to_tweet_id": {}
                                  },
                                  "required": [
                                    "in_reply_to_tweet_id"
                                  ]
                                }
                              },
                              "required": [
                                "reply"
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "allOf": [
                              {
                                "properties": {
                                  "media_ids": {
                                    "not": {
                                      "const": ""
                                    }
                                  }
                                },
                                "required": [
                                  "media_ids"
                                ]
                              },
                              {
                                "properties": {
                                  "media_ids": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "media_ids"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "media_ids": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "media_ids"
                                  ]
                                }
                              },
                              {
                                "properties": {
                                  "media": {
                                    "properties": {
                                      "media_ids": {
                                        "not": {
                                          "const": ""
                                        }
                                      }
                                    },
                                    "required": [
                                      "media_ids"
                                    ]
                                  }
                                },
                                "required": [
                                  "media"
                                ]
                              },
                              {
                                "properties": {
                                  "media": {
                                    "properties": {
                                      "media_ids": {
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      }
                                    },
                                    "required": [
                                      "media_ids"
                                    ]
                                  }
                                },
                                "required": [
                                  "media"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "media_ids": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "media_ids"
                                  ]
                                }
                              },
                              {
                                "not": {
                                  "properties": {
                                    "media": {
                                      "properties": {
                                        "media_ids": {
                                          "not": {
                                            "const": ""
                                          }
                                        }
                                      },
                                      "required": [
                                        "media_ids"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "media"
                                  ]
                                }
                              },
                              {
                                "anyOf": [
                                  {
                                    "properties": {
                                      "media_ids": {
                                        "allOf": [
                                          {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          {
                                            "const": ""
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "media_ids"
                                    ]
                                  },
                                  {
                                    "properties": {
                                      "media": {
                                        "properties": {
                                          "media_ids": {
                                            "allOf": [
                                              {
                                                "items": {
                                                  "type": "string"
                                                },
                                                "type": "array"
                                              },
                                              {
                                                "const": ""
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "media_ids"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "media"
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "not": {
                          "anyOf": [
                            {
                              "properties": {
                                "media_ids": {}
                              },
                              "required": [
                                "media_ids"
                              ]
                            },
                            {
                              "properties": {
                                "media": {
                                  "properties": {
                                    "media_ids": {}
                                  },
                                  "required": [
                                    "media_ids"
                                  ]
                                }
                              },
                              "required": [
                                "media"
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  }
                ],
                "properties": {
                  "aisa_api_key": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "card_uri": {
                    "maxLength": 256,
                    "type": "string"
                  },
                  "content": {
                    "anyOf": [
                      {
                        "default": "",
                        "maxLength": 280,
                        "type": "string"
                      },
                      {
                        "const": ""
                      }
                    ]
                  },
                  "in_reply_to_tweet_id": {
                    "anyOf": [
                      {
                        "default": "",
                        "maxLength": 64,
                        "type": "string"
                      },
                      {
                        "const": ""
                      }
                    ]
                  },
                  "media": {
                    "additionalProperties": false,
                    "properties": {
                      "media_ids": {
                        "description": "Alternate spelling for /media_ids; ignored when the canonical value is present and nonempty.",
                        "x-aisa-alias-target": "/media_ids"
                      },
                      "tagged_user_ids": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "media_files": {
                    "type": "string"
                  },
                  "media_ids": {
                    "anyOf": [
                      {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      {
                        "const": ""
                      }
                    ]
                  },
                  "poll": {
                    "additionalProperties": false,
                    "properties": {
                      "duration_minutes": {
                        "maximum": 9223372036854775807,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "options": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "quote_tweet_id": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "reply": {
                    "additionalProperties": false,
                    "properties": {
                      "auto_populate_reply_metadata": {
                        "type": "boolean"
                      },
                      "exclude_reply_user_ids": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "in_reply_to_tweet_id": {
                        "description": "Alternate spelling for /in_reply_to_tweet_id; ignored when the canonical value is present and nonempty.",
                        "x-aisa-alias-target": "/in_reply_to_tweet_id"
                      }
                    },
                    "type": "object"
                  },
                  "reply_settings": {
                    "maxLength": 32,
                    "type": "string"
                  },
                  "text": {
                    "description": "Alternate spelling for /content; ignored when the canonical value is present and nonempty.",
                    "x-aisa-alias-target": "/content"
                  }
                },
                "type": "object"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "allOf": [
                              {
                                "properties": {
                                  "content": {
                                    "not": {
                                      "const": ""
                                    }
                                  }
                                },
                                "required": [
                                  "content"
                                ]
                              },
                              {
                                "properties": {
                                  "content": {
                                    "default": "",
                                    "maxLength": 280,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "content"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "content": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "content"
                                  ]
                                }
                              },
                              {
                                "properties": {
                                  "text": {
                                    "not": {
                                      "const": ""
                                    }
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              },
                              {
                                "properties": {
                                  "text": {
                                    "default": "",
                                    "maxLength": 280,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "content": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "content"
                                  ]
                                }
                              },
                              {
                                "not": {
                                  "properties": {
                                    "text": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "text"
                                  ]
                                }
                              },
                              {
                                "anyOf": [
                                  {
                                    "properties": {
                                      "content": {
                                        "allOf": [
                                          {
                                            "default": "",
                                            "maxLength": 280,
                                            "type": "string"
                                          },
                                          {
                                            "const": ""
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "content"
                                    ]
                                  },
                                  {
                                    "properties": {
                                      "text": {
                                        "allOf": [
                                          {
                                            "default": "",
                                            "maxLength": 280,
                                            "type": "string"
                                          },
                                          {
                                            "const": ""
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "text"
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "not": {
                          "anyOf": [
                            {
                              "properties": {
                                "content": {}
                              },
                              "required": [
                                "content"
                              ]
                            },
                            {
                              "properties": {
                                "text": {}
                              },
                              "required": [
                                "text"
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "allOf": [
                              {
                                "properties": {
                                  "in_reply_to_tweet_id": {
                                    "not": {
                                      "const": ""
                                    }
                                  }
                                },
                                "required": [
                                  "in_reply_to_tweet_id"
                                ]
                              },
                              {
                                "properties": {
                                  "in_reply_to_tweet_id": {
                                    "default": "",
                                    "maxLength": 64,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "in_reply_to_tweet_id"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "in_reply_to_tweet_id": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "in_reply_to_tweet_id"
                                  ]
                                }
                              },
                              {
                                "properties": {
                                  "reply": {
                                    "properties": {
                                      "in_reply_to_tweet_id": {
                                        "not": {
                                          "const": ""
                                        }
                                      }
                                    },
                                    "required": [
                                      "in_reply_to_tweet_id"
                                    ]
                                  }
                                },
                                "required": [
                                  "reply"
                                ]
                              },
                              {
                                "properties": {
                                  "reply": {
                                    "properties": {
                                      "in_reply_to_tweet_id": {
                                        "default": "",
                                        "maxLength": 64,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "in_reply_to_tweet_id"
                                    ]
                                  }
                                },
                                "required": [
                                  "reply"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "in_reply_to_tweet_id": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "in_reply_to_tweet_id"
                                  ]
                                }
                              },
                              {
                                "not": {
                                  "properties": {
                                    "reply": {
                                      "properties": {
                                        "in_reply_to_tweet_id": {
                                          "not": {
                                            "const": ""
                                          }
                                        }
                                      },
                                      "required": [
                                        "in_reply_to_tweet_id"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reply"
                                  ]
                                }
                              },
                              {
                                "anyOf": [
                                  {
                                    "properties": {
                                      "in_reply_to_tweet_id": {
                                        "allOf": [
                                          {
                                            "default": "",
                                            "maxLength": 64,
                                            "type": "string"
                                          },
                                          {
                                            "const": ""
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "in_reply_to_tweet_id"
                                    ]
                                  },
                                  {
                                    "properties": {
                                      "reply": {
                                        "properties": {
                                          "in_reply_to_tweet_id": {
                                            "allOf": [
                                              {
                                                "default": "",
                                                "maxLength": 64,
                                                "type": "string"
                                              },
                                              {
                                                "const": ""
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "in_reply_to_tweet_id"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "reply"
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "not": {
                          "anyOf": [
                            {
                              "properties": {
                                "in_reply_to_tweet_id": {}
                              },
                              "required": [
                                "in_reply_to_tweet_id"
                              ]
                            },
                            {
                              "properties": {
                                "reply": {
                                  "properties": {
                                    "in_reply_to_tweet_id": {}
                                  },
                                  "required": [
                                    "in_reply_to_tweet_id"
                                  ]
                                }
                              },
                              "required": [
                                "reply"
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "allOf": [
                              {
                                "properties": {
                                  "media_ids": {
                                    "not": {
                                      "const": ""
                                    }
                                  }
                                },
                                "required": [
                                  "media_ids"
                                ]
                              },
                              {
                                "properties": {
                                  "media_ids": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "media_ids"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "media_ids": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "media_ids"
                                  ]
                                }
                              },
                              {
                                "properties": {
                                  "media": {
                                    "properties": {
                                      "media_ids": {
                                        "not": {
                                          "const": ""
                                        }
                                      }
                                    },
                                    "required": [
                                      "media_ids"
                                    ]
                                  }
                                },
                                "required": [
                                  "media"
                                ]
                              },
                              {
                                "properties": {
                                  "media": {
                                    "properties": {
                                      "media_ids": {
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      }
                                    },
                                    "required": [
                                      "media_ids"
                                    ]
                                  }
                                },
                                "required": [
                                  "media"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "media_ids": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "media_ids"
                                  ]
                                }
                              },
                              {
                                "not": {
                                  "properties": {
                                    "media": {
                                      "properties": {
                                        "media_ids": {
                                          "not": {
                                            "const": ""
                                          }
                                        }
                                      },
                                      "required": [
                                        "media_ids"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "media"
                                  ]
                                }
                              },
                              {
                                "anyOf": [
                                  {
                                    "properties": {
                                      "media_ids": {
                                        "allOf": [
                                          {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          {
                                            "const": ""
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "media_ids"
                                    ]
                                  },
                                  {
                                    "properties": {
                                      "media": {
                                        "properties": {
                                          "media_ids": {
                                            "allOf": [
                                              {
                                                "items": {
                                                  "type": "string"
                                                },
                                                "type": "array"
                                              },
                                              {
                                                "const": ""
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "media_ids"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "media"
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "not": {
                          "anyOf": [
                            {
                              "properties": {
                                "media_ids": {}
                              },
                              "required": [
                                "media_ids"
                              ]
                            },
                            {
                              "properties": {
                                "media": {
                                  "properties": {
                                    "media_ids": {}
                                  },
                                  "required": [
                                    "media_ids"
                                  ]
                                }
                              },
                              "required": [
                                "media"
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  }
                ],
                "properties": {
                  "aisa_api_key": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "card_uri": {
                    "maxLength": 256,
                    "type": "string"
                  },
                  "content": {
                    "anyOf": [
                      {
                        "default": "",
                        "maxLength": 280,
                        "type": "string"
                      },
                      {
                        "const": ""
                      }
                    ]
                  },
                  "in_reply_to_tweet_id": {
                    "anyOf": [
                      {
                        "default": "",
                        "maxLength": 64,
                        "type": "string"
                      },
                      {
                        "const": ""
                      }
                    ]
                  },
                  "media": {
                    "additionalProperties": false,
                    "properties": {
                      "media_ids": {
                        "description": "Alternate spelling for /media_ids; ignored when the canonical value is present and nonempty.",
                        "x-aisa-alias-target": "/media_ids"
                      },
                      "tagged_user_ids": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "media_files": {
                    "type": "string"
                  },
                  "media_ids": {
                    "anyOf": [
                      {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      {
                        "const": ""
                      }
                    ]
                  },
                  "poll": {
                    "additionalProperties": false,
                    "properties": {
                      "duration_minutes": {
                        "maximum": 9223372036854775807,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "options": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "quote_tweet_id": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "reply": {
                    "additionalProperties": false,
                    "properties": {
                      "auto_populate_reply_metadata": {
                        "type": "boolean"
                      },
                      "exclude_reply_user_ids": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "in_reply_to_tweet_id": {
                        "description": "Alternate spelling for /in_reply_to_tweet_id; ignored when the canonical value is present and nonempty.",
                        "x-aisa-alias-target": "/in_reply_to_tweet_id"
                      }
                    },
                    "type": "object"
                  },
                  "reply_settings": {
                    "maxLength": 32,
                    "type": "string"
                  },
                  "text": {
                    "description": "Alternate spelling for /content; ignored when the canonical value is present and nonempty.",
                    "x-aisa-alias-target": "/content"
                  }
                },
                "type": "object"
              }
            },
            "multipart/form-data": {
              "encoding": {
                "aisa_api_key": {
                  "contentType": "text/plain"
                },
                "card_uri": {
                  "contentType": "text/plain"
                },
                "content": {
                  "contentType": "text/plain"
                },
                "in_reply_to_tweet_id": {
                  "contentType": "text/plain"
                },
                "media_files": {
                  "contentType": "text/plain"
                },
                "quote_tweet_id": {
                  "contentType": "text/plain"
                },
                "reply_settings": {
                  "contentType": "text/plain"
                },
                "text": {
                  "contentType": "text/plain"
                }
              },
              "schema": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "allOf": [
                              {
                                "properties": {
                                  "content": {
                                    "not": {
                                      "const": ""
                                    }
                                  }
                                },
                                "required": [
                                  "content"
                                ]
                              },
                              {
                                "properties": {
                                  "content": {
                                    "default": "",
                                    "maxLength": 280,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "content"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "content": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "content"
                                  ]
                                }
                              },
                              {
                                "properties": {
                                  "text": {
                                    "not": {
                                      "const": ""
                                    }
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              },
                              {
                                "properties": {
                                  "text": {
                                    "default": "",
                                    "maxLength": 280,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "content": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "content"
                                  ]
                                }
                              },
                              {
                                "not": {
                                  "properties": {
                                    "text": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "text"
                                  ]
                                }
                              },
                              {
                                "anyOf": [
                                  {
                                    "properties": {
                                      "content": {
                                        "allOf": [
                                          {
                                            "default": "",
                                            "maxLength": 280,
                                            "type": "string"
                                          },
                                          {
                                            "const": ""
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "content"
                                    ]
                                  },
                                  {
                                    "properties": {
                                      "text": {
                                        "allOf": [
                                          {
                                            "default": "",
                                            "maxLength": 280,
                                            "type": "string"
                                          },
                                          {
                                            "const": ""
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "text"
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "not": {
                          "anyOf": [
                            {
                              "properties": {
                                "content": {}
                              },
                              "required": [
                                "content"
                              ]
                            },
                            {
                              "properties": {
                                "text": {}
                              },
                              "required": [
                                "text"
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "allOf": [
                              {
                                "properties": {
                                  "in_reply_to_tweet_id": {
                                    "not": {
                                      "const": ""
                                    }
                                  }
                                },
                                "required": [
                                  "in_reply_to_tweet_id"
                                ]
                              },
                              {
                                "properties": {
                                  "in_reply_to_tweet_id": {
                                    "default": "",
                                    "maxLength": 64,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "in_reply_to_tweet_id"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "in_reply_to_tweet_id": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "in_reply_to_tweet_id"
                                  ]
                                }
                              },
                              {
                                "properties": {
                                  "reply": {
                                    "properties": {
                                      "in_reply_to_tweet_id": {
                                        "not": {
                                          "const": ""
                                        }
                                      }
                                    },
                                    "required": [
                                      "in_reply_to_tweet_id"
                                    ]
                                  }
                                },
                                "required": [
                                  "reply"
                                ]
                              },
                              {
                                "properties": {
                                  "reply": {
                                    "properties": {
                                      "in_reply_to_tweet_id": {
                                        "default": "",
                                        "maxLength": 64,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "in_reply_to_tweet_id"
                                    ]
                                  }
                                },
                                "required": [
                                  "reply"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "in_reply_to_tweet_id": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "in_reply_to_tweet_id"
                                  ]
                                }
                              },
                              {
                                "not": {
                                  "properties": {
                                    "reply": {
                                      "properties": {
                                        "in_reply_to_tweet_id": {
                                          "not": {
                                            "const": ""
                                          }
                                        }
                                      },
                                      "required": [
                                        "in_reply_to_tweet_id"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reply"
                                  ]
                                }
                              },
                              {
                                "anyOf": [
                                  {
                                    "properties": {
                                      "in_reply_to_tweet_id": {
                                        "allOf": [
                                          {
                                            "default": "",
                                            "maxLength": 64,
                                            "type": "string"
                                          },
                                          {
                                            "const": ""
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "in_reply_to_tweet_id"
                                    ]
                                  },
                                  {
                                    "properties": {
                                      "reply": {
                                        "properties": {
                                          "in_reply_to_tweet_id": {
                                            "allOf": [
                                              {
                                                "default": "",
                                                "maxLength": 64,
                                                "type": "string"
                                              },
                                              {
                                                "const": ""
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "in_reply_to_tweet_id"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "reply"
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "not": {
                          "anyOf": [
                            {
                              "properties": {
                                "in_reply_to_tweet_id": {}
                              },
                              "required": [
                                "in_reply_to_tweet_id"
                              ]
                            },
                            {
                              "properties": {
                                "reply": {
                                  "properties": {
                                    "in_reply_to_tweet_id": {}
                                  },
                                  "required": [
                                    "in_reply_to_tweet_id"
                                  ]
                                }
                              },
                              "required": [
                                "reply"
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "allOf": [
                              {
                                "properties": {
                                  "media_ids": {
                                    "not": {
                                      "const": ""
                                    }
                                  }
                                },
                                "required": [
                                  "media_ids"
                                ]
                              },
                              {
                                "properties": {
                                  "media_ids": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "media_ids"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "media_ids": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "media_ids"
                                  ]
                                }
                              },
                              {
                                "properties": {
                                  "media": {
                                    "properties": {
                                      "media_ids": {
                                        "not": {
                                          "const": ""
                                        }
                                      }
                                    },
                                    "required": [
                                      "media_ids"
                                    ]
                                  }
                                },
                                "required": [
                                  "media"
                                ]
                              },
                              {
                                "properties": {
                                  "media": {
                                    "properties": {
                                      "media_ids": {
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      }
                                    },
                                    "required": [
                                      "media_ids"
                                    ]
                                  }
                                },
                                "required": [
                                  "media"
                                ]
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "not": {
                                  "properties": {
                                    "media_ids": {
                                      "not": {
                                        "const": ""
                                      }
                                    }
                                  },
                                  "required": [
                                    "media_ids"
                                  ]
                                }
                              },
                              {
                                "not": {
                                  "properties": {
                                    "media": {
                                      "properties": {
                                        "media_ids": {
                                          "not": {
                                            "const": ""
                                          }
                                        }
                                      },
                                      "required": [
                                        "media_ids"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "media"
                                  ]
                                }
                              },
                              {
                                "anyOf": [
                                  {
                                    "properties": {
                                      "media_ids": {
                                        "allOf": [
                                          {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          {
                                            "const": ""
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "media_ids"
                                    ]
                                  },
                                  {
                                    "properties": {
                                      "media": {
                                        "properties": {
                                          "media_ids": {
                                            "allOf": [
                                              {
                                                "items": {
                                                  "type": "string"
                                                },
                                                "type": "array"
                                              },
                                              {
                                                "const": ""
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "media_ids"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "media"
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "not": {
                          "anyOf": [
                            {
                              "properties": {
                                "media_ids": {}
                              },
                              "required": [
                                "media_ids"
                              ]
                            },
                            {
                              "properties": {
                                "media": {
                                  "properties": {
                                    "media_ids": {}
                                  },
                                  "required": [
                                    "media_ids"
                                  ]
                                }
                              },
                              "required": [
                                "media"
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  }
                ],
                "description": "Each field is a single text/plain part; repeated fields and JSON object/array parts are not supported.",
                "properties": {
                  "aisa_api_key": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "card_uri": {
                    "maxLength": 256,
                    "type": "string"
                  },
                  "content": {
                    "anyOf": [
                      {
                        "default": "",
                        "maxLength": 280,
                        "type": "string"
                      },
                      {
                        "const": ""
                      }
                    ]
                  },
                  "in_reply_to_tweet_id": {
                    "anyOf": [
                      {
                        "default": "",
                        "maxLength": 64,
                        "type": "string"
                      },
                      {
                        "const": ""
                      }
                    ]
                  },
                  "media": {
                    "not": {}
                  },
                  "media_files": {
                    "type": "string"
                  },
                  "media_ids": {
                    "not": {}
                  },
                  "poll": {
                    "not": {}
                  },
                  "quote_tweet_id": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "reply": {
                    "not": {}
                  },
                  "reply_settings": {
                    "maxLength": 32,
                    "type": "string"
                  },
                  "text": {
                    "description": "Alternate spelling for /content; ignored when the canonical value is present and nonempty.",
                    "x-aisa-alias-target": "/content"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "anyOf": [
                        {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null,
                      "description": "The owning service explicitly declares an optional dictionary of arbitrary values; nested Twitter result fields are opaque."
                    },
                    "msg": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful ApiResponse serialized by the owning service."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "Post Twitter",
        "tags": [
          "default"
        ],
        "x-aisa-body-aliases": [
          {
            "source": "/text",
            "target": "/content"
          },
          {
            "source": "/media/media_ids",
            "target": "/media_ids"
          },
          {
            "source": "/reply/in_reply_to_tweet_id",
            "target": "/in_reply_to_tweet_id"
          }
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "mpp": false,
          "mpp_methods": [],
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "x402": false
        },
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-category": "1",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-post-twitter",
        "x-aisa-pricing": {
          "cost_contract": "request_formula",
          "customer_multiplier": 1.0,
          "customer_pricing": "provider_cost_multiplier",
          "default_request_estimate_usd": 0.015,
          "estimate_source": "profile_seed",
          "evidence_source": "request_snapshot"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": false,
          "request_wins": false
        },
        "x-aisa-response-passthrough": true,
        "x-aisa-response-source": {
          "content_hash": "sha256:ceb00d7daef54bfee7ee74b3f14ce581f3ea92eb5631594e80cbafd3cb2c09c8",
          "kind": "upstream_success_contract",
          "source": {
            "content_hash": "sha256:ab3316d00bd90861769d31494a881ce551c45ad5c8c7253a578ddad3cc57a7e6",
            "converter": "scripts/wrapper_twitter_reference.py@3",
            "fetched_at": "2026-10-08T16:19:47.155165+00:00",
            "kind": "manual",
            "owner": "AIsa-team/docs",
            "path_space": "public",
            "policy_revision": "sha256:d8744e265897ce476987f321936b253cbc3750202da919be3b5479973f2bfa9d",
            "refresh_policy": "pinned",
            "refresh_reason": "Owning Twitter response types and POST route are pinned; changing declaration or deployment binding requires independent review.",
            "response_only": true,
            "review_period_days": 30,
            "source_pages": [
              {
                "raw_content_hash": "sha256:96c8d64c69f46aa82764b646496b66a64faebbb39eceadd6473ce4a540416617",
                "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/api/routes/twitter.py"
              },
              {
                "raw_content_hash": "sha256:eabe5a7587890c1754ea0175a97fe88a91afe1e98a80c1c22bbee58926a4c3f4",
                "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/schemas/twitter.py"
              }
            ],
            "source_revision": "9481772229feb96eed7fef509234d089cd0d7ec3",
            "upstream_origin_sha256": "9d9240cbf45cc93e0d4b2d4a26da1392b72dbdfc5efcb4d76b35d79ce0842742",
            "upstream_path_sha256": "bfb692587d52d1f9bf6d3379dbcc82aafae5f9d2c39266cbfa7d814fa8e30c90",
            "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/api/routes/twitter.py"
          }
        },
        "x-aisa-response-upstream-origin-sha256": "9d9240cbf45cc93e0d4b2d4a26da1392b72dbdfc5efcb4d76b35d79ce0842742",
        "x-aisa-response-upstream-path-sha256": "bfb692587d52d1f9bf6d3379dbcc82aafae5f9d2c39266cbfa7d814fa8e30c90",
        "x-aisa-revision": {
          "customer_pricing_ref": "4ee3c3a46fbe",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "4a249f2a8a52"
        },
        "x-aisa-runtime-operation": {
          "method": "ANY",
          "operation_id": "postTwitter",
          "path": "/apis/v1/twitter/post_twitter"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/twitter/unfollow_twitter": {
      "post": {
        "description": "使已认证的源用户在 X/Twitter 上取消关注指定的目标用户。此操作对应[官方 X v2 `DELETE /2/users/{source_user_id}/following/{target_user_id}` 端点](https://docs.x.com/x-api/users/unfollow-user)，并通过 AIsa 网关路由。为与其他 AIsa Twitter 写入操作保持一致，此处使用 POST（而非 DELETE）。\n\n**身份验证。**需要源用户的 OAuth 会话，并将其关联到您的 AIsa API 密钥。通过 `POST /apis/v1/twitter/auth_twitter` 关联一次账户即可。\n\n**权限范围。**底层 X 会话必须具有 `follows.write`、`tweet.read` 和 `users.read` 权限。\n\n取消关注您当前并未关注的用户不会执行任何操作，但仍会返回 `200`，其中 `following: false`。\n\n<!-- aisa-pricing:start -->\n公开参考价格：每次成功请求 $0.01 USD。 最终费用以账户适用价格及实际结算为准。\n<!-- aisa-pricing:end -->",
        "operationId": "unfollowTwitterUser",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "unfollow_user": {
                  "summary": "Unfollow @TwitterDev (id 2244994945)",
                  "value": {
                    "target_user_id": "2244994945"
                  }
                }
              },
              "schema": {
                "properties": {
                  "target_user_id": {
                    "description": "要取消关注的 X/Twitter 用户的数字 ID。必须匹配 X 正则表达式 `^[0-9]{1,19}$`。",
                    "example": "2244994945",
                    "pattern": "^[0-9]{1,19}$",
                    "type": "string"
                  }
                },
                "required": [
                  "target_user_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "following": false
                  }
                },
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "following": {
                          "description": "当源用户不再关注目标用户后，值为 `false`。",
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "取消关注成功（或源用户原本就未关注目标用户）。"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "Unfollow User",
        "tags": [
          "default"
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "mpp": false,
          "mpp_methods": [],
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "x402": false
        },
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-category": "1",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-unfollow-twitter",
        "x-aisa-passthrough": true,
        "x-aisa-pricing": {
          "cost_contract": "fixed_success",
          "customer_multiplier": 1.0,
          "customer_pricing": "provider_cost_multiplier",
          "default_request_estimate_usd": 0.01,
          "estimate_source": "profile_seed",
          "evidence_source": "request_snapshot"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": false,
          "request_wins": true
        },
        "x-aisa-response-source": {
          "content_hash": "sha256:4827af0a4891cdb667acc6abb03fef819bbbdb2d0d1e3eeed1d270c46c6af6b5",
          "kind": "upstream_success_contract",
          "source": {
            "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
            "converter": "scripts/import_existing_contracts.py@1",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "kind": "manual",
            "owner": "AIsa-team/docs",
            "path_space": "public",
            "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json"
          }
        },
        "x-aisa-revision": {
          "customer_pricing_ref": "fa0983997e25",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "8efffe2b99df"
        },
        "x-aisa-runtime-operation": {
          "method": "ANY",
          "operation_id": "unfollowTwitterUser",
          "path": "/apis/v1/twitter/unfollow_twitter"
        },
        "x-aisa-source": {
          "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
          "converter": "scripts/import_existing_contracts.py@1",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "kind": "manual",
          "owner": "AIsa-team/docs",
          "path_space": "public",
          "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/unfollow_twitter",
        "x-aisa-validation": "provider",
        "x-codeSamples": [
          {
            "label": "Reference example",
            "lang": "text",
            "source": "# Fixed reference example. Playground inputs do not update this sample.\ncurl --request POST \\\n  --url https://api.aisa.one/apis/v1/twitter/unfollow_twitter \\\n  --header 'Authorization: Bearer <token>' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"target_user_id\": \"2244994945\"\n}'"
          }
        ]
      }
    },
    "/apis/v1/twitter/unlike_twitter": {
      "post": {
        "description": "移除源用户对推文的点赞。对应[官方 X v2 `DELETE /2/users/{id}/likes/{tweet_id}` 端点](https://docs.x.com/x-api/users/unlike-post)，并通过 AIsa 网关路由。为与其他 AIsa Twitter 写入操作保持一致，此操作使用 POST（而非 DELETE）。\n\n**身份验证。**需要源用户的 OAuth 会话，并将其关联到你的 AIsa API 密钥。通过 `POST /apis/v1/twitter/auth_twitter` 关联一次账户即可。\n\n**权限范围。**底层 X 会话必须具有 `like.write`、`tweet.read` 和 `users.read`。\n\n如果源用户未点赞该推文，取消点赞操作不会产生任何影响，但仍会返回 `200`，其中 `liked: false`。\n\n<!-- aisa-pricing:start -->\n公开参考价格：每次成功请求 $0.01 USD。 最终费用以账户适用价格及实际结算为准。\n<!-- aisa-pricing:end -->",
        "operationId": "unlikeTwitter",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "unlike_tweet": {
                  "summary": "Unlike tweet 1346889436626259968",
                  "value": {
                    "tweet_id": "1346889436626259968"
                  }
                }
              },
              "schema": {
                "properties": {
                  "tweet_id": {
                    "description": "要取消点赞的推文数字 ID。必须匹配 X 的正则表达式 `^[0-9]{1,19}$`。",
                    "example": "1346889436626259968",
                    "pattern": "^[0-9]{1,19}$",
                    "type": "string"
                  }
                },
                "required": [
                  "tweet_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "liked": false
                  }
                },
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "liked": {
                          "description": "移除点赞后为 `false`。",
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "取消点赞成功（或者源用户原本就没有点赞该推文）。"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "Unlike Tweet",
        "tags": [
          "default"
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "mpp": false,
          "mpp_methods": [],
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "x402": false
        },
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-category": "1",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-unlike-twitter",
        "x-aisa-passthrough": true,
        "x-aisa-pricing": {
          "cost_contract": "fixed_success",
          "customer_multiplier": 1.0,
          "customer_pricing": "provider_cost_multiplier",
          "default_request_estimate_usd": 0.01,
          "estimate_source": "profile_seed",
          "evidence_source": "request_snapshot"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": false,
          "request_wins": true
        },
        "x-aisa-response-source": {
          "content_hash": "sha256:a414430182f3db999b60150bb8acf55cc5419e11edc5400c7fc7dc7c779bc262",
          "kind": "upstream_success_contract",
          "source": {
            "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
            "converter": "scripts/import_existing_contracts.py@1",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "kind": "manual",
            "owner": "AIsa-team/docs",
            "path_space": "public",
            "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json"
          }
        },
        "x-aisa-revision": {
          "customer_pricing_ref": "fa0983997e25",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "e7900fdd631d"
        },
        "x-aisa-runtime-operation": {
          "method": "ANY",
          "operation_id": "unlikeTwitter",
          "path": "/apis/v1/twitter/unlike_twitter"
        },
        "x-aisa-source": {
          "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
          "converter": "scripts/import_existing_contracts.py@1",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "kind": "manual",
          "owner": "AIsa-team/docs",
          "path_space": "public",
          "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/unlike_twitter",
        "x-aisa-validation": "provider",
        "x-codeSamples": [
          {
            "label": "Reference example",
            "lang": "text",
            "source": "# Fixed reference example. Playground inputs do not update this sample.\ncurl --request POST \\\n  --url https://api.aisa.one/apis/v1/twitter/unlike_twitter \\\n  --header 'Authorization: Bearer <token>' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"tweet_id\": \"1346889436626259968\"\n}'"
          }
        ]
      }
    },
    "/apis/v1/twitter/upload_media": {
      "post": {
        "description": "Uploads media files such as images or videos to be used in tweets or profiles.\n\n<!-- aisa-pricing:start -->\n公开参考价格：每次成功请求 $0.000001 USD。 最终费用以账户适用价格及实际结算为准。\n<!-- aisa-pricing:end -->",
        "operationId": "uploadTwitterMedia",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "encoding": {
                "media_files": {
                  "contentType": "image/png, image/jpeg, image/gif, video/mp4"
                }
              },
              "schema": {
                "properties": {
                  "aisa_api_key": {
                    "description": "Optional. Normally unnecessary — the gateway resolves your account from the `Authorization: Bearer` header.",
                    "type": "string"
                  },
                  "media_files": {
                    "description": "The media file to upload (`image/*`, `image/gif`, or `video/*`). The field may also be named `media` or `file`. Images up to 8 MB use a single-shot upload; larger files and video use chunked upload automatically.",
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "media_files"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "media_id": "2099415764780605440"
                  }
                },
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "media_id": {
                          "description": "The uploaded media's ID. Pass it in `post_twitter` `media.media_ids`. Unattached media expires after ~24h.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Upload succeeded; returns the `media_id` to reference in `post_twitter`."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "Upload Media",
        "tags": [
          "default"
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "mpp": false,
          "mpp_methods": [],
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "x402": false
        },
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-category": "1",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-upload-media",
        "x-aisa-passthrough": true,
        "x-aisa-pricing": {
          "cost_contract": "explicit_zero",
          "customer_pricing": "fixed_success",
          "default_request_estimate_usd": 1e-06,
          "estimate_source": "profile_seed",
          "evidence_source": "request_snapshot"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": false,
          "request_wins": true
        },
        "x-aisa-response-source": {
          "content_hash": "sha256:ce325c34ada803213fbfa40ff5c2f4db3342fe2a80c27438d4d35dc969c262a9",
          "kind": "upstream_success_contract",
          "source": {
            "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
            "converter": "scripts/import_existing_contracts.py@1",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "kind": "manual",
            "owner": "AIsa-team/docs",
            "path_space": "public",
            "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json"
          }
        },
        "x-aisa-revision": {
          "customer_pricing_ref": "43e3b1dc8aa7",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "8f8d3b08340a"
        },
        "x-aisa-runtime-operation": {
          "method": "ANY",
          "operation_id": "uploadTwitterMedia",
          "path": "/apis/v1/twitter/upload_media"
        },
        "x-aisa-source": {
          "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
          "converter": "scripts/import_existing_contracts.py@1",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "kind": "manual",
          "owner": "AIsa-team/docs",
          "path_space": "public",
          "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/upload_media",
        "x-aisa-validation": "provider"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ]
}
