{
  "components": {
    "headers": {
      "X-Quota-Limit": {
        "schema": {
          "type": "integer"
        }
      },
      "X-Quota-Remaining": {
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Limit": {
        "description": "req/min",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining": {
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Reset": {
        "description": "s",
        "schema": {
          "type": "integer"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Invalid parameters."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Account suspended, no plan for this API, or IP not allowed."
      },
      "NotFound": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Resource not found."
      },
      "RateLimited": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Per-minute limit or monthly quota reached. See Retry-After."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Missing, invalid, expired or wrong-product key."
      },
      "Unavailable": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "API under maintenance or overloaded."
      }
    },
    "schemas": {
      "Error": {
        "properties": {
          "error": {
            "properties": {
              "code": {
                "examples": [
                  "rate_limited"
                ],
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiKeyHeader": {
        "in": "header",
        "name": "X-API-Key",
        "type": "apiKey"
      },
      "bearerAuth": {
        "bearerFormat": "flye_sk_... | flye_test_...",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "externalDocs": {
    "url": "https://flye.win/docs"
  },
  "info": {
    "contact": {
      "name": "flye.win",
      "url": "https://flye.win/docs"
    },
    "description": "Find sticker packs by search term and get direct, fast and stable links served by flye.win. A good fit for WhatsApp and Telegram bots, messaging apps and keyboards. Links need no key and can go straight into an img tag.",
    "termsOfService": "https://flye.win/terms",
    "title": "flye.win Stickers API",
    "version": "1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/stickers/packs": {
      "get": {
        "description": "Lists the packs found for the term, with a cover sticker, so you can build a picker.",
        "operationId": "stickersListPacks",
        "parameters": [
          {
            "description": "Search term, 2 to 80 characters.",
            "example": "gato",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "examples": [
                "gato"
              ],
              "type": "string"
            }
          },
          {
            "description": "Scale plan: identifies the user on your platform, so the limit applies per user and not to the account. Use a stable id, preferably a hash.",
            "in": "header",
            "name": "X-End-User-Id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Longest wait for a term never searched before, 0 to 15000 ms. Past that, the response returns right away with pending=true and the search continues: repeat the call shortly. Without it, waits for the result.",
            "example": "300",
            "in": "query",
            "name": "max_wait_ms",
            "required": false,
            "schema": {
              "examples": [
                "300"
              ],
              "type": "integer"
            }
          },
          {
            "description": "Packs per page, 1 to 20. Defaults to 10.",
            "example": "5",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "examples": [
                "5"
              ],
              "type": "integer"
            }
          },
          {
            "description": "Page, starting at 1.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "all, animated or static. Defaults to all.",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "packs": [
                    {
                      "animated": true,
                      "author": "Ana",
                      "count": 30,
                      "cover": "https://flye.win/media/stickers/8e1f0c3ab94d27f6a5c1e08d7b3f4a12.webp",
                      "id": "pk_3f9a1c7e2b8d4a60c1e5",
                      "name": "Gatos engraçados"
                    }
                  ],
                  "page": 1,
                  "query": "gato",
                  "total": 12
                }
              }
            },
            "description": "OK",
            "headers": {
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "summary": "List packs",
        "tags": [
          "stickers"
        ]
      }
    },
    "/stickers/packs/{id}": {
      "get": {
        "description": "Returns every sticker in a pack by its id.",
        "operationId": "stickersGetPack",
        "parameters": [
          {
            "description": "Pack id, from /search or /packs.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "pack": {
                    "animated": true,
                    "author": "Ana",
                    "count": 30,
                    "id": "pk_3f9a1c7e2b8d4a60c1e5",
                    "name": "Gatos engraçados"
                  },
                  "stickers": [
                    {
                      "animated": true,
                      "format": "webp",
                      "id": "8e1f0c3ab94d27f6a5c1e08d7b3f4a12",
                      "url": "https://flye.win/media/stickers/8e1f0c3ab94d27f6a5c1e08d7b3f4a12.webp"
                    }
                  ]
                }
              }
            },
            "description": "OK",
            "headers": {
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "summary": "Stickers in a pack",
        "tags": [
          "stickers"
        ]
      }
    },
    "/stickers/search": {
      "get": {
        "description": "Returns the most relevant pack for the term, with a link for each sticker. With rotate=true, each call returns the next pack, so bots don't repeat the same result. A term never searched before may come right away with partial=true, with what we already have, while the full search finishes.",
        "operationId": "stickersSearch",
        "parameters": [
          {
            "description": "Search term, 2 to 80 characters. Without it, the response has 30 featured stickers, drawn on every call, with trending=true.",
            "example": "gato",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "examples": [
                "gato"
              ],
              "type": "string"
            }
          },
          {
            "description": "Scale plan: identifies the user on your platform, so the limit applies per user and not to the account. Use a stable id, preferably a hash.",
            "in": "header",
            "name": "X-End-User-Id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Longest wait for a term never searched before, 0 to 15000 ms. Past that, the response returns right away with pending=true and the search continues: repeat the call shortly. Without it, waits for the result.",
            "example": "300",
            "in": "query",
            "name": "max_wait_ms",
            "required": false,
            "schema": {
              "examples": [
                "300"
              ],
              "type": "integer"
            }
          },
          {
            "description": "Stickers per response, 1 to 30. Defaults to 30.",
            "example": "10",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "examples": [
                "10"
              ],
              "type": "integer"
            }
          },
          {
            "description": "all, animated or static. Defaults to all.",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Pack position in the ranking, starting at 1. Defaults to 1.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "true returns the next pack on each call from this account. Ignores page.",
            "in": "query",
            "name": "rotate",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "pack": {
                    "animated": true,
                    "author": "Ana",
                    "count": 30,
                    "id": "pk_3f9a1c7e2b8d4a60c1e5",
                    "name": "Gatos engraçados"
                  },
                  "query": "gato",
                  "stickers": [
                    {
                      "animated": true,
                      "format": "webp",
                      "id": "8e1f0c3ab94d27f6a5c1e08d7b3f4a12",
                      "url": "https://flye.win/media/stickers/8e1f0c3ab94d27f6a5c1e08d7b3f4a12.webp"
                    }
                  ],
                  "total_packs": 12
                }
              }
            },
            "description": "OK",
            "headers": {
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "summary": "Search stickers",
        "tags": [
          "stickers"
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    },
    {
      "apiKeyHeader": []
    }
  ],
  "servers": [
    {
      "url": "https://flye.win/v1"
    }
  ],
  "tags": [
    {
      "description": "Stickers — Search stickers and animated GIFs, with ready-to-use links.",
      "externalDocs": {
        "url": "https://flye.win/apis/stickers"
      },
      "name": "stickers"
    }
  ]
}