<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2021q4"
  xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="anip-20220602.xsd" xlink:type="simple"/>
    <context id="From2022-06-02to2022-06-02">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001023024</identifier>
        </entity>
        <period>
            <startDate>2022-06-02</startDate>
            <endDate>2022-06-02</endDate>
        </period>
    </context>
    <unit id="USD">
        <measure>iso4217:USD</measure>
    </unit>
    <unit id="Shares">
        <measure>shares</measure>
    </unit>
    <unit id="USDPShares">
        <divide>
            <unitNumerator>
                <measure>iso4217:USD</measure>
            </unitNumerator>
            <unitDenominator>
                <measure>shares</measure>
            </unitDenominator>
        </divide>
    </unit>
    <dei:EntityCentralIndexKey contextRef="From2022-06-02to2022-06-02">0001023024</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag contextRef="From2022-06-02to2022-06-02">true</dei:AmendmentFlag>
    <dei:DocumentType contextRef="From2022-06-02to2022-06-02">8-K/A</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="From2022-06-02to2022-06-02">2022-06-02</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName contextRef="From2022-06-02to2022-06-02">ANI PHARMACEUTICALS, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode contextRef="From2022-06-02to2022-06-02">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="From2022-06-02to2022-06-02">001-31812</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="From2022-06-02to2022-06-02">58-2301143</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="From2022-06-02to2022-06-02">210 Main Street West</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown contextRef="From2022-06-02to2022-06-02">Baudette</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="From2022-06-02to2022-06-02">MN</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="From2022-06-02to2022-06-02">56623</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="From2022-06-02to2022-06-02">218</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="From2022-06-02to2022-06-02">634-3500</dei:LocalPhoneNumber>
    <dei:Security12bTitle contextRef="From2022-06-02to2022-06-02">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="From2022-06-02to2022-06-02">ANIP</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="From2022-06-02to2022-06-02">NASDAQ</dei:SecurityExchangeName>
    <dei:WrittenCommunications contextRef="From2022-06-02to2022-06-02">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="From2022-06-02to2022-06-02">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="From2022-06-02to2022-06-02">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="From2022-06-02to2022-06-02">false</dei:PreCommencementIssuerTenderOffer>
    <dei:EntityEmergingGrowthCompany contextRef="From2022-06-02to2022-06-02">false</dei:EntityEmergingGrowthCompany>
    <dei:AmendmentDescription contextRef="From2022-06-02to2022-06-02">On June 2, 2022, ANI
Pharmaceuticals, Inc. (the &#x201c;Company&#x201d;) filed a Current Report on Form&#160;8-K (the &#x201c;Prior 8-K&#x201d;)
announcing its decision to cease operations at its manufacturing plant located in Oakville, Ontario, Canada as part of ongoing
initiatives to capture operational synergies following the Company&#x2019;s acquisition of Novitium Pharma LLC. The Oakville
manufacturing plant is expected to cease operations by the first quarter of 2023. As stated in the Prior 8-K, at the time the Prior
8-K was filed, the Company was unable to make a good faith estimate of the amount of charges and costs that may be incurred in
connection with this closure.</dei:AmendmentDescription>
</xbrl>
