<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2026"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="amph-20260806.xsd" xlink:type="simple"/>
    <context id="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001297184</identifier>
        </entity>
        <period>
            <startDate>2026-08-06</startDate>
            <endDate>2026-08-06</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Tc_jLxrgrPeLUKoAd0hDq8S4A_2_1">0001297184</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Tc_-tgo87TsEEyFRlCyn1levg_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Narr_PMBnyd5DP0emRVytzrbbVg">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Narr_5pz7ZheojkmRnjPNCsF_Mg">2026-08-06</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Narr_0irEuE8gvUGQ3fd4iW8ALg">Amphastar Pharmaceuticals, Inc.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Tc_yuntFa0wcECIVeFaYixsYQ_1_0">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Tc_18HXpcA-8kKhiGY7MH41KA_1_1">001-36509</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Tc_W7vnQLNDHkuYyLhL7su1vg_1_2">33-0702205</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Tc_77SJ8KnPlkmiOfTxyXSxfQ_1_0">11570 6th Street</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Narr_ICrHuQXTZUSo8GG0rJCH4g">Rancho Cucamonga</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Narr_Eo3yLUv7NUish_a8w_8KMw">CA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Tc_JlVMFkfwaUybcCH841SrBw_2_1">91730</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Narr_xOzBfFuYnUmWTUUS6b1L1Q">909</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Narr_xOA0uchgE0WYfWGOQMDIEw">980-9484</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Narr_-c4Xe9aBLESsFcGkgghsMg">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Narr_LXpHAv80IUahVY9aH60bfw">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Narr_cKJcc4BDekyMEpKdxZ-Vlw">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Narr_s1KO3Jr2wEmMpW3TzFDviw">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Tc_QzEbv2S060qhdBVJih9a5g_3_0">Common Stock, par value $0.0001 per share</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Tc_ppBabN5ERke8dcIco9MtYQ_3_2">AMPH</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Narr_UWlCMGQV-Eu1QSFYWFeWMA">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_8_6_2026_To_8_6_2026_122x4ZQ3nUuYt-ypnaSBLw"
      id="Narr__k2O1XYCO02kd1c4uW2zIw">false</dei:EntityEmergingGrowthCompany>
</xbrl>
