{
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    },
    "schemas": {},
    "responses": {},
    "parameters": {},
    "examples": {},
    "requestBodies": {},
    "headers": {},
    "links": {},
    "callbacks": {},
    "pathItems": {}
  },
  "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-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": {
      "facts_hash": "a3adc9187fd943329f04d77651501718ebfb69f2eb47355d287b171db1c09ebc",
      "generator_version": "3",
      "protocol_version": "1",
      "schema_version": "1",
      "composer_version": "20",
      "response_pending": [],
      "document_hash": "sha256:e852ed0e1d5ac94ea1ce8b75d74335ecbf99c3e0e0010807e0c3ccf9955bf3cc"
    },
    "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",
    "x-aisa-catalogs": {
      "aisa-twitter": {
        "title": "AISA Twitter Relay",
        "description": "",
        "x-aisa-document": {
          "facts_hash": "a3adc9187fd943329f04d77651501718ebfb69f2eb47355d287b171db1c09ebc",
          "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-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          }
        }
      }
    }
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "openapi": "3.1.0",
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "paths": {
    "/apis/v1/twitter/auth_twitter": {
      "post": {
        "description": "默认价格配置\n\n<!-- aisa-pricing:start -->\nPublished reference price: $0.000001 USD per successful request. Account-specific pricing and final settlement may differ.\n<!-- aisa-pricing:end -->",
        "operationId": "authTwitterUser",
        "responses": {
          "200": {
            "description": "Authorization URL generated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "auth_url",
                    "state"
                  ],
                  "properties": {
                    "auth_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Short-lived X OAuth authorization URL. Open it in a browser so the source user can approve the requested scopes."
                    },
                    "state": {
                      "type": "string",
                      "description": "Opaque CSRF state token that AIsa will validate when X redirects back to its callback. Store it client-side if you need to correlate the flow."
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the `auth_url` expires. Request a new one if the user hasn't completed the flow before this time."
                    }
                  }
                },
                "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",
                  "state": "0c2ad1f...",
                  "expires_at": "2026-04-18T07:00:00Z"
                }
              }
            }
          },
          "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",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "mpp": false,
          "mpp_methods": [],
          "x402": false
        },
        "x-aisa-category": "1",
        "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-revision": {
          "customer_pricing_ref": "43e3b1dc8aa7",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "46366661447c"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/auth_twitter",
        "x-aisa-validation": "provider",
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-runtime-operation": {
          "operation_id": "authTwitterUser",
          "method": "ANY",
          "path": "/apis/v1/twitter/auth_twitter"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aisa_api_key": {
                    "type": "string",
                    "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."
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional list of X OAuth 2.0 scopes to request. Defaults to the set required by AIsa's Twitter write endpoints: `follows.write`, `tweet.read`, `users.read`, `tweet.write`, `like.write`, `dm.read`, `dm.write`.",
                    "example": [
                      "follows.write",
                      "tweet.read",
                      "users.read"
                    ]
                  }
                },
                "required": [
                  "aisa_api_key"
                ]
              },
              "example": {
                "aisa_api_key": "sk-aisa-...",
                "scopes": [
                  "follows.write",
                  "tweet.read",
                  "users.read"
                ]
              }
            }
          }
        },
        "x-aisa-source": {
          "kind": "manual",
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
          "converter": "scripts/import_existing_contracts.py@1",
          "path_space": "public",
          "owner": "AIsa-team/docs",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca"
        },
        "x-aisa-response-source": {
          "kind": "upstream_success_contract",
          "source": {
            "kind": "manual",
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
            "converter": "scripts/import_existing_contracts.py@1",
            "path_space": "public",
            "owner": "AIsa-team/docs",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca"
          },
          "content_hash": "sha256:d15181c8ed5401f11986eccf0af7bdc6f00112525fb33221644d7ad9962fe9ee"
        },
        "x-codeSamples": [
          {
            "lang": "text",
            "label": "Reference example",
            "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}'"
          }
        ],
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-auth-twitter"
      }
    },
    "/apis/v1/twitter/delete_twitter": {
      "post": {
        "description": "<!-- aisa-pricing:start -->\nPublished reference price: $0.01 USD per successful request. Account-specific pricing and final settlement may differ.\n<!-- aisa-pricing:end -->",
        "operationId": "any_aisa_twitter_apis_v1_twitter_delete_twitter",
        "responses": {
          "200": {
            "description": "Successful ApiResponse serialized by the owning service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "additionalProperties": true
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null,
                      "description": "The owning service explicitly declares an optional dictionary of arbitrary values; nested Twitter result fields are opaque."
                    }
                  },
                  "required": [
                    "code",
                    "msg"
                  ]
                }
              }
            }
          },
          "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",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "mpp": false,
          "mpp_methods": [],
          "x402": false
        },
        "x-aisa-category": "1",
        "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-revision": {
          "customer_pricing_ref": "fa0983997e25",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "a72356d3edb9"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/delete_twitter",
        "x-aisa-validation": "provider",
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-runtime-operation": {
          "operation_id": "any_aisa_twitter_apis_v1_twitter_delete_twitter",
          "method": "ANY",
          "path": "/apis/v1/twitter/delete_twitter"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aisa_api_key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "AIsa API key bound to the OAuth account; the wrapper requires this body field in addition to gateway authorization."
                  },
                  "tweet_id": {
                    "type": "string",
                    "x-aisa-normalized-schema": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "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.",
                    "x-aisa-normalization": "strip"
                  }
                },
                "required": [
                  "aisa_api_key",
                  "tweet_id"
                ]
              }
            }
          }
        },
        "x-aisa-source": {
          "kind": "provider_openapi",
          "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/api/routes/twitter.py",
          "fetched_at": "2026-10-09T03:20:49.419328+00:00",
          "content_hash": "sha256:7773cb5df79a9e270b725d7868f1f07c2bb511b882f9df0147caa3adfe9dcf5c",
          "converter": "scripts/wrapper_twitter_reference.py@3",
          "source_revision": "9481772229feb96eed7fef509234d089cd0d7ec3",
          "refresh_policy": "pinned",
          "refresh_reason": "Owning-service route and schema commit is immutable; adopting a later revision requires declaration and binding review.",
          "source_pages": [
            {
              "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/api/routes/twitter.py",
              "raw_content_hash": "sha256:96c8d64c69f46aa82764b646496b66a64faebbb39eceadd6473ce4a540416617"
            },
            {
              "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/schemas/twitter.py",
              "raw_content_hash": "sha256:eabe5a7587890c1754ea0175a97fe88a91afe1e98a80c1c22bbee58926a4c3f4"
            }
          ],
          "owner": "AIsa-team/docs",
          "review_period_days": 30,
          "policy_revision": "sha256:27265d53afb79ad24305d7888027ef69b1eef9755db30d6573a42639318ceea7"
        },
        "x-aisa-response-source": {
          "kind": "upstream_success_contract",
          "source": {
            "kind": "provider_openapi",
            "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/api/routes/twitter.py",
            "fetched_at": "2026-10-09T03:20:49.419328+00:00",
            "content_hash": "sha256:7773cb5df79a9e270b725d7868f1f07c2bb511b882f9df0147caa3adfe9dcf5c",
            "converter": "scripts/wrapper_twitter_reference.py@3",
            "source_revision": "9481772229feb96eed7fef509234d089cd0d7ec3",
            "refresh_policy": "pinned",
            "refresh_reason": "Owning-service route and schema commit is immutable; adopting a later revision requires declaration and binding review.",
            "source_pages": [
              {
                "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/api/routes/twitter.py",
                "raw_content_hash": "sha256:96c8d64c69f46aa82764b646496b66a64faebbb39eceadd6473ce4a540416617"
              },
              {
                "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/schemas/twitter.py",
                "raw_content_hash": "sha256:eabe5a7587890c1754ea0175a97fe88a91afe1e98a80c1c22bbee58926a4c3f4"
              }
            ],
            "owner": "AIsa-team/docs",
            "review_period_days": 30,
            "policy_revision": "sha256:27265d53afb79ad24305d7888027ef69b1eef9755db30d6573a42639318ceea7"
          },
          "content_hash": "sha256:ceb00d7daef54bfee7ee74b3f14ce581f3ea92eb5631594e80cbafd3cb2c09c8"
        },
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-twitter/any_aisa_twitter_apis_v1_twitter_delete_twitter"
      }
    },
    "/apis/v1/twitter/follow_twitter": {
      "post": {
        "description": "Make the authenticated source user follow the given target user on X/Twitter. Mirrors the [official X v2 `POST /2/users/{id}/following` endpoint](https://docs.x.com/x-api/users/follow-user), routed through the AIsa gateway.\n\n**Authentication.** This is a write action that requires an OAuth session for the source user, attached to your AIsa API key. Link your X account once by calling `POST /apis/v1/twitter/auth_twitter` — AIsa then uses that session automatically for every write request sent with your key.\n\n**Scopes.** The underlying X session must hold `follows.write`, `tweet.read`, and `users.read`.\n\n<!-- aisa-pricing:start -->\nPublished reference price: $0.015 USD per successful request. Account-specific pricing and final settlement may differ.\n<!-- aisa-pricing:end -->",
        "operationId": "followTwitterUser",
        "responses": {
          "200": {
            "description": "Follow succeeded (or was already in place).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "following": {
                          "type": "boolean",
                          "description": "`true` when the source user now follows the target user."
                        },
                        "pending_follow": {
                          "type": "boolean",
                          "description": "`true` when a follow request has been sent to a protected account and is awaiting approval."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": {
                    "following": true,
                    "pending_follow": false
                  }
                }
              }
            }
          },
          "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",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "mpp": false,
          "mpp_methods": [],
          "x402": false
        },
        "x-aisa-category": "1",
        "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-revision": {
          "customer_pricing_ref": "e7cbd5023d16",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "b6e4993af8a2"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/follow_twitter",
        "x-aisa-validation": "provider",
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-runtime-operation": {
          "operation_id": "followTwitterUser",
          "method": "ANY",
          "path": "/apis/v1/twitter/follow_twitter"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "target_user_id"
                ],
                "properties": {
                  "target_user_id": {
                    "type": "string",
                    "description": "Numeric ID of the X/Twitter user to follow. Must match the X regex `^[0-9]{1,19}$`.",
                    "pattern": "^[0-9]{1,19}$",
                    "example": "6253282"
                  }
                }
              },
              "examples": {
                "follow_user": {
                  "summary": "Follow @TwitterDev (id 2244994945)",
                  "value": {
                    "target_user_id": "2244994945"
                  }
                }
              }
            }
          }
        },
        "x-aisa-source": {
          "kind": "manual",
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
          "converter": "scripts/import_existing_contracts.py@1",
          "path_space": "public",
          "owner": "AIsa-team/docs",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca"
        },
        "x-aisa-response-source": {
          "kind": "upstream_success_contract",
          "source": {
            "kind": "manual",
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
            "converter": "scripts/import_existing_contracts.py@1",
            "path_space": "public",
            "owner": "AIsa-team/docs",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca"
          },
          "content_hash": "sha256:5dbcf0479b1a98eedc56be5743e32861e896a403de07df6fe64d7ae4edcbcd10"
        },
        "x-codeSamples": [
          {
            "lang": "text",
            "label": "Reference example",
            "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}'"
          }
        ],
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-follow-twitter"
      }
    },
    "/apis/v1/twitter/like_twitter": {
      "post": {
        "description": "Like a tweet on behalf of the authenticated source user. Mirrors the [official X v2 `POST /2/users/{id}/likes` endpoint](https://docs.x.com/x-api/users/like-post), routed through the AIsa gateway.\n\n**Authentication.** Requires an OAuth session for the source user, attached to your AIsa API key. Link the account once via `POST /apis/v1/twitter/auth_twitter`.\n\n**Scopes.** The underlying X session must hold `like.write`, `tweet.read`, and `users.read`.\n\nLiking a tweet already liked is a no-op and still returns `200` with `liked: true`.\n\n<!-- aisa-pricing:start -->\nPublished reference price: $0.015 USD per successful request. Account-specific pricing and final settlement may differ.\n<!-- aisa-pricing:end -->",
        "operationId": "likeTwitter",
        "responses": {
          "200": {
            "description": "Like succeeded (or was already in place).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "liked": {
                          "type": "boolean",
                          "description": "`true` once the source user has liked the target tweet."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": {
                    "liked": true
                  }
                }
              }
            }
          },
          "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",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "mpp": false,
          "mpp_methods": [],
          "x402": false
        },
        "x-aisa-category": "1",
        "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-revision": {
          "customer_pricing_ref": "e7cbd5023d16",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "4fd1032a2ef1"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/like_twitter",
        "x-aisa-validation": "provider",
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-runtime-operation": {
          "operation_id": "likeTwitter",
          "method": "ANY",
          "path": "/apis/v1/twitter/like_twitter"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tweet_id"
                ],
                "properties": {
                  "tweet_id": {
                    "type": "string",
                    "description": "Numeric ID of the tweet to like. Must match X's regex `^[0-9]{1,19}$`.",
                    "pattern": "^[0-9]{1,19}$",
                    "example": "1346889436626259968"
                  }
                }
              },
              "examples": {
                "like_tweet": {
                  "summary": "Like tweet 1346889436626259968",
                  "value": {
                    "tweet_id": "1346889436626259968"
                  }
                }
              }
            }
          }
        },
        "x-aisa-source": {
          "kind": "manual",
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
          "converter": "scripts/import_existing_contracts.py@1",
          "path_space": "public",
          "owner": "AIsa-team/docs",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca"
        },
        "x-aisa-response-source": {
          "kind": "upstream_success_contract",
          "source": {
            "kind": "manual",
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
            "converter": "scripts/import_existing_contracts.py@1",
            "path_space": "public",
            "owner": "AIsa-team/docs",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca"
          },
          "content_hash": "sha256:cff3e9cc2594065e99166601d9b244af882d345ea64b1041b96707365ca0a9ba"
        },
        "x-codeSamples": [
          {
            "lang": "text",
            "label": "Reference example",
            "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}'"
          }
        ],
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-like-twitter"
      }
    },
    "/apis/v1/twitter/post_twitter": {
      "post": {
        "description": "Publish a new tweet on behalf of the authenticated source user, or edit an existing tweet. Mirrors the [official X v2 `POST /2/tweets` endpoint](https://docs.x.com/x-api/posts/create-post), routed through the AIsa gateway.\n\n**Authentication.** Requires an OAuth session for the source user, attached to your AIsa API key. Link the account once via `POST /apis/v1/twitter/auth_twitter`.\n\n**Scopes.** The underlying X session must hold `tweet.read`, `tweet.write`, and `users.read`.\n\n**Mutually exclusive fields.** `media`, `poll`, `quote_tweet_id`, and `card_uri` cannot be combined in the same request. At most one of them may be set.\n\n<!-- aisa-pricing:start -->\nUsage-based billing; Default request estimate: $0.015 USD (not a fixed price). Account-specific pricing and final settlement may differ.\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": {
                        "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": {
                        "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": {
            "description": "Successful ApiResponse serialized by the owning service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "additionalProperties": true
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null,
                      "description": "The owning service explicitly declares an optional dictionary of arbitrary values; nested Twitter result fields are opaque."
                    }
                  },
                  "required": [
                    "code",
                    "msg"
                  ]
                }
              }
            }
          },
          "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",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "mpp": false,
          "mpp_methods": [],
          "x402": false
        },
        "x-aisa-category": "1",
        "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-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-status": "enabled",
        "x-aisa-validation": "runtime",
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-runtime-operation": {
          "operation_id": "postTwitter",
          "method": "ANY",
          "path": "/apis/v1/twitter/post_twitter"
        },
        "x-aisa-response-source": {
          "kind": "upstream_success_contract",
          "source": {
            "kind": "manual",
            "converter": "scripts/wrapper_twitter_reference.py@3",
            "response_only": true,
            "path_space": "public",
            "source_revision": "9481772229feb96eed7fef509234d089cd0d7ec3",
            "refresh_policy": "pinned",
            "upstream_path_sha256": "bfb692587d52d1f9bf6d3379dbcc82aafae5f9d2c39266cbfa7d814fa8e30c90",
            "upstream_origin_sha256": "9d9240cbf45cc93e0d4b2d4a26da1392b72dbdfc5efcb4d76b35d79ce0842742",
            "source_pages": [
              {
                "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/api/routes/twitter.py",
                "raw_content_hash": "sha256:96c8d64c69f46aa82764b646496b66a64faebbb39eceadd6473ce4a540416617"
              },
              {
                "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/schemas/twitter.py",
                "raw_content_hash": "sha256:eabe5a7587890c1754ea0175a97fe88a91afe1e98a80c1c22bbee58926a4c3f4"
              }
            ],
            "url": "https://raw.githubusercontent.com/AIsa-team/AisaTwitterAuthService/9481772229feb96eed7fef509234d089cd0d7ec3/app/api/routes/twitter.py",
            "fetched_at": "2026-10-08T16:19:47.155165+00:00",
            "content_hash": "sha256:ab3316d00bd90861769d31494a881ce551c45ad5c8c7253a578ddad3cc57a7e6",
            "refresh_reason": "Owning Twitter response types and POST route are pinned; changing declaration or deployment binding requires independent review.",
            "owner": "AIsa-team/docs",
            "review_period_days": 30,
            "policy_revision": "sha256:d8744e265897ce476987f321936b253cbc3750202da919be3b5479973f2bfa9d"
          },
          "content_hash": "sha256:ceb00d7daef54bfee7ee74b3f14ce581f3ea92eb5631594e80cbafd3cb2c09c8"
        },
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-post-twitter"
      }
    },
    "/apis/v1/twitter/unfollow_twitter": {
      "post": {
        "description": "Make the authenticated source user unfollow the given target user on X/Twitter. Mirrors the [official X v2 `DELETE /2/users/{source_user_id}/following/{target_user_id}` endpoint](https://docs.x.com/x-api/users/unfollow-user), routed through the AIsa gateway. Uses POST (not DELETE) for consistency with the other AIsa Twitter write actions.\n\n**Authentication.** Requires an OAuth session for the source user, attached to your AIsa API key. Link the account once via `POST /apis/v1/twitter/auth_twitter`.\n\n**Scopes.** The underlying X session must hold `follows.write`, `tweet.read`, and `users.read`.\n\nUnfollowing a user you don't currently follow is a no-op and still returns `200` with `following: false`.\n\n<!-- aisa-pricing:start -->\nPublished reference price: $0.01 USD per successful request. Account-specific pricing and final settlement may differ.\n<!-- aisa-pricing:end -->",
        "operationId": "unfollowTwitterUser",
        "responses": {
          "200": {
            "description": "Unfollow succeeded (or the source user wasn't following the target to begin with).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "following": {
                          "type": "boolean",
                          "description": "`false` once the source user no longer follows the target user."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": {
                    "following": false
                  }
                }
              }
            }
          },
          "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",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "mpp": false,
          "mpp_methods": [],
          "x402": false
        },
        "x-aisa-category": "1",
        "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-revision": {
          "customer_pricing_ref": "fa0983997e25",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "8efffe2b99df"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/unfollow_twitter",
        "x-aisa-validation": "provider",
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-runtime-operation": {
          "operation_id": "unfollowTwitterUser",
          "method": "ANY",
          "path": "/apis/v1/twitter/unfollow_twitter"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "target_user_id"
                ],
                "properties": {
                  "target_user_id": {
                    "type": "string",
                    "description": "Numeric ID of the X/Twitter user to unfollow. Must match the X regex `^[0-9]{1,19}$`.",
                    "pattern": "^[0-9]{1,19}$",
                    "example": "2244994945"
                  }
                }
              },
              "examples": {
                "unfollow_user": {
                  "summary": "Unfollow @TwitterDev (id 2244994945)",
                  "value": {
                    "target_user_id": "2244994945"
                  }
                }
              }
            }
          }
        },
        "x-aisa-source": {
          "kind": "manual",
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
          "converter": "scripts/import_existing_contracts.py@1",
          "path_space": "public",
          "owner": "AIsa-team/docs",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca"
        },
        "x-aisa-response-source": {
          "kind": "upstream_success_contract",
          "source": {
            "kind": "manual",
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
            "converter": "scripts/import_existing_contracts.py@1",
            "path_space": "public",
            "owner": "AIsa-team/docs",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca"
          },
          "content_hash": "sha256:4827af0a4891cdb667acc6abb03fef819bbbdb2d0d1e3eeed1d270c46c6af6b5"
        },
        "x-codeSamples": [
          {
            "lang": "text",
            "label": "Reference example",
            "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}'"
          }
        ],
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-unfollow-twitter"
      }
    },
    "/apis/v1/twitter/unlike_twitter": {
      "post": {
        "description": "Remove the source user's like from a tweet. Mirrors the [official X v2 `DELETE /2/users/{id}/likes/{tweet_id}` endpoint](https://docs.x.com/x-api/users/unlike-post), routed through the AIsa gateway. Uses POST (not DELETE) for consistency with the other AIsa Twitter write actions.\n\n**Authentication.** Requires an OAuth session for the source user, attached to your AIsa API key. Link the account once via `POST /apis/v1/twitter/auth_twitter`.\n\n**Scopes.** The underlying X session must hold `like.write`, `tweet.read`, and `users.read`.\n\nUnliking a tweet the source user has not liked is a no-op and still returns `200` with `liked: false`.\n\n<!-- aisa-pricing:start -->\nPublished reference price: $0.01 USD per successful request. Account-specific pricing and final settlement may differ.\n<!-- aisa-pricing:end -->",
        "operationId": "unlikeTwitter",
        "responses": {
          "200": {
            "description": "Unlike succeeded (or the source user hadn't liked the tweet to begin with).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "liked": {
                          "type": "boolean",
                          "description": "`false` once the like has been removed."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": {
                    "liked": false
                  }
                }
              }
            }
          },
          "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",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "mpp": false,
          "mpp_methods": [],
          "x402": false
        },
        "x-aisa-category": "1",
        "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-revision": {
          "customer_pricing_ref": "fa0983997e25",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "e7900fdd631d"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/unlike_twitter",
        "x-aisa-validation": "provider",
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-runtime-operation": {
          "operation_id": "unlikeTwitter",
          "method": "ANY",
          "path": "/apis/v1/twitter/unlike_twitter"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tweet_id"
                ],
                "properties": {
                  "tweet_id": {
                    "type": "string",
                    "description": "Numeric ID of the tweet to unlike. Must match X's regex `^[0-9]{1,19}$`.",
                    "pattern": "^[0-9]{1,19}$",
                    "example": "1346889436626259968"
                  }
                }
              },
              "examples": {
                "unlike_tweet": {
                  "summary": "Unlike tweet 1346889436626259968",
                  "value": {
                    "tweet_id": "1346889436626259968"
                  }
                }
              }
            }
          }
        },
        "x-aisa-source": {
          "kind": "manual",
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
          "converter": "scripts/import_existing_contracts.py@1",
          "path_space": "public",
          "owner": "AIsa-team/docs",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca"
        },
        "x-aisa-response-source": {
          "kind": "upstream_success_contract",
          "source": {
            "kind": "manual",
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
            "converter": "scripts/import_existing_contracts.py@1",
            "path_space": "public",
            "owner": "AIsa-team/docs",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca"
          },
          "content_hash": "sha256:a414430182f3db999b60150bb8acf55cc5419e11edc5400c7fc7dc7c779bc262"
        },
        "x-codeSamples": [
          {
            "lang": "text",
            "label": "Reference example",
            "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}'"
          }
        ],
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-unlike-twitter"
      }
    },
    "/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 -->\nPublished reference price: $0.000001 USD per successful request. Account-specific pricing and final settlement may differ.\n<!-- aisa-pricing:end -->",
        "operationId": "uploadTwitterMedia",
        "responses": {
          "200": {
            "description": "Upload succeeded; returns the `media_id` to reference in `post_twitter`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "media_id": {
                          "type": "string",
                          "description": "The uploaded media's ID. Pass it in `post_twitter` `media.media_ids`. Unattached media expires after ~24h."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": {
                    "media_id": "2099415764780605440"
                  }
                }
              }
            }
          },
          "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",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "mpp": false,
          "mpp_methods": [],
          "x402": false
        },
        "x-aisa-category": "1",
        "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-revision": {
          "customer_pricing_ref": "43e3b1dc8aa7",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "8f8d3b08340a"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/upload_media",
        "x-aisa-validation": "provider",
        "x-aisa-catalog-id": "aisa-twitter",
        "x-aisa-runtime-operation": {
          "operation_id": "uploadTwitterMedia",
          "method": "ANY",
          "path": "/apis/v1/twitter/upload_media"
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "media_files"
                ],
                "properties": {
                  "media_files": {
                    "type": "string",
                    "format": "binary",
                    "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."
                  },
                  "aisa_api_key": {
                    "type": "string",
                    "description": "Optional. Normally unnecessary — the gateway resolves your account from the `Authorization: Bearer` header."
                  }
                }
              },
              "encoding": {
                "media_files": {
                  "contentType": "image/png, image/jpeg, image/gif, video/mp4"
                }
              }
            }
          }
        },
        "x-aisa-source": {
          "kind": "manual",
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
          "converter": "scripts/import_existing_contracts.py@1",
          "path_space": "public",
          "owner": "AIsa-team/docs",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca"
        },
        "x-aisa-response-source": {
          "kind": "upstream_success_contract",
          "source": {
            "kind": "manual",
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/twitter-actions.json",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "content_hash": "sha256:38fc015ce92f044cd138f65fa0639cc658bd6f92c94a1275ee2881c0e0572e55",
            "converter": "scripts/import_existing_contracts.py@1",
            "path_space": "public",
            "owner": "AIsa-team/docs",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "policy_revision": "sha256:b1fe054bb82e9217981d581fa60e44bdf6d88d444ca6a8b4e95cdd2155dfe4ca"
          },
          "content_hash": "sha256:ce325c34ada803213fbfa40ff5c2f4db3342fe2a80c27438d4d35dc969c262a9"
        },
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/twitter/post_twitter-upload-media"
      }
    }
  }
}
