<?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-20261105.xsd" xlink:type="simple"/>
    <context id="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001297184</identifier>
        </entity>
        <period>
            <startDate>2026-11-05</startDate>
            <endDate>2026-11-05</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Tc_MYFYc2L7_0uvt4e3es2mvg_2_1">0001297184</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Tc_APYkdSisX0ucXlEjzM8T-g_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Narr_WwKrPhUJjkq8IwObrOoH8w">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Narr_YdR9eUNTukuaMMXov-5GyA">2026-11-05</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Narr_c621WCetA0aJfa-1bXJ-rQ">Amphastar Pharmaceuticals, Inc.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Tc_11BmprxLcEaSwScAdjkfuQ_1_0">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Tc_sTLt_fHKsEmTRYP22FU8cA_1_1">001-36509</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Tc_P6sjsiAHmkKDoDLVDwCgyQ_1_2">33-0702205</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Tc_LT9to-f0XUGKZKQXoQsggA_1_0">11570 6th Street</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Narr_PV83wS0E2kaZrQsZs0-iKQ">Rancho Cucamonga</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Narr_vrTi-9j-L0WoGZEM17i3RA">CA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Tc_a0ul161XiUGk8hhxEh_vkQ_2_1">91730</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Narr_7bx-KTss2k2klkJ-Kx6ziw">909</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Narr_JAMFEOydsEi0ro_nhkg2xQ">980-9484</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Narr_2x1pAqRDNka281G4nu7EhA">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Narr_KF4pEUxIzku4mOusKBOe-w">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Narr_CROLRJlSw0iudx7cP0ca-g">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Narr_avABfKq5XUeJ6GfYLt8rLw">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Tc_6mihujJwdk-lfJn9ufvgAQ_3_0">Common Stock, par value $0.0001 per share</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Tc_RsZuKzx6x02ni9XJVSlGDA_3_2">AMPH</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Narr_eoJVY29V7kO7SIYLE1JRXg">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_11_5_2026_To_11_5_2026_0Vaj0KxhcEq7lIVcs5owVA"
      id="Narr_U9SL0iOWVEqU9dwKKlMccw">false</dei:EntityEmergingGrowthCompany>
</xbrl>
