<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xml:lang="en-US"
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:ffd="http://xbrl.sec.gov/ffd/2025"
  xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef
      xlink:href="https://xbrl.sec.gov/ffd/2025/ffd-2025.xsd"
      xlink:type="simple"/>
    <context id="c-1">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001023024</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>1</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-07-17</startDate>
            <endDate>2026-07-17</endDate>
        </period>
    </context>
    <context id="c-2">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001023024</identifier>
        </entity>
        <period>
            <startDate>2026-07-17</startDate>
            <endDate>2026-07-17</endDate>
        </period>
    </context>
    <unit id="shares">
        <measure>shares</measure>
    </unit>
    <unit id="usd">
        <measure>iso4217:USD</measure>
    </unit>
    <unit id="number">
        <measure>pure</measure>
    </unit>
    <dei:EntityCentralIndexKey contextRef="c-2" id="f-15">0001023024</dei:EntityCentralIndexKey>
    <dei:EntityRegistrantName contextRef="c-2" id="f-16">ANI Pharmaceuticals, Inc.</dei:EntityRegistrantName>
    <ffd:FormTp contextRef="c-2" id="f-17">S-8</ffd:FormTp>
    <ffd:SubmissnTp contextRef="c-2" id="f-18">S-8</ffd:SubmissnTp>
    <ffd:FeeExhibitTp contextRef="c-2" id="f-19">EX-FILING FEES</ffd:FeeExhibitTp>
    <ffd:OffsetTableNa contextRef="c-2" id="f-20">N/A</ffd:OffsetTableNa>
    <ffd:OfferingSctyTp contextRef="c-1" id="f-1">Equity</ffd:OfferingSctyTp>
    <ffd:PrevslyPdFlg contextRef="c-1" id="f-2">false</ffd:PrevslyPdFlg>
    <ffd:OfferingSctyTitl contextRef="c-1" id="f-3">Common Stock, $0.0001 par value per share</ffd:OfferingSctyTitl>
    <ffd:FeesOthrRuleFlg contextRef="c-1" id="f-4">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd contextRef="c-1" decimals="0" id="f-5" unitRef="shares">962000</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty contextRef="c-1" decimals="2" id="f-6" unitRef="usd">80.80</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric contextRef="c-1" decimals="0" id="f-7" unitRef="usd">77729600</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate contextRef="c-1" decimals="7" id="f-8" unitRef="number">0.0001381</ffd:FeeRate>
    <ffd:FeeAmt contextRef="c-1" decimals="2" id="f-9" unitRef="usd">10734.45</ffd:FeeAmt>
    <ffd:TtlOfferingAmt contextRef="c-2" decimals="0" id="f-10" unitRef="usd">77729600</ffd:TtlOfferingAmt>
    <ffd:TtlFeeAmt contextRef="c-2" decimals="2" id="f-11" unitRef="usd">10734.45</ffd:TtlFeeAmt>
    <ffd:TtlOffsetAmt contextRef="c-2" decimals="0" id="f-12" unitRef="usd">0.00</ffd:TtlOffsetAmt>
    <ffd:NetFeeAmt contextRef="c-2" decimals="2" id="f-13" unitRef="usd">10734.45</ffd:NetFeeAmt>
    <ffd:OfferingNote contextRef="c-1" id="f-14">&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:100%"&gt;Pursuant to Rule 416 under the Securities Act of 1933, as amended (the &#x201c;Securities Act&#x201d;), this Registration Statement on Form S-8 also covers any additional shares of common stock, $0.0001 par value per share (&#x201c;Common Stock&#x201d;), of ANI Pharmaceuticals, Inc. (the &#x201c;Registrant&#x201d;) which may become issuable under the Registrant&#x2019;s Amended and Restated 2022 Stock Incentive Plan (the &#x201c;Amended and Restated 2022 Plan&#x201d;) resulting from adjustments as a result of stock dividends, stock splits, reverse stock splits, recapitalizations, reclassifications, mergers, split-ups, reorganizations, consolidations and other capital adjustments.&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:100%"&gt;Estimated solely for purposes of calculating the registration fee pursuant to Rule 457(c) and Rule 457(h) based on the average of the high and low prices of Registrant&#x2019;s Common Stock as reported on the Nasdaq Global Market on July 14, 2026. Pursuant to General Instruction E of Form S-8, the registration fee is calculated with respect to the additional securities registered on this Form S-8 only.&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:100%"&gt;Represents 962,000 shares of Common Stock added to the shares available for issuance pursuant to the Amended and Restated 2022 Plan resulting from the approval of the Amended and Restated 2022 Plan approved by the Registrant&#x2019;s stockholders at the 2026 Annual Meeting of Stockholders.&lt;/span&gt;</ffd:OfferingNote>
</xbrl>
