<?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-20260709.xsd" xlink:type="simple"/>
    <context id="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001297184</identifier>
        </entity>
        <period>
            <startDate>2026-07-09</startDate>
            <endDate>2026-07-09</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Tc__hgvMOjmDkes-TfSYPsp0g_2_1">0001297184</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Tc_SAczPnt3xEujgeDqGs4GDQ_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Narr_E6VQserONkiY7tgcGZWLHg">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Narr_7PmD-s6OyEqkeKobrQHq4w">2026-07-09</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Narr_yveaxHI5i0mkL5HRrgU3ew">Amphastar Pharmaceuticals, Inc.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Tc_4eJrCu3y40u8OIfFf3UhZw_1_0">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Tc_nSG3hDihvE60nomhKsH2dw_1_1">001-36509</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Tc_yfoD_vmlhEeZ_JsiskKB4w_1_2">33-0702205</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Tc_zFsI3bAzOECIu_oSQWM2oQ_1_0">11570 6th Street</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Narr_rtu2ZM9IQUq9Iq_VEVhr7w">Rancho Cucamonga</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Narr_v5z4i557c0CqBCdNUYqYxA">CA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Tc_eyv6BlXydE-JqsEnzzyBkg_2_1">91730</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Narr_cwtNK4CIFEObQO7xje_9-w">909</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Narr_39V3ji09Vk6S1YA2ytGNjQ">980-9484</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Narr_0Tdr91IuF0OfaceA6i_ICw">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Narr_ESubbjOUpESK9KN-b3_2hg">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Narr_D350xSy7zkmFymdy1TpDKQ">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Narr_cApyaak-O0OaiQ8Lve_86w">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Tc_dTwFhQPlv0S4JI-opr378w_3_0">Common Stock, par value $0.0001 per share</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Tc_HNhQkZ9JZ0mcG6AEM7PTlQ_3_2">AMPH</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Narr_FxAtxMOG-EK_yJQV4JEvhg">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_7_9_2026_To_7_9_2026_WQQ8SGGYQkOz81JDaXsHwA"
      id="Narr_96OxrL0_5kG22oS6yNR6VQ">false</dei:EntityEmergingGrowthCompany>
</xbrl>
