<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="amph-20260303.xsd" xlink:type="simple"/>
    <context id="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001297184</identifier>
        </entity>
        <period>
            <startDate>2026-03-03</startDate>
            <endDate>2026-03-03</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Tc_r1Rz_1pSzkqdeFOjs8N94w_2_1">0001297184</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Tc_Ph_vilpFkk-Vike7_8Mzlg_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Narr_BwvtqkkTJUaWH1SQEJ-plQ">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Narr_ucUHO_CFdEuIlkCQQI-ykA">2026-03-03</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Narr_nMqXL7YMgkeTMkeZmhOIoA">Amphastar Pharmaceuticals, Inc.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Tc_3QF7y7gofEWdo8H9B1QUhQ_1_0">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Tc_l61AtYI_PkWwAMNw2hyy-Q_1_1">001-36509</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Tc_iTEFHQFyCkqegW4QR0ObeA_1_2">33-0702205</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Tc_lzRL4vKtF0Cf6EL5iBFyqA_1_0">11570 6th Street</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Narr_qznXVp_wREy2K_9Nj-rrtw">Rancho Cucamonga</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Narr_O0lrJRqZ3EGU4A78tKW8hw">CA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Tc_97zS88f9C0OhlMm_hzgTBw_2_1">91730</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Narr_eurJhOl6DkukE362dAmzVQ">909</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Narr_QnYvW02rqUiY-N8RZ29ksA">980-9484</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Narr_qFXobalqHkGxlV7e8vL1_Q">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Narr_5oPdte-cl0KgbZuVFGicjw">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Narr_ur1XnTdqCE-CvatP-d4SHQ">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Narr_vPJjMswlGUmg1WGVE-DcWA">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Tc_dSa3WOXV50GoDqcawvHNvg_3_0">Common Stock, par value $0.0001 per share</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Tc_zfEIlQcGjki_xBLDuaMKAw_3_2">AMPH</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Narr_nJ1-0XKGkUGk1Ch_u4IAXg">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_3_3_2026_To_3_3_2026_dCEWxGTYYE6SXfjpyYhPDQ"
      id="Narr__zTkuoM6IkSklLzG7wVeHQ">false</dei:EntityEmergingGrowthCompany>
</xbrl>
