<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2024 Workiva-->
<!--r:d1b0d374-59d3-494d-ab57-0327414dd086,g:e2d69e39-7080-477b-8655-fce353fd237f-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member"/>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/Cover" xlink:type="simple" xlink:href="anip-20231231.xsd#Cover"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/Cover" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentInformationTable_8bd54ba5-5469-4dd2-a101-c8aa300bd408" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentInformationTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_DocumentInformationTable_8bd54ba5-5469-4dd2-a101-c8aa300bd408" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_731f53a7-8f81-4ae4-8e5d-b833eb74970d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_dei_DocumentInformationTable_8bd54ba5-5469-4dd2-a101-c8aa300bd408" xlink:to="loc_us-gaap_StatementClassOfStockAxis_731f53a7-8f81-4ae4-8e5d-b833eb74970d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_731f53a7-8f81-4ae4-8e5d-b833eb74970d_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_731f53a7-8f81-4ae4-8e5d-b833eb74970d" xlink:to="loc_us-gaap_ClassOfStockDomain_731f53a7-8f81-4ae4-8e5d-b833eb74970d_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_2f97d040-be4b-4d91-9e08-d2a00aaa92a8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_731f53a7-8f81-4ae4-8e5d-b833eb74970d" xlink:to="loc_us-gaap_ClassOfStockDomain_2f97d040-be4b-4d91-9e08-d2a00aaa92a8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_8e98298d-c48d-4e0e-b8c9-cc4d59d113b5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_2f97d040-be4b-4d91-9e08-d2a00aaa92a8" xlink:to="loc_us-gaap_CommonStockMember_8e98298d-c48d-4e0e-b8c9-cc4d59d113b5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ClassCSpecialStockMember_1457264f-4a59-417a-bd6a-c8c08038087e" xlink:href="anip-20231231.xsd#anip_ClassCSpecialStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_2f97d040-be4b-4d91-9e08-d2a00aaa92a8" xlink:to="loc_anip_ClassCSpecialStockMember_1457264f-4a59-417a-bd6a-c8c08038087e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentType_7633835a-7a97-4237-bda5-ae13d8c3bb5f" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentType"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_DocumentType_7633835a-7a97-4237-bda5-ae13d8c3bb5f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentAnnualReport_68901fcc-3a6b-4b44-b604-71cc8fff4e96" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentAnnualReport"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_DocumentAnnualReport_68901fcc-3a6b-4b44-b604-71cc8fff4e96" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentPeriodEndDate_5f72dd08-2974-4c95-bf6b-a6884bbee9a3" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentPeriodEndDate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_DocumentPeriodEndDate_5f72dd08-2974-4c95-bf6b-a6884bbee9a3" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_CurrentFiscalYearEndDate_06b56987-ec19-4d86-9236-6120adf15182" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_CurrentFiscalYearEndDate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_CurrentFiscalYearEndDate_06b56987-ec19-4d86-9236-6120adf15182" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentTransitionReport_efb9ceff-76e0-4798-8f3f-4018b011c79e" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentTransitionReport"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_DocumentTransitionReport_efb9ceff-76e0-4798-8f3f-4018b011c79e" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityFileNumber_a2207cab-51ee-44d8-a369-084820392316" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityFileNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityFileNumber_a2207cab-51ee-44d8-a369-084820392316" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityRegistrantName_e721569a-40e8-44e9-9e89-f5a012181443" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityRegistrantName"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityRegistrantName_e721569a-40e8-44e9-9e89-f5a012181443" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityIncorporationStateCountryCode_29c7276a-216f-4685-8e1e-36a1157ce2d1" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityIncorporationStateCountryCode"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityIncorporationStateCountryCode_29c7276a-216f-4685-8e1e-36a1157ce2d1" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityTaxIdentificationNumber_bd39d53f-1e68-4636-8fa5-0dfea534100f" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityTaxIdentificationNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityTaxIdentificationNumber_bd39d53f-1e68-4636-8fa5-0dfea534100f" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressAddressLine1_d91d1ffc-9f83-4042-9c6a-d6df634005b7" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityAddressAddressLine1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityAddressAddressLine1_d91d1ffc-9f83-4042-9c6a-d6df634005b7" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressCityOrTown_cbabc82e-15ee-4316-881e-b23338765c0f" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityAddressCityOrTown"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityAddressCityOrTown_cbabc82e-15ee-4316-881e-b23338765c0f" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressStateOrProvince_76c695ca-fc1c-4e1e-a5e5-fc6307475bf2" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityAddressStateOrProvince"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityAddressStateOrProvince_76c695ca-fc1c-4e1e-a5e5-fc6307475bf2" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressPostalZipCode_e4fc4b31-6e05-424b-98d0-f5b03a00867b" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityAddressPostalZipCode"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityAddressPostalZipCode_e4fc4b31-6e05-424b-98d0-f5b03a00867b" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_CityAreaCode_24eb42d3-e7c2-4a22-b2db-d6ef2df9c75d" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_CityAreaCode"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_CityAreaCode_24eb42d3-e7c2-4a22-b2db-d6ef2df9c75d" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_LocalPhoneNumber_d6b9c97a-e388-4664-9dfc-ef76b935ece7" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_LocalPhoneNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_LocalPhoneNumber_d6b9c97a-e388-4664-9dfc-ef76b935ece7" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_Security12bTitle_349cd44a-c46a-45bb-9013-92e694221d67" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_Security12bTitle"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_Security12bTitle_349cd44a-c46a-45bb-9013-92e694221d67" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_TradingSymbol_0d73a968-bfae-472d-883c-0f694532f20b" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_TradingSymbol"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_TradingSymbol_0d73a968-bfae-472d-883c-0f694532f20b" xlink:type="arc" order="16"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_SecurityExchangeName_d709b8e1-b95d-4f40-8a4f-9f8608f38563" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_SecurityExchangeName"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_SecurityExchangeName_d709b8e1-b95d-4f40-8a4f-9f8608f38563" xlink:type="arc" order="17"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityWellKnownSeasonedIssuer_0c02d1d0-1cdb-4ea9-8f27-cf6d539b2c8f" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityWellKnownSeasonedIssuer"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityWellKnownSeasonedIssuer_0c02d1d0-1cdb-4ea9-8f27-cf6d539b2c8f" xlink:type="arc" order="18"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityVoluntaryFilers_313f8494-d5a2-4ce5-917a-4104a9d52cdc" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityVoluntaryFilers"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityVoluntaryFilers_313f8494-d5a2-4ce5-917a-4104a9d52cdc" xlink:type="arc" order="19"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityCurrentReportingStatus_d787eb0b-1996-435c-bf3f-dc81101d1f2b" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityCurrentReportingStatus"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityCurrentReportingStatus_d787eb0b-1996-435c-bf3f-dc81101d1f2b" xlink:type="arc" order="20"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityInteractiveDataCurrent_bab73da7-4040-40e0-90c1-6518c3da1ce7" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityInteractiveDataCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityInteractiveDataCurrent_bab73da7-4040-40e0-90c1-6518c3da1ce7" xlink:type="arc" order="21"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityFilerCategory_fdec23a7-6ef3-46b0-9857-a1a36fd3628e" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityFilerCategory"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityFilerCategory_fdec23a7-6ef3-46b0-9857-a1a36fd3628e" xlink:type="arc" order="22"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntitySmallBusiness_119fe90e-2dbf-4708-a58f-81221bedd4cd" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntitySmallBusiness"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntitySmallBusiness_119fe90e-2dbf-4708-a58f-81221bedd4cd" xlink:type="arc" order="23"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityEmergingGrowthCompany_46c8b779-0a1f-49c0-9d02-0b42569b65b5" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityEmergingGrowthCompany"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityEmergingGrowthCompany_46c8b779-0a1f-49c0-9d02-0b42569b65b5" xlink:type="arc" order="24"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_IcfrAuditorAttestationFlag_210914e5-52d8-411e-81d1-0de64a65047d" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_IcfrAuditorAttestationFlag"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_IcfrAuditorAttestationFlag_210914e5-52d8-411e-81d1-0de64a65047d" xlink:type="arc" order="25"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentFinStmtErrorCorrectionFlag_1b15ad2d-e3a3-473d-b093-5bf3d9ea869e" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentFinStmtErrorCorrectionFlag"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_DocumentFinStmtErrorCorrectionFlag_1b15ad2d-e3a3-473d-b093-5bf3d9ea869e" xlink:type="arc" order="26"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityShellCompany_4c09b97c-ae3b-48ea-854e-3081e9510628" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityShellCompany"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityShellCompany_4c09b97c-ae3b-48ea-854e-3081e9510628" xlink:type="arc" order="27"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityPublicFloat_65f52cc7-bbe9-4161-99d3-86b8be0f9580" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityPublicFloat"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityPublicFloat_65f52cc7-bbe9-4161-99d3-86b8be0f9580" xlink:type="arc" order="28"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityCommonStockSharesOutstanding_cb9f8d50-a884-4a4a-a2a6-26eef4bb0ec3" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityCommonStockSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityCommonStockSharesOutstanding_cb9f8d50-a884-4a4a-a2a6-26eef4bb0ec3" xlink:type="arc" order="29"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentsIncorporatedByReferenceTextBlock_ad34dde1-f3a3-4488-9268-91f42abb1837" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentsIncorporatedByReferenceTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_DocumentsIncorporatedByReferenceTextBlock_ad34dde1-f3a3-4488-9268-91f42abb1837" xlink:type="arc" order="30"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityCentralIndexKey_a04f9c67-e138-4cba-8a51-f136075e6938" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityCentralIndexKey"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_EntityCentralIndexKey_a04f9c67-e138-4cba-8a51-f136075e6938" xlink:type="arc" order="31"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentFiscalYearFocus_b075134f-4638-4d45-8e06-4c529b75d1a1" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentFiscalYearFocus"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_DocumentFiscalYearFocus_b075134f-4638-4d45-8e06-4c529b75d1a1" xlink:type="arc" order="32"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentFiscalPeriodFocus_0b9d044c-60cc-456e-a325-8b5c827545ac" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentFiscalPeriodFocus"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_DocumentFiscalPeriodFocus_0b9d044c-60cc-456e-a325-8b5c827545ac" xlink:type="arc" order="33"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_AmendmentFlag_5c3d38b5-92e0-446e-9814-d8a3e5a18a6c" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_AmendmentFlag"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_d6def8fe-3ae1-4f77-a4d9-858e866594b2" xlink:to="loc_dei_AmendmentFlag_5c3d38b5-92e0-446e-9814-d8a3e5a18a6c" xlink:type="arc" order="34"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:type="simple" xlink:href="anip-20231231.xsd#ConsolidatedBalanceSheetsParenthetical"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_698ddb4e-7c4d-44e0-b0cc-ab2d96ac3cd9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_StatementTable_698ddb4e-7c4d-44e0-b0cc-ab2d96ac3cd9" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_2feade9f-c091-456f-a875-16616bed70c3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_698ddb4e-7c4d-44e0-b0cc-ab2d96ac3cd9" xlink:to="loc_us-gaap_StatementClassOfStockAxis_2feade9f-c091-456f-a875-16616bed70c3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_2feade9f-c091-456f-a875-16616bed70c3_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_2feade9f-c091-456f-a875-16616bed70c3" xlink:to="loc_us-gaap_ClassOfStockDomain_2feade9f-c091-456f-a875-16616bed70c3_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_10fa2e80-2a0a-49cf-ac81-1450e1f69bee" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_2feade9f-c091-456f-a875-16616bed70c3" xlink:to="loc_us-gaap_ClassOfStockDomain_10fa2e80-2a0a-49cf-ac81-1450e1f69bee" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConvertiblePreferredStockMember_c98bf152-e06a-40ce-a04a-86e5c279eeb4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConvertiblePreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_10fa2e80-2a0a-49cf-ac81-1450e1f69bee" xlink:to="loc_us-gaap_ConvertiblePreferredStockMember_c98bf152-e06a-40ce-a04a-86e5c279eeb4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_12bfbc3a-297d-4932-abf8-ae892e33964d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_10fa2e80-2a0a-49cf-ac81-1450e1f69bee" xlink:to="loc_us-gaap_CommonStockMember_12bfbc3a-297d-4932-abf8-ae892e33964d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ClassCSpecialStockMember_93176bf1-7668-415a-b45d-d3eee227f9b8" xlink:href="anip-20231231.xsd#anip_ClassCSpecialStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_10fa2e80-2a0a-49cf-ac81-1450e1f69bee" xlink:to="loc_anip_ClassCSpecialStockMember_93176bf1-7668-415a-b45d-d3eee227f9b8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesBalance_245c0726-7af0-4283-b9c2-f36ade8829db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationAllowancesAndReservesBalance"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesBalance_245c0726-7af0-4283-b9c2-f36ade8829db" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquityParOrStatedValuePerShare_21924c78-7804-4ac8-8877-07c0019dc2e0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquityParOrStatedValuePerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_TemporaryEquityParOrStatedValuePerShare_21924c78-7804-4ac8-8877-07c0019dc2e0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquitySharesAuthorized_bcf01180-9ed1-4e77-b371-8a28c1eb183b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquitySharesAuthorized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_TemporaryEquitySharesAuthorized_bcf01180-9ed1-4e77-b371-8a28c1eb183b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquitySharesIssued_45e88cb5-483b-43ed-a427-d5dd4fbd223b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquitySharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_TemporaryEquitySharesIssued_45e88cb5-483b-43ed-a427-d5dd4fbd223b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquitySharesOutstanding_0ab3ffb6-6144-49eb-a70a-b08362d507a3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquitySharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_TemporaryEquitySharesOutstanding_0ab3ffb6-6144-49eb-a70a-b08362d507a3" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockParOrStatedValuePerShare_dfc389b6-e3cd-4ed5-960d-f8d1f08c8c58" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockParOrStatedValuePerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_CommonStockParOrStatedValuePerShare_dfc389b6-e3cd-4ed5-960d-f8d1f08c8c58" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesAuthorized_c9e64092-a815-4ff9-8997-713f535fd2c7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesAuthorized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_CommonStockSharesAuthorized_c9e64092-a815-4ff9-8997-713f535fd2c7" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesIssued_1547f95d-afc8-4be8-a6a3-828a4010a5da" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_CommonStockSharesIssued_1547f95d-afc8-4be8-a6a3-828a4010a5da" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_d1e4243f-b6c4-42ca-bab3-f2e04a9e8a48" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_d1e4243f-b6c4-42ca-bab3-f2e04a9e8a48" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockParOrStatedValuePerShare_fba1d852-3f1d-435c-8af6-2473ef5c8e66" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockParOrStatedValuePerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_PreferredStockParOrStatedValuePerShare_fba1d852-3f1d-435c-8af6-2473ef5c8e66" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockSharesAuthorized_f54f4773-f15c-463a-81d8-3439718c28a5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockSharesAuthorized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_PreferredStockSharesAuthorized_f54f4773-f15c-463a-81d8-3439718c28a5" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockSharesIssued_4942ddc0-f8da-402b-b500-5750ed2115e5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_PreferredStockSharesIssued_4942ddc0-f8da-402b-b500-5750ed2115e5" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockSharesOutstanding_46ece8dd-11b9-44fb-b907-48d9e336ee81" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_PreferredStockSharesOutstanding_46ece8dd-11b9-44fb-b907-48d9e336ee81" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonShares_22b1fdf4-b639-49b3-a61f-93b451edc043" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockCommonShares"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_11ad6319-a464-4f15-8a4d-5226342dbafb" xlink:to="loc_us-gaap_TreasuryStockCommonShares_22b1fdf4-b639-49b3-a61f-93b451edc043" xlink:type="arc" order="13"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/ConsolidatedStatementsofChangesinMezzanineEquityandStockholdersEquity" xlink:type="simple" xlink:href="anip-20231231.xsd#ConsolidatedStatementsofChangesinMezzanineEquityandStockholdersEquity"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/ConsolidatedStatementsofChangesinMezzanineEquityandStockholdersEquity" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_0cfbe9c8-fc7d-4f83-a71f-f395b75da93b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_52ed3345-23ac-424f-884c-296bee15a088" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_0cfbe9c8-fc7d-4f83-a71f-f395b75da93b" xlink:to="loc_us-gaap_StatementTable_52ed3345-23ac-424f-884c-296bee15a088" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_2f21a035-86a8-48a8-9311-740327a1568f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_52ed3345-23ac-424f-884c-296bee15a088" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_2f21a035-86a8-48a8-9311-740327a1568f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_2f21a035-86a8-48a8-9311-740327a1568f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_2f21a035-86a8-48a8-9311-740327a1568f" xlink:to="loc_us-gaap_EquityComponentDomain_2f21a035-86a8-48a8-9311-740327a1568f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_5e1487b8-c741-40e4-9e70-f40e07894a72" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_2f21a035-86a8-48a8-9311-740327a1568f" xlink:to="loc_us-gaap_EquityComponentDomain_5e1487b8-c741-40e4-9e70-f40e07894a72" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_5085cbfa-fbf7-4a7b-a28e-183eb661e903" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_5e1487b8-c741-40e4-9e70-f40e07894a72" xlink:to="loc_us-gaap_CommonStockMember_5085cbfa-fbf7-4a7b-a28e-183eb661e903" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_131c9916-519b-41b4-b0bd-acea68c5e387" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdditionalPaidInCapitalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_5e1487b8-c741-40e4-9e70-f40e07894a72" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_131c9916-519b-41b4-b0bd-acea68c5e387" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonMember_c2991fc9-7828-4bc0-851d-53cf705f396c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockCommonMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_5e1487b8-c741-40e4-9e70-f40e07894a72" xlink:to="loc_us-gaap_TreasuryStockCommonMember_c2991fc9-7828-4bc0-851d-53cf705f396c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_e8ae68cf-aa99-416b-ac9c-21235649c421" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_5e1487b8-c741-40e4-9e70-f40e07894a72" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_e8ae68cf-aa99-416b-ac9c-21235649c421" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsMember_40fc31bb-b0db-49d1-88da-eb88b00b7890" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_5e1487b8-c741-40e4-9e70-f40e07894a72" xlink:to="loc_us-gaap_RetainedEarningsMember_40fc31bb-b0db-49d1-88da-eb88b00b7890" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_b0623933-7bbd-4317-8edf-214944a9b04d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_52ed3345-23ac-424f-884c-296bee15a088" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_b0623933-7bbd-4317-8edf-214944a9b04d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_b0623933-7bbd-4317-8edf-214944a9b04d_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_b0623933-7bbd-4317-8edf-214944a9b04d" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_b0623933-7bbd-4317-8edf-214944a9b04d_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_ee14dafa-ad3f-4c72-80db-e5595d5a1a53" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_b0623933-7bbd-4317-8edf-214944a9b04d" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_ee14dafa-ad3f-4c72-80db-e5595d5a1a53" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NovitiumMember_16cce125-1191-43cd-a4a1-33177a31de7e" xlink:href="anip-20231231.xsd#anip_NovitiumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_ee14dafa-ad3f-4c72-80db-e5595d5a1a53" xlink:to="loc_anip_NovitiumMember_16cce125-1191-43cd-a4a1-33177a31de7e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_0b52a3ce-dfb9-409c-a10e-5bbe6b22f625" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_52ed3345-23ac-424f-884c-296bee15a088" xlink:to="loc_us-gaap_StatementClassOfStockAxis_0b52a3ce-dfb9-409c-a10e-5bbe6b22f625" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_0b52a3ce-dfb9-409c-a10e-5bbe6b22f625_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_0b52a3ce-dfb9-409c-a10e-5bbe6b22f625" xlink:to="loc_us-gaap_ClassOfStockDomain_0b52a3ce-dfb9-409c-a10e-5bbe6b22f625_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_ef103636-a01d-4088-93be-4276ce84f87e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_0b52a3ce-dfb9-409c-a10e-5bbe6b22f625" xlink:to="loc_us-gaap_ClassOfStockDomain_ef103636-a01d-4088-93be-4276ce84f87e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConvertiblePreferredStockMember_baf31196-2187-48b5-9c6a-af97feb1660a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConvertiblePreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_ef103636-a01d-4088-93be-4276ce84f87e" xlink:to="loc_us-gaap_ConvertiblePreferredStockMember_baf31196-2187-48b5-9c6a-af97feb1660a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInTemporaryEquityRollForward_28f64051-b6ff-4e86-8f0f-de7ea7d012fc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInTemporaryEquityRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_0cfbe9c8-fc7d-4f83-a71f-f395b75da93b" xlink:to="loc_us-gaap_IncreaseDecreaseInTemporaryEquityRollForward_28f64051-b6ff-4e86-8f0f-de7ea7d012fc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquityCarryingAmountAttributableToParent_5e92355d-dec8-4e57-8419-74fb1e65a243" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquityCarryingAmountAttributableToParent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInTemporaryEquityRollForward_28f64051-b6ff-4e86-8f0f-de7ea7d012fc" xlink:to="loc_us-gaap_TemporaryEquityCarryingAmountAttributableToParent_5e92355d-dec8-4e57-8419-74fb1e65a243" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquitySharesOutstanding_02f3d6e4-ffbf-4118-ae96-626b2a4eb593" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquitySharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInTemporaryEquityRollForward_28f64051-b6ff-4e86-8f0f-de7ea7d012fc" xlink:to="loc_us-gaap_TemporaryEquitySharesOutstanding_02f3d6e4-ffbf-4118-ae96-626b2a4eb593" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues_50abc0b4-6890-418d-90ab-29a147ce00e1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInTemporaryEquityRollForward_28f64051-b6ff-4e86-8f0f-de7ea7d012fc" xlink:to="loc_us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues_50abc0b4-6890-418d-90ab-29a147ce00e1" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_TemporaryEquityStockIssuedDuringPeriodSharesNewIssues_04c9ab56-972d-4f9c-852d-a0302abb6207" xlink:href="anip-20231231.xsd#anip_TemporaryEquityStockIssuedDuringPeriodSharesNewIssues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInTemporaryEquityRollForward_28f64051-b6ff-4e86-8f0f-de7ea7d012fc" xlink:to="loc_anip_TemporaryEquityStockIssuedDuringPeriodSharesNewIssues_04c9ab56-972d-4f9c-852d-a0302abb6207" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquityCarryingAmountAttributableToParent_d1d65ad7-b91d-40fd-91ae-dcb52606951e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquityCarryingAmountAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquitySharesOutstanding_4d12fe81-770a-4fc1-b355-b680179924d6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquitySharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_0cfbe9c8-fc7d-4f83-a71f-f395b75da93b" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_144e2997-10d3-420e-afbd-f80041c6ad5e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_StockholdersEquity_144e2997-10d3-420e-afbd-f80041c6ad5e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesIssued_4a3acfc0-d736-4e6e-b163-79fbdbde7549" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_CommonStockSharesIssued_4a3acfc0-d736-4e6e-b163-79fbdbde7549" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonShares_0a881b89-c6f1-4c4a-9bcb-a1585ece481c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockCommonShares"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_TreasuryStockCommonShares_0a881b89-c6f1-4c4a-9bcb-a1585ece481c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_StockholdersEquityAttributableToParentAndTemporaryEquity_d483670d-0b95-42c0-b3b8-dc6feed6eff4" xlink:href="anip-20231231.xsd#anip_StockholdersEquityAttributableToParentAndTemporaryEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_anip_StockholdersEquityAttributableToParentAndTemporaryEquity_d483670d-0b95-42c0-b3b8-dc6feed6eff4" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_b3ab9c74-4e31-4ef5-b633-c9151155fdb5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_b3ab9c74-4e31-4ef5-b633-c9151155fdb5" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_360bd319-632b-4c78-895b-b5dcdc7bc737" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockSharesAcquired"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_360bd319-632b-4c78-895b-b5dcdc7bc737" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_3a976360-e47e-4cd9-86ba-98dff1cb0039" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockValueAcquiredCostMethod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_3a976360-e47e-4cd9-86ba-98dff1cb0039" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_328a99f1-1a84-449b-a3cd-79c3e4e0ba6a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_328a99f1-1a84-449b-a3cd-79c3e4e0ba6a" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_cdfdb4ce-1f92-43eb-a06a-bbae5272974d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_cdfdb4ce-1f92-43eb-a06a-bbae5272974d" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardGross_0851cfcf-4322-444f-953a-e0a3020fb4d9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardGross_0851cfcf-4322-444f-953a-e0a3020fb4d9" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensation_8f976152-aa95-4a6a-847c-3e942921a400" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensation_8f976152-aa95-4a6a-847c-3e942921a400" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardForfeited_66648f42-795a-45a7-9609-a3e945a97def" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardForfeited"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardForfeited_66648f42-795a-45a7-9609-a3e945a97def" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardForfeitures_5bcc6285-faaf-42a6-9190-d54f3bc52d7a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardForfeitures"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardForfeitures_5bcc6285-faaf-42a6-9190-d54f3bc52d7a" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_fd983111-6a62-44e5-854e-9f2b71ecfdc5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodSharesNewIssues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_fd983111-6a62-44e5-854e-9f2b71ecfdc5" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueNewIssues_b79bd9eb-8135-41de-b0b9-83f72d5fe5e6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodValueNewIssues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueNewIssues_b79bd9eb-8135-41de-b0b9-83f72d5fe5e6" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendsPreferredStock_a6b8f16b-9404-49a6-9b78-2b25752446a1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DividendsPreferredStock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_DividendsPreferredStock_a6b8f16b-9404-49a6-9b78-2b25752446a1" xlink:type="arc" order="16"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues_6acacf8b-7a5e-4324-9338-f4130420c04f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_23d9451b-98b8-4c63-885c-d77960bdd094" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_23d9451b-98b8-4c63-885c-d77960bdd094" xlink:type="arc" order="18"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_1865799e-8dd1-4db4-9b7a-ecc997047cde" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_6dc35ab8-d416-4223-9bde-db9208f1db4b" xlink:to="loc_us-gaap_NetIncomeLoss_1865799e-8dd1-4db4-9b7a-ecc997047cde" xlink:type="arc" order="19"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_8257af2f-c74d-4acb-a0a2-e58f597c6629" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesIssued_8cb5bb3b-620e-40fc-9689-1d2bd6cf95c2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesIssued"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonShares_aaac7101-e0ba-4819-b59a-5af8bd8fdb94" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockCommonShares"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_StockholdersEquityAttributableToParentAndTemporaryEquity_10698695-51b1-4d57-9a0e-bdf78b76f551" xlink:href="anip-20231231.xsd#anip_StockholdersEquityAttributableToParentAndTemporaryEquity"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/DESCRIPTIONOFBUSINESSANDSUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESNarrativeDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#DESCRIPTIONOFBUSINESSANDSUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/DESCRIPTIONOFBUSINESSANDSUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfStockByClassTable_2d224e42-ec9e-4a29-9632-afd38cc2864d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfStockByClassTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:to="loc_us-gaap_ScheduleOfStockByClassTable_2d224e42-ec9e-4a29-9632-afd38cc2864d" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CounterpartyNameAxis_2a1ae5b0-30c6-4d53-bc3c-8c4b9e843f63" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CounterpartyNameAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_2d224e42-ec9e-4a29-9632-afd38cc2864d" xlink:to="loc_srt_CounterpartyNameAxis_2a1ae5b0-30c6-4d53-bc3c-8c4b9e843f63" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RepurchaseAgreementCounterpartyNameDomain_2a1ae5b0-30c6-4d53-bc3c-8c4b9e843f63_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RepurchaseAgreementCounterpartyNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_CounterpartyNameAxis_2a1ae5b0-30c6-4d53-bc3c-8c4b9e843f63" xlink:to="loc_srt_RepurchaseAgreementCounterpartyNameDomain_2a1ae5b0-30c6-4d53-bc3c-8c4b9e843f63_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RepurchaseAgreementCounterpartyNameDomain_0ec1d2cc-dd2d-41b6-bb7c-9f630955cd93" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RepurchaseAgreementCounterpartyNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_CounterpartyNameAxis_2a1ae5b0-30c6-4d53-bc3c-8c4b9e843f63" xlink:to="loc_srt_RepurchaseAgreementCounterpartyNameDomain_0ec1d2cc-dd2d-41b6-bb7c-9f630955cd93" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CranfordPharmaceuticalsMember_b0edc85e-9118-4253-8919-49b088f4ac89" xlink:href="anip-20231231.xsd#anip_CranfordPharmaceuticalsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RepurchaseAgreementCounterpartyNameDomain_0ec1d2cc-dd2d-41b6-bb7c-9f630955cd93" xlink:to="loc_anip_CranfordPharmaceuticalsMember_b0edc85e-9118-4253-8919-49b088f4ac89" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StatementGeographicalAxis_d8cdfea8-dfd3-45dc-a687-e69d8b013a03" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_StatementGeographicalAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_2d224e42-ec9e-4a29-9632-afd38cc2864d" xlink:to="loc_srt_StatementGeographicalAxis_d8cdfea8-dfd3-45dc-a687-e69d8b013a03" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_d8cdfea8-dfd3-45dc-a687-e69d8b013a03_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_d8cdfea8-dfd3-45dc-a687-e69d8b013a03" xlink:to="loc_srt_SegmentGeographicalDomain_d8cdfea8-dfd3-45dc-a687-e69d8b013a03_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_9071080a-ee2d-43bb-95b6-5b1aaae4cf30" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_d8cdfea8-dfd3-45dc-a687-e69d8b013a03" xlink:to="loc_srt_SegmentGeographicalDomain_9071080a-ee2d-43bb-95b6-5b1aaae4cf30" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_country_CA_130a3401-8778-47d9-93cb-b09aebdd259e" xlink:href="https://xbrl.sec.gov/country/2023/country-2023.xsd#country_CA"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_9071080a-ee2d-43bb-95b6-5b1aaae4cf30" xlink:to="loc_country_CA_130a3401-8778-47d9-93cb-b09aebdd259e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_6b28ccd4-96be-4b55-9124-fc4674904868" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_2d224e42-ec9e-4a29-9632-afd38cc2864d" xlink:to="loc_srt_RangeAxis_6b28ccd4-96be-4b55-9124-fc4674904868" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_6b28ccd4-96be-4b55-9124-fc4674904868_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_6b28ccd4-96be-4b55-9124-fc4674904868" xlink:to="loc_srt_RangeMember_6b28ccd4-96be-4b55-9124-fc4674904868_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_3c2de316-3f20-4047-890e-403b5b7070b2" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_6b28ccd4-96be-4b55-9124-fc4674904868" xlink:to="loc_srt_RangeMember_3c2de316-3f20-4047-890e-403b5b7070b2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_edbb4607-57be-40b2-9d0f-728c4783c14d" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_3c2de316-3f20-4047-890e-403b5b7070b2" xlink:to="loc_srt_MinimumMember_edbb4607-57be-40b2-9d0f-728c4783c14d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_f34b3bfd-a042-46c0-9fc7-99fcb541378d" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_3c2de316-3f20-4047-890e-403b5b7070b2" xlink:to="loc_srt_MaximumMember_f34b3bfd-a042-46c0-9fc7-99fcb541378d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_46b797e0-9ec4-4ee8-adf0-0e4fa348af06" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_2d224e42-ec9e-4a29-9632-afd38cc2864d" xlink:to="loc_us-gaap_AwardTypeAxis_46b797e0-9ec4-4ee8-adf0-0e4fa348af06" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_46b797e0-9ec4-4ee8-adf0-0e4fa348af06_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_46b797e0-9ec4-4ee8-adf0-0e4fa348af06" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_46b797e0-9ec4-4ee8-adf0-0e4fa348af06_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_51f33ebc-6dc9-49a0-9f41-73c07fac46ed" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_46b797e0-9ec4-4ee8-adf0-0e4fa348af06" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_51f33ebc-6dc9-49a0-9f41-73c07fac46ed" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PerformanceSharesMember_d6d89e3c-d932-44d2-938d-d371558f797d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PerformanceSharesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_51f33ebc-6dc9-49a0-9f41-73c07fac46ed" xlink:to="loc_us-gaap_PerformanceSharesMember_d6d89e3c-d932-44d2-938d-d371558f797d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupClassificationAxis_606f2321-6787-4aa0-b05d-1a2c35e27dec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupClassificationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_2d224e42-ec9e-4a29-9632-afd38cc2864d" xlink:to="loc_us-gaap_DisposalGroupClassificationAxis_606f2321-6787-4aa0-b05d-1a2c35e27dec" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupClassificationDomain_606f2321-6787-4aa0-b05d-1a2c35e27dec_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupClassificationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DisposalGroupClassificationAxis_606f2321-6787-4aa0-b05d-1a2c35e27dec" xlink:to="loc_us-gaap_DisposalGroupClassificationDomain_606f2321-6787-4aa0-b05d-1a2c35e27dec_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupClassificationDomain_e8e41289-156c-471f-b49f-9fa0c57a48e2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupClassificationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DisposalGroupClassificationAxis_606f2321-6787-4aa0-b05d-1a2c35e27dec" xlink:to="loc_us-gaap_DisposalGroupClassificationDomain_e8e41289-156c-471f-b49f-9fa0c57a48e2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupHeldforsaleNotDiscontinuedOperationsMember_7604964f-48ed-4e2c-9f2d-6e46fb4dabfc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupHeldforsaleNotDiscontinuedOperationsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisposalGroupClassificationDomain_e8e41289-156c-471f-b49f-9fa0c57a48e2" xlink:to="loc_us-gaap_DisposalGroupHeldforsaleNotDiscontinuedOperationsMember_7604964f-48ed-4e2c-9f2d-6e46fb4dabfc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_dfc4192a-b691-47ea-9afd-81b8f76eccef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_2d224e42-ec9e-4a29-9632-afd38cc2864d" xlink:to="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_dfc4192a-b691-47ea-9afd-81b8f76eccef" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_dfc4192a-b691-47ea-9afd-81b8f76eccef_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_dfc4192a-b691-47ea-9afd-81b8f76eccef" xlink:to="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_dfc4192a-b691-47ea-9afd-81b8f76eccef_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_74165042-448c-4d27-80e8-66046b1c5f88" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_dfc4192a-b691-47ea-9afd-81b8f76eccef" xlink:to="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_74165042-448c-4d27-80e8-66046b1c5f88" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_OakvilleOntarioFormerManufacturingFacilityMember_eef49a22-a457-4f3f-a7bb-7624131508f6" xlink:href="anip-20231231.xsd#anip_OakvilleOntarioFormerManufacturingFacilityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_74165042-448c-4d27-80e8-66046b1c5f88" xlink:to="loc_anip_OakvilleOntarioFormerManufacturingFacilityMember_eef49a22-a457-4f3f-a7bb-7624131508f6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeAxis_97d2f6e7-2bbf-49fb-af17-024f9d01af68" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_2d224e42-ec9e-4a29-9632-afd38cc2864d" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_97d2f6e7-2bbf-49fb-af17-024f9d01af68" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_97d2f6e7-2bbf-49fb-af17-024f9d01af68_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_97d2f6e7-2bbf-49fb-af17-024f9d01af68" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_97d2f6e7-2bbf-49fb-af17-024f9d01af68_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_573dc865-98ef-4f7f-b8e5-333f38882239" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_97d2f6e7-2bbf-49fb-af17-024f9d01af68" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_573dc865-98ef-4f7f-b8e5-333f38882239" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventMember_0e802eb9-a301-46d3-b813-d48cb2d19cd3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventTypeDomain_573dc865-98ef-4f7f-b8e5-333f38882239" xlink:to="loc_us-gaap_SubsequentEventMember_0e802eb9-a301-46d3-b813-d48cb2d19cd3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationConsideration_a9c2bd4e-ec01-43b8-ba72-dd2b98cda57e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupIncludingDiscontinuedOperationConsideration"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:to="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationConsideration_a9c2bd4e-ec01-43b8-ba72-dd2b98cda57e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NumberOfPharmaceuticalManufacturingFacilities_7581ae96-9645-4c42-b60e-b5444d1a27f9" xlink:href="anip-20231231.xsd#anip_NumberOfPharmaceuticalManufacturingFacilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:to="loc_anip_NumberOfPharmaceuticalManufacturingFacilities_7581ae96-9645-4c42-b60e-b5444d1a27f9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_FDICGuaranteedAmount_a3923e49-89f2-4a95-9ba0-577a138c1157" xlink:href="anip-20231231.xsd#anip_FDICGuaranteedAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:to="loc_anip_FDICGuaranteedAmount_a3923e49-89f2-4a95-9ba0-577a138c1157" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EscrowDeposit_2f9126e1-0f1d-418a-9abe-ab564378e6cc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EscrowDeposit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:to="loc_us-gaap_EscrowDeposit_2f9126e1-0f1d-418a-9abe-ab564378e6cc" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ImpairmentOfLongLivedAssetsHeldForUse_79e4e3c7-d535-44c7-91b9-1249a0ffe897" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ImpairmentOfLongLivedAssetsHeldForUse"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:to="loc_us-gaap_ImpairmentOfLongLivedAssetsHeldForUse_79e4e3c7-d535-44c7-91b9-1249a0ffe897" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsHeldForSaleNotPartOfDisposalGroupCurrent_16af8f3d-2b6c-4f59-9304-b412b6448e24" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsHeldForSaleNotPartOfDisposalGroupCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:to="loc_us-gaap_AssetsHeldForSaleNotPartOfDisposalGroupCurrent_16af8f3d-2b6c-4f59-9304-b412b6448e24" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AcquiredFiniteLivedIntangibleAssetsWeightedAverageUsefulLife_18d9851c-a39b-458c-bc76-93f20028d67d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AcquiredFiniteLivedIntangibleAssetsWeightedAverageUsefulLife"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:to="loc_us-gaap_AcquiredFiniteLivedIntangibleAssetsWeightedAverageUsefulLife_18d9851c-a39b-458c-bc76-93f20028d67d" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_dced7c7e-eb31-4ef0-ab23-b3f5b8a5e428" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ImpairmentOfIntangibleAssetsFinitelived"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_dced7c7e-eb31-4ef0-ab23-b3f5b8a5e428" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NumberOfOperatingSegments_cd5703f7-b41c-4f19-bfe3-035796ec9479" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NumberOfOperatingSegments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:to="loc_us-gaap_NumberOfOperatingSegments_cd5703f7-b41c-4f19-bfe3-035796ec9479" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NumberOfReportableSegments_c70441aa-4997-42b1-a79f-286e12590602" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NumberOfReportableSegments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:to="loc_us-gaap_NumberOfReportableSegments_c70441aa-4997-42b1-a79f-286e12590602" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillImpairmentLoss_5c756cfa-de47-4adc-9e44-39905e2de745" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GoodwillImpairmentLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:to="loc_us-gaap_GoodwillImpairmentLoss_5c756cfa-de47-4adc-9e44-39905e2de745" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_82218df4-564e-482d-8270-22881d183741" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_980e8ae1-c0cd-41c9-968f-e7c693adc5a8" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_82218df4-564e-482d-8270-22881d183741" xlink:type="arc" order="11"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/DESCRIPTIONOFBUSINESSANDSUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESPPEandIntangiblesDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#DESCRIPTIONOFBUSINESSANDSUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESPPEandIntangiblesDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/DESCRIPTIONOFBUSINESSANDSUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESPPEandIntangiblesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentLineItems_72709fdd-62eb-4cc0-84a3-0d0121edfce1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_7d0ddad3-f9a2-4fcd-b492-4cfdb5657698" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfPropertyPlantAndEquipmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_72709fdd-62eb-4cc0-84a3-0d0121edfce1" xlink:to="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_7d0ddad3-f9a2-4fcd-b492-4cfdb5657698" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_ae88e88a-9442-4662-9631-b02dbd4d7b2f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_7d0ddad3-f9a2-4fcd-b492-4cfdb5657698" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_ae88e88a-9442-4662-9631-b02dbd4d7b2f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_ae88e88a-9442-4662-9631-b02dbd4d7b2f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_ae88e88a-9442-4662-9631-b02dbd4d7b2f" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_ae88e88a-9442-4662-9631-b02dbd4d7b2f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_7446b0a5-bc19-4512-ba42-ee3e6acb11aa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_ae88e88a-9442-4662-9631-b02dbd4d7b2f" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_7446b0a5-bc19-4512-ba42-ee3e6acb11aa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BuildingAndBuildingImprovementsMember_5ebc9110-6496-4fca-ad5b-5d4dd5e96ee9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BuildingAndBuildingImprovementsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_7446b0a5-bc19-4512-ba42-ee3e6acb11aa" xlink:to="loc_us-gaap_BuildingAndBuildingImprovementsMember_5ebc9110-6496-4fca-ad5b-5d4dd5e96ee9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MachineryAndEquipmentMember_626411a8-2801-41e8-9511-52ba5c0faf05" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MachineryAndEquipmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_7446b0a5-bc19-4512-ba42-ee3e6acb11aa" xlink:to="loc_us-gaap_MachineryAndEquipmentMember_626411a8-2801-41e8-9511-52ba5c0faf05" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_6fdc75d1-4c0b-4c23-8920-3070911994ee" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_7d0ddad3-f9a2-4fcd-b492-4cfdb5657698" xlink:to="loc_srt_RangeAxis_6fdc75d1-4c0b-4c23-8920-3070911994ee" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_6fdc75d1-4c0b-4c23-8920-3070911994ee_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_6fdc75d1-4c0b-4c23-8920-3070911994ee" xlink:to="loc_srt_RangeMember_6fdc75d1-4c0b-4c23-8920-3070911994ee_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_abbe35d1-3a88-4491-b585-a1fd7dbb9968" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_6fdc75d1-4c0b-4c23-8920-3070911994ee" xlink:to="loc_srt_RangeMember_abbe35d1-3a88-4491-b585-a1fd7dbb9968" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_892d404f-b204-44c6-8eee-b18d72adbce0" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_abbe35d1-3a88-4491-b585-a1fd7dbb9968" xlink:to="loc_srt_MinimumMember_892d404f-b204-44c6-8eee-b18d72adbce0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_d6f8bf1d-a4bd-410b-b3e1-08307882cf81" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_abbe35d1-3a88-4491-b585-a1fd7dbb9968" xlink:to="loc_srt_MaximumMember_d6f8bf1d-a4bd-410b-b3e1-08307882cf81" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentUsefulLife_165398e0-0c77-4679-b148-5edd4419307c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentUsefulLife"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_72709fdd-62eb-4cc0-84a3-0d0121edfce1" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentUsefulLife_165398e0-0c77-4679-b148-5edd4419307c" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/REVENUERECOGNITIONANDRELATEDALLOWANCESDisaggregationDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#REVENUERECOGNITIONANDRELATEDALLOWANCESDisaggregationDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/REVENUERECOGNITIONANDRELATEDALLOWANCESDisaggregationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueLineItems_bb85542e-1670-47db-825f-b3aae861d736" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_e84522c6-f1d1-44ea-aa24-22e0a9b52199" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_bb85542e-1670-47db-825f-b3aae861d736" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_e84522c6-f1d1-44ea-aa24-22e0a9b52199" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductOrServiceAxis_50191bf7-dc9a-4c8b-bef3-daa07309f009" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductOrServiceAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_e84522c6-f1d1-44ea-aa24-22e0a9b52199" xlink:to="loc_srt_ProductOrServiceAxis_50191bf7-dc9a-4c8b-bef3-daa07309f009" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_50191bf7-dc9a-4c8b-bef3-daa07309f009_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ProductOrServiceAxis_50191bf7-dc9a-4c8b-bef3-daa07309f009" xlink:to="loc_srt_ProductsAndServicesDomain_50191bf7-dc9a-4c8b-bef3-daa07309f009_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_62073fa2-05ae-4db0-8b55-1913cc2444b6" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ProductOrServiceAxis_50191bf7-dc9a-4c8b-bef3-daa07309f009" xlink:to="loc_srt_ProductsAndServicesDomain_62073fa2-05ae-4db0-8b55-1913cc2444b6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_SalesOfGenericPharmaceuticalProductsMember_64950bb1-cd55-43d4-baad-25f7b7bfcee7" xlink:href="anip-20231231.xsd#anip_SalesOfGenericPharmaceuticalProductsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_62073fa2-05ae-4db0-8b55-1913cc2444b6" xlink:to="loc_anip_SalesOfGenericPharmaceuticalProductsMember_64950bb1-cd55-43d4-baad-25f7b7bfcee7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_SalesOfBrandedPharmaceuticalProductsMember_57399684-6175-4975-af8e-8d025268ba9f" xlink:href="anip-20231231.xsd#anip_SalesOfBrandedPharmaceuticalProductsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_62073fa2-05ae-4db0-8b55-1913cc2444b6" xlink:to="loc_anip_SalesOfBrandedPharmaceuticalProductsMember_57399684-6175-4975-af8e-8d025268ba9f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_SalesOfRareDiseasePharmaceuticalProductsMember_85ba06f4-7b94-4136-9ffe-dff11a677c95" xlink:href="anip-20231231.xsd#anip_SalesOfRareDiseasePharmaceuticalProductsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_62073fa2-05ae-4db0-8b55-1913cc2444b6" xlink:to="loc_anip_SalesOfRareDiseasePharmaceuticalProductsMember_85ba06f4-7b94-4136-9ffe-dff11a677c95" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_78afa478-8aa8-40a8-a1e2-1242ed92675c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_bb85542e-1670-47db-825f-b3aae861d736" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_78afa478-8aa8-40a8-a1e2-1242ed92675c" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/REVENUERECOGNITIONANDRELATEDALLOWANCESTimingDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#REVENUERECOGNITIONANDRELATEDALLOWANCESTimingDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/REVENUERECOGNITIONANDRELATEDALLOWANCESTimingDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueLineItems_afcc26cc-d1f7-4ff4-a382-51c8d9f80006" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_236dcd87-9c94-4c0d-8297-e49c33850d50" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_afcc26cc-d1f7-4ff4-a382-51c8d9f80006" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_236dcd87-9c94-4c0d-8297-e49c33850d50" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_35b8123a-ddb7-4c78-98c8-ba930a5a7c56" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TimingOfTransferOfGoodOrServiceAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_236dcd87-9c94-4c0d-8297-e49c33850d50" xlink:to="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_35b8123a-ddb7-4c78-98c8-ba930a5a7c56" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_35b8123a-ddb7-4c78-98c8-ba930a5a7c56_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TimingOfTransferOfGoodOrServiceDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_35b8123a-ddb7-4c78-98c8-ba930a5a7c56" xlink:to="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_35b8123a-ddb7-4c78-98c8-ba930a5a7c56_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_ca0c44f2-0f63-4074-9b53-d8c626eab924" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TimingOfTransferOfGoodOrServiceDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_35b8123a-ddb7-4c78-98c8-ba930a5a7c56" xlink:to="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_ca0c44f2-0f63-4074-9b53-d8c626eab924" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransferredAtPointInTimeMember_fee51494-ff73-4aa0-84e6-19c0b97decc1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransferredAtPointInTimeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_ca0c44f2-0f63-4074-9b53-d8c626eab924" xlink:to="loc_us-gaap_TransferredAtPointInTimeMember_fee51494-ff73-4aa0-84e6-19c0b97decc1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransferredOverTimeMember_a25727ef-4c9c-48bd-936a-7cca12ca24b6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransferredOverTimeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_ca0c44f2-0f63-4074-9b53-d8c626eab924" xlink:to="loc_us-gaap_TransferredOverTimeMember_a25727ef-4c9c-48bd-936a-7cca12ca24b6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductOrServiceAxis_515a8116-774e-4067-b7e0-1253a1bebbff" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductOrServiceAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_236dcd87-9c94-4c0d-8297-e49c33850d50" xlink:to="loc_srt_ProductOrServiceAxis_515a8116-774e-4067-b7e0-1253a1bebbff" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_515a8116-774e-4067-b7e0-1253a1bebbff_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ProductOrServiceAxis_515a8116-774e-4067-b7e0-1253a1bebbff" xlink:to="loc_srt_ProductsAndServicesDomain_515a8116-774e-4067-b7e0-1253a1bebbff_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_41737d15-ba85-4893-be91-6963179392d2" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ProductOrServiceAxis_515a8116-774e-4067-b7e0-1253a1bebbff" xlink:to="loc_srt_ProductsAndServicesDomain_41737d15-ba85-4893-be91-6963179392d2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_SalesOfContractManufacturedProductsMember_57948cac-bb79-426c-b83f-0965370133db" xlink:href="anip-20231231.xsd#anip_SalesOfContractManufacturedProductsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_41737d15-ba85-4893-be91-6963179392d2" xlink:to="loc_anip_SalesOfContractManufacturedProductsMember_57948cac-bb79-426c-b83f-0965370133db" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_688837c2-a287-439c-a915-fe529021fda6" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_236dcd87-9c94-4c0d-8297-e49c33850d50" xlink:to="loc_srt_RangeAxis_688837c2-a287-439c-a915-fe529021fda6" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_688837c2-a287-439c-a915-fe529021fda6_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_688837c2-a287-439c-a915-fe529021fda6" xlink:to="loc_srt_RangeMember_688837c2-a287-439c-a915-fe529021fda6_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_fe3b8b57-d4b8-4def-8ded-13aa3cf06a82" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_688837c2-a287-439c-a915-fe529021fda6" xlink:to="loc_srt_RangeMember_fe3b8b57-d4b8-4def-8ded-13aa3cf06a82" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_37bc3bf8-59aa-4cd8-9486-4cd2869b3dda" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_fe3b8b57-d4b8-4def-8ded-13aa3cf06a82" xlink:to="loc_srt_MinimumMember_37bc3bf8-59aa-4cd8-9486-4cd2869b3dda" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_12627ece-5d0d-4c91-84ad-a3a6918b797b" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_fe3b8b57-d4b8-4def-8ded-13aa3cf06a82" xlink:to="loc_srt_MaximumMember_12627ece-5d0d-4c91-84ad-a3a6918b797b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_65d6890a-0de6-4471-93c6-0d124ac6c36a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_afcc26cc-d1f7-4ff4-a382-51c8d9f80006" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_65d6890a-0de6-4471-93c6-0d124ac6c36a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerPerformanceObligationSatisfiedInPreviousPeriod_babca258-1a90-4161-b1a4-d3bd4fff8847" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ContractWithCustomerPerformanceObligationSatisfiedInPreviousPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_afcc26cc-d1f7-4ff4-a382-51c8d9f80006" xlink:to="loc_us-gaap_ContractWithCustomerPerformanceObligationSatisfiedInPreviousPeriod_babca258-1a90-4161-b1a4-d3bd4fff8847" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityRevenueRecognized_ea81bdca-8ab4-4cdf-9920-16427f83fa0c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ContractWithCustomerLiabilityRevenueRecognized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_afcc26cc-d1f7-4ff4-a382-51c8d9f80006" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityRevenueRecognized_ea81bdca-8ab4-4cdf-9920-16427f83fa0c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueRemainingPerformanceObligation_3c8cbd3d-b10f-4139-b835-0f92bec18e74" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenueRemainingPerformanceObligation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_afcc26cc-d1f7-4ff4-a382-51c8d9f80006" xlink:to="loc_us-gaap_RevenueRemainingPerformanceObligation_3c8cbd3d-b10f-4139-b835-0f92bec18e74" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueRemainingPerformanceObligationOptionalExemptionRemainingDuration_816dc9bb-0061-45ab-9cf8-0819e62d23f0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenueRemainingPerformanceObligationOptionalExemptionRemainingDuration"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_afcc26cc-d1f7-4ff4-a382-51c8d9f80006" xlink:to="loc_us-gaap_RevenueRemainingPerformanceObligationOptionalExemptionRemainingDuration_816dc9bb-0061-45ab-9cf8-0819e62d23f0" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ProductReturnPeriod_3e2533f1-3be5-4a5b-8b0c-227859ec3e92" xlink:href="anip-20231231.xsd#anip_ProductReturnPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_afcc26cc-d1f7-4ff4-a382-51c8d9f80006" xlink:to="loc_anip_ProductReturnPeriod_3e2533f1-3be5-4a5b-8b0c-227859ec3e92" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/REVENUERECOGNITIONANDRELATEDALLOWANCESAllowancesDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#REVENUERECOGNITIONANDRELATEDALLOWANCESAllowancesDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/REVENUERECOGNITIONANDRELATEDALLOWANCESAllowancesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_srt_ValuationAndQualifyingAccountsDisclosureLineItems_5452ca85-a721-4bf7-938b-0b10686eee3e" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ValuationAndQualifyingAccountsDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ValuationAndQualifyingAccountsDisclosureTable_c05b9378-088d-4184-8627-b4694ec42794" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ValuationAndQualifyingAccountsDisclosureTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_srt_ValuationAndQualifyingAccountsDisclosureLineItems_5452ca85-a721-4bf7-938b-0b10686eee3e" xlink:to="loc_srt_ValuationAndQualifyingAccountsDisclosureTable_c05b9378-088d-4184-8627-b4694ec42794" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_8f5b2931-80eb-4f5f-9ceb-2bf9d82fd53a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationAllowancesAndReservesTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_srt_ValuationAndQualifyingAccountsDisclosureTable_c05b9378-088d-4184-8627-b4694ec42794" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_8f5b2931-80eb-4f5f-9ceb-2bf9d82fd53a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesDomain_8f5b2931-80eb-4f5f-9ceb-2bf9d82fd53a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationAllowancesAndReservesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_8f5b2931-80eb-4f5f-9ceb-2bf9d82fd53a" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesDomain_8f5b2931-80eb-4f5f-9ceb-2bf9d82fd53a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesDomain_a72ce2f8-5c68-4209-979b-34054f8b7c79" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationAllowancesAndReservesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_8f5b2931-80eb-4f5f-9ceb-2bf9d82fd53a" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesDomain_a72ce2f8-5c68-4209-979b-34054f8b7c79" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ChargebacksMember_b6b58bf7-a607-4969-8486-862702133aa6" xlink:href="anip-20231231.xsd#anip_ChargebacksMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesDomain_a72ce2f8-5c68-4209-979b-34054f8b7c79" xlink:to="loc_anip_ChargebacksMember_b6b58bf7-a607-4969-8486-862702133aa6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_GovernmentRebatesMember_f343b85f-a432-4b36-a983-c23ee1a7a0d4" xlink:href="anip-20231231.xsd#anip_GovernmentRebatesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesDomain_a72ce2f8-5c68-4209-979b-34054f8b7c79" xlink:to="loc_anip_GovernmentRebatesMember_f343b85f-a432-4b36-a983-c23ee1a7a0d4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AllowancesForSalesReturnsMember_e541c46f-8421-445d-9c1c-41437c5edf60" xlink:href="anip-20231231.xsd#anip_AllowancesForSalesReturnsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesDomain_a72ce2f8-5c68-4209-979b-34054f8b7c79" xlink:to="loc_anip_AllowancesForSalesReturnsMember_e541c46f-8421-445d-9c1c-41437c5edf60" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AdministrativeFeesAndOtherRebatesMember_ad9a58e7-31fd-4b9c-b226-60b3924c5592" xlink:href="anip-20231231.xsd#anip_AdministrativeFeesAndOtherRebatesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesDomain_a72ce2f8-5c68-4209-979b-34054f8b7c79" xlink:to="loc_anip_AdministrativeFeesAndOtherRebatesMember_ad9a58e7-31fd-4b9c-b226-60b3924c5592" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ReservesForCashDiscountMember_be041355-f7d9-401a-828a-90631e59cefa" xlink:href="anip-20231231.xsd#anip_ReservesForCashDiscountMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesDomain_a72ce2f8-5c68-4209-979b-34054f8b7c79" xlink:to="loc_anip_ReservesForCashDiscountMember_be041355-f7d9-401a-828a-90631e59cefa" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_14d267b1-45fb-4984-b0f4-6ff8d7d894b7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MovementInValuationAllowancesAndReservesRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ValuationAndQualifyingAccountsDisclosureLineItems_5452ca85-a721-4bf7-938b-0b10686eee3e" xlink:to="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_14d267b1-45fb-4984-b0f4-6ff8d7d894b7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesBalance_7ab77625-ea2e-4204-8be2-84383d782fe7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationAllowancesAndReservesBalance"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_14d267b1-45fb-4984-b0f4-6ff8d7d894b7" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesBalance_7ab77625-ea2e-4204-8be2-84383d782fe7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesAdjustments_6b711662-80df-4ab3-9b97-061553607a50" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationAllowancesAndReservesAdjustments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_14d267b1-45fb-4984-b0f4-6ff8d7d894b7" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesAdjustments_6b711662-80df-4ab3-9b97-061553607a50" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesDeductions_769bcf8b-1871-4829-9f40-a0df69f99d18" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationAllowancesAndReservesDeductions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_14d267b1-45fb-4984-b0f4-6ff8d7d894b7" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesDeductions_769bcf8b-1871-4829-9f40-a0df69f99d18" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesBalance_1bb11b17-f128-4a16-b7fc-68f631856fa2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationAllowancesAndReservesBalance"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/REVENUERECOGNITIONANDRELATEDALLOWANCESConcentrationDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#REVENUERECOGNITIONANDRELATEDALLOWANCESConcentrationDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/REVENUERECOGNITIONANDRELATEDALLOWANCESConcentrationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskLineItems_c4f1e4f5-ae62-4007-a7aa-6a7af74456d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskTable_a6818e92-e6c4-4d58-b99a-84605ef215a5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ConcentrationRiskLineItems_c4f1e4f5-ae62-4007-a7aa-6a7af74456d8" xlink:to="loc_us-gaap_ConcentrationRiskTable_a6818e92-e6c4-4d58-b99a-84605ef215a5" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskByTypeAxis_1fe9a950-8cb2-44b4-9f85-416f2d4d87ae" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskByTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ConcentrationRiskTable_a6818e92-e6c4-4d58-b99a-84605ef215a5" xlink:to="loc_us-gaap_ConcentrationRiskByTypeAxis_1fe9a950-8cb2-44b4-9f85-416f2d4d87ae" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_1fe9a950-8cb2-44b4-9f85-416f2d4d87ae_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_1fe9a950-8cb2-44b4-9f85-416f2d4d87ae" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_1fe9a950-8cb2-44b4-9f85-416f2d4d87ae_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_258ed4e7-f886-4d06-8bfa-4f1de6bbbb69" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_1fe9a950-8cb2-44b4-9f85-416f2d4d87ae" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_258ed4e7-f886-4d06-8bfa-4f1de6bbbb69" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CustomerConcentrationRiskMember_08eb71d9-972b-451e-9dbb-693639c9ab47" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CustomerConcentrationRiskMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskTypeDomain_258ed4e7-f886-4d06-8bfa-4f1de6bbbb69" xlink:to="loc_us-gaap_CustomerConcentrationRiskMember_08eb71d9-972b-451e-9dbb-693639c9ab47" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_fbda167c-a9eb-4ba7-b28d-2ea65462434a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ConcentrationRiskTable_a6818e92-e6c4-4d58-b99a-84605ef215a5" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_fbda167c-a9eb-4ba7-b28d-2ea65462434a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_fbda167c-a9eb-4ba7-b28d-2ea65462434a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskBenchmarkDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_fbda167c-a9eb-4ba7-b28d-2ea65462434a" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_fbda167c-a9eb-4ba7-b28d-2ea65462434a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_0ddb76aa-15c4-430e-83ec-b36d47c0ed10" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskBenchmarkDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_fbda167c-a9eb-4ba7-b28d-2ea65462434a" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_0ddb76aa-15c4-430e-83ec-b36d47c0ed10" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableMember_b5a9df6e-3ebd-4cd7-967e-4dbe416f8497" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsReceivableMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_0ddb76aa-15c4-430e-83ec-b36d47c0ed10" xlink:to="loc_us-gaap_AccountsReceivableMember_b5a9df6e-3ebd-4cd7-967e-4dbe416f8497" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerMember_e185f189-85f1-4ab4-ab89-66e455a2988b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenueFromContractWithCustomerMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_0ddb76aa-15c4-430e-83ec-b36d47c0ed10" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerMember_e185f189-85f1-4ab4-ab89-66e455a2988b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MajorCustomersAxis_1d3a45af-1743-43fa-ad5e-1149ca15b023" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MajorCustomersAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ConcentrationRiskTable_a6818e92-e6c4-4d58-b99a-84605ef215a5" xlink:to="loc_srt_MajorCustomersAxis_1d3a45af-1743-43fa-ad5e-1149ca15b023" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_NameOfMajorCustomerDomain_1d3a45af-1743-43fa-ad5e-1149ca15b023_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_NameOfMajorCustomerDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_MajorCustomersAxis_1d3a45af-1743-43fa-ad5e-1149ca15b023" xlink:to="loc_srt_NameOfMajorCustomerDomain_1d3a45af-1743-43fa-ad5e-1149ca15b023_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_NameOfMajorCustomerDomain_4e017aa5-f7b3-479a-8c83-feb10ef0420e" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_NameOfMajorCustomerDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_MajorCustomersAxis_1d3a45af-1743-43fa-ad5e-1149ca15b023" xlink:to="loc_srt_NameOfMajorCustomerDomain_4e017aa5-f7b3-479a-8c83-feb10ef0420e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_FourCustomersMember_e8c25d69-9d6e-4ea8-9041-a6ef8b3fbfa8" xlink:href="anip-20231231.xsd#anip_FourCustomersMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_4e017aa5-f7b3-479a-8c83-feb10ef0420e" xlink:to="loc_anip_FourCustomersMember_e8c25d69-9d6e-4ea8-9041-a6ef8b3fbfa8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CustomerOneMember_3c91b782-e0a2-4e4d-906e-a6f371cb4a66" xlink:href="anip-20231231.xsd#anip_CustomerOneMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_FourCustomersMember_e8c25d69-9d6e-4ea8-9041-a6ef8b3fbfa8" xlink:to="loc_anip_CustomerOneMember_3c91b782-e0a2-4e4d-906e-a6f371cb4a66" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CustomerTwoMember_e6c95076-ced6-4ae7-a452-25ffdc646044" xlink:href="anip-20231231.xsd#anip_CustomerTwoMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_FourCustomersMember_e8c25d69-9d6e-4ea8-9041-a6ef8b3fbfa8" xlink:to="loc_anip_CustomerTwoMember_e6c95076-ced6-4ae7-a452-25ffdc646044" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CustomerThreeMember_25b91997-c70a-42c4-ab0e-b9604692e766" xlink:href="anip-20231231.xsd#anip_CustomerThreeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_FourCustomersMember_e8c25d69-9d6e-4ea8-9041-a6ef8b3fbfa8" xlink:to="loc_anip_CustomerThreeMember_25b91997-c70a-42c4-ab0e-b9604692e766" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CustomerFourMember_3788118c-343e-4b02-9e0b-61c19a24cb99" xlink:href="anip-20231231.xsd#anip_CustomerFourMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_FourCustomersMember_e8c25d69-9d6e-4ea8-9041-a6ef8b3fbfa8" xlink:to="loc_anip_CustomerFourMember_3788118c-343e-4b02-9e0b-61c19a24cb99" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskPercentage1_608ba863-e10b-44b1-8641-cf6d60625dea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskPercentage1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskLineItems_c4f1e4f5-ae62-4007-a7aa-6a7af74456d8" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_608ba863-e10b-44b1-8641-cf6d60625dea" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/BUSINESSCOMBINATIONNarrativeDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#BUSINESSCOMBINATIONNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/BUSINESSCOMBINATIONNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_8805961d-40c1-4ce6-ad67-0573291f7c33" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_8805961d-40c1-4ce6-ad67-0573291f7c33" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_8da754b2-c683-4b09-8960-f8c386c90eac" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_8805961d-40c1-4ce6-ad67-0573291f7c33" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_8da754b2-c683-4b09-8960-f8c386c90eac" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_8da754b2-c683-4b09-8960-f8c386c90eac_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_8da754b2-c683-4b09-8960-f8c386c90eac" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_8da754b2-c683-4b09-8960-f8c386c90eac_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_161a3aed-ca3a-41cf-8932-3cc5834ca2fa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_8da754b2-c683-4b09-8960-f8c386c90eac" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_161a3aed-ca3a-41cf-8932-3cc5834ca2fa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NovitiumMember_5099f2b7-bb2f-47e1-bf3e-f7138b1c3f1c" xlink:href="anip-20231231.xsd#anip_NovitiumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_161a3aed-ca3a-41cf-8932-3cc5834ca2fa" xlink:to="loc_anip_NovitiumMember_5099f2b7-bb2f-47e1-bf3e-f7138b1c3f1c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_bbcc122b-b39a-4e73-a2d4-b7f9a7430f9d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_8805961d-40c1-4ce6-ad67-0573291f7c33" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_bbcc122b-b39a-4e73-a2d4-b7f9a7430f9d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_bbcc122b-b39a-4e73-a2d4-b7f9a7430f9d_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_bbcc122b-b39a-4e73-a2d4-b7f9a7430f9d" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_bbcc122b-b39a-4e73-a2d4-b7f9a7430f9d_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_02e26c51-9701-49a9-b069-a1f323b31ab6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_bbcc122b-b39a-4e73-a2d4-b7f9a7430f9d" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_02e26c51-9701-49a9-b069-a1f323b31ab6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InProcessResearchAndDevelopmentMember_ac63c999-9f82-4403-bc03-2a158e49fdca" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InProcessResearchAndDevelopmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_02e26c51-9701-49a9-b069-a1f323b31ab6" xlink:to="loc_us-gaap_InProcessResearchAndDevelopmentMember_ac63c999-9f82-4403-bc03-2a158e49fdca" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_43bba64d-26e0-470d-84f6-882a01cdb9c6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_8805961d-40c1-4ce6-ad67-0573291f7c33" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_43bba64d-26e0-470d-84f6-882a01cdb9c6" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_43bba64d-26e0-470d-84f6-882a01cdb9c6_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_43bba64d-26e0-470d-84f6-882a01cdb9c6" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_43bba64d-26e0-470d-84f6-882a01cdb9c6_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_c2b90d0f-bd29-446d-bb7d-2a4aaef03850" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_43bba64d-26e0-470d-84f6-882a01cdb9c6" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_c2b90d0f-bd29-446d-bb7d-2a4aaef03850" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AcquiredAndaIntangibleAssetsMember_7ec8cdd1-c3a1-4966-b173-067ae5424591" xlink:href="anip-20231231.xsd#anip_AcquiredAndaIntangibleAssetsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_c2b90d0f-bd29-446d-bb7d-2a4aaef03850" xlink:to="loc_anip_AcquiredAndaIntangibleAssetsMember_7ec8cdd1-c3a1-4966-b173-067ae5424591" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CustomerRelationshipsMember_99f87572-0bb6-4157-9103-a55e058b7678" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CustomerRelationshipsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_c2b90d0f-bd29-446d-bb7d-2a4aaef03850" xlink:to="loc_us-gaap_CustomerRelationshipsMember_99f87572-0bb6-4157-9103-a55e058b7678" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_05b17ec1-709d-4ba5-a19b-62a47999df36" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_8805961d-40c1-4ce6-ad67-0573291f7c33" xlink:to="loc_srt_RangeAxis_05b17ec1-709d-4ba5-a19b-62a47999df36" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_05b17ec1-709d-4ba5-a19b-62a47999df36_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_05b17ec1-709d-4ba5-a19b-62a47999df36" xlink:to="loc_srt_RangeMember_05b17ec1-709d-4ba5-a19b-62a47999df36_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_f56ec405-d2d0-4a32-a81e-0c6eb24ef741" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_05b17ec1-709d-4ba5-a19b-62a47999df36" xlink:to="loc_srt_RangeMember_f56ec405-d2d0-4a32-a81e-0c6eb24ef741" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_dbe74118-15d0-4201-a897-9fab1ebe7ec4" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_f56ec405-d2d0-4a32-a81e-0c6eb24ef741" xlink:to="loc_srt_MinimumMember_dbe74118-15d0-4201-a897-9fab1ebe7ec4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_761c39cf-a099-453d-9dae-62841cade46f" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_f56ec405-d2d0-4a32-a81e-0c6eb24ef741" xlink:to="loc_srt_MaximumMember_761c39cf-a099-453d-9dae-62841cade46f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeAxis_c9a1369b-e317-4647-9453-5d18bb699c74" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_8805961d-40c1-4ce6-ad67-0573291f7c33" xlink:to="loc_us-gaap_MeasurementInputTypeAxis_c9a1369b-e317-4647-9453-5d18bb699c74" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeDomain_c9a1369b-e317-4647-9453-5d18bb699c74_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MeasurementInputTypeAxis_c9a1369b-e317-4647-9453-5d18bb699c74" xlink:to="loc_us-gaap_MeasurementInputTypeDomain_c9a1369b-e317-4647-9453-5d18bb699c74_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeDomain_511a05e8-49c2-4885-881e-2582a44ccff7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MeasurementInputTypeAxis_c9a1369b-e317-4647-9453-5d18bb699c74" xlink:to="loc_us-gaap_MeasurementInputTypeDomain_511a05e8-49c2-4885-881e-2582a44ccff7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputPriceVolatilityMember_cd8b6397-43e8-412d-8c36-cb5dd4213bf4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputPriceVolatilityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MeasurementInputTypeDomain_511a05e8-49c2-4885-881e-2582a44ccff7" xlink:to="loc_us-gaap_MeasurementInputPriceVolatilityMember_cd8b6397-43e8-412d-8c36-cb5dd4213bf4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputDiscountForLackOfMarketabilityMember_181f1c31-719d-4064-b061-b5f445cb3121" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputDiscountForLackOfMarketabilityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MeasurementInputTypeDomain_511a05e8-49c2-4885-881e-2582a44ccff7" xlink:to="loc_us-gaap_MeasurementInputDiscountForLackOfMarketabilityMember_181f1c31-719d-4064-b061-b5f445cb3121" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_220f9e9a-c2f5-4f52-af58-c07259c2e880" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_8805961d-40c1-4ce6-ad67-0573291f7c33" xlink:to="loc_us-gaap_StatementClassOfStockAxis_220f9e9a-c2f5-4f52-af58-c07259c2e880" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_220f9e9a-c2f5-4f52-af58-c07259c2e880_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_220f9e9a-c2f5-4f52-af58-c07259c2e880" xlink:to="loc_us-gaap_ClassOfStockDomain_220f9e9a-c2f5-4f52-af58-c07259c2e880_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_d40a2a11-2315-4937-9644-fb3dea0c0f00" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_220f9e9a-c2f5-4f52-af58-c07259c2e880" xlink:to="loc_us-gaap_ClassOfStockDomain_d40a2a11-2315-4937-9644-fb3dea0c0f00" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConvertiblePreferredStockMember_e5169f62-72e1-4126-9f77-acaa34d2f75a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConvertiblePreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_d40a2a11-2315-4937-9644-fb3dea0c0f00" xlink:to="loc_us-gaap_ConvertiblePreferredStockMember_e5169f62-72e1-4126-9f77-acaa34d2f75a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsidiarySaleOfStockAxis_25909c6b-9307-4822-9840-7e0cdac596f5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsidiarySaleOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_8805961d-40c1-4ce6-ad67-0573291f7c33" xlink:to="loc_us-gaap_SubsidiarySaleOfStockAxis_25909c6b-9307-4822-9840-7e0cdac596f5" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SaleOfStockNameOfTransactionDomain_25909c6b-9307-4822-9840-7e0cdac596f5_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SaleOfStockNameOfTransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsidiarySaleOfStockAxis_25909c6b-9307-4822-9840-7e0cdac596f5" xlink:to="loc_us-gaap_SaleOfStockNameOfTransactionDomain_25909c6b-9307-4822-9840-7e0cdac596f5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SaleOfStockNameOfTransactionDomain_99ecd5a9-131d-4bf1-a91a-7d4b4d62d420" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SaleOfStockNameOfTransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsidiarySaleOfStockAxis_25909c6b-9307-4822-9840-7e0cdac596f5" xlink:to="loc_us-gaap_SaleOfStockNameOfTransactionDomain_99ecd5a9-131d-4bf1-a91a-7d4b4d62d420" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_PrivateInvestmentInPublicEquityMember_9b70a89a-657b-4529-b51d-12edee14ab07" xlink:href="anip-20231231.xsd#anip_PrivateInvestmentInPublicEquityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SaleOfStockNameOfTransactionDomain_99ecd5a9-131d-4bf1-a91a-7d4b4d62d420" xlink:to="loc_anip_PrivateInvestmentInPublicEquityMember_9b70a89a-657b-4529-b51d-12edee14ab07" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireBusinessesGross_a48f3125-aa0c-4129-a511-e902bcc632a9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireBusinessesGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesGross_a48f3125-aa0c-4129-a511-e902bcc632a9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionEquityInterestsIssuedOrIssuableNumberOfSharesIssued_06b6856e-10b9-4a57-947e-34220118c92a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionEquityInterestsIssuedOrIssuableNumberOfSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_BusinessAcquisitionEquityInterestsIssuedOrIssuableNumberOfSharesIssued_06b6856e-10b9-4a57-947e-34220118c92a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferredEquityInterestsIssuedAndIssuable_90f327bc-f78e-42be-a955-69adc00d1e64" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationConsiderationTransferredEquityInterestsIssuedAndIssuable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferredEquityInterestsIssuedAndIssuable_90f327bc-f78e-42be-a955-69adc00d1e64" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueHigh_4c506779-b9e8-44e8-9240-45dc4653a5f4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueHigh"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueHigh_4c506779-b9e8-44e8-9240-45dc4653a5f4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferredLiabilitiesIncurred_4205b3da-aaef-44c1-b27c-d5f81bfb2829" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationConsiderationTransferredLiabilitiesIncurred"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferredLiabilitiesIncurred_4205b3da-aaef-44c1-b27c-d5f81bfb2829" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_RestrictionPeriodForSharesIssuedInBusinessCombination_ebca76b1-31aa-4a92-a7e1-b7fbce07a32d" xlink:href="anip-20231231.xsd#anip_RestrictionPeriodForSharesIssuedInBusinessCombination"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_anip_RestrictionPeriodForSharesIssuedInBusinessCombination_ebca76b1-31aa-4a92-a7e1-b7fbce07a32d" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationLiability_3de54d0c-745a-412f-839f-78630c7104b6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationContingentConsiderationLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationLiability_3de54d0c-745a-412f-839f-78630c7104b6" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAcquiredFromAcquisition_dfc4cc5f-54b8-47b2-94f2-c1b2d3dfb21b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashAcquiredFromAcquisition"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_CashAcquiredFromAcquisition_dfc4cc5f-54b8-47b2-94f2-c1b2d3dfb21b" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferred1_3c73b207-7081-40e0-bd3c-321bfff167cb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationConsiderationTransferred1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferred1_3c73b207-7081-40e0-bd3c-321bfff167cb" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_TemporaryEquityStockIssuedDuringPeriodSharesNewIssues_bd676c8d-75ce-4f58-aa79-87857d6286d0" xlink:href="anip-20231231.xsd#anip_TemporaryEquityStockIssuedDuringPeriodSharesNewIssues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_anip_TemporaryEquityStockIssuedDuringPeriodSharesNewIssues_bd676c8d-75ce-4f58-aa79-87857d6286d0" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquityRedemptionPricePerShare_ac590fee-7849-489c-949e-a2bf0ede791e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquityRedemptionPricePerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_TemporaryEquityRedemptionPricePerShare_ac590fee-7849-489c-949e-a2bf0ede791e" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues_2244bab4-322a-4fe3-923e-12334e5d26b5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues_2244bab4-322a-4fe3-923e-12334e5d26b5" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIndefiniteLivedIntangibleAssets_2dab98d0-edcc-4bad-a3cc-65c275fa98ef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIndefiniteLivedIntangibleAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIndefiniteLivedIntangibleAssets_2dab98d0-edcc-4bad-a3cc-65c275fa98ef" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_20dfb66b-51a3-4327-bba5-f6350de68949" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Goodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_Goodwill_20dfb66b-51a3-4327-bba5-f6350de68949" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationProFormaInformationRevenueOfAcquireeSinceAcquisitionDateActual_6e2964fb-de85-48b8-a8b4-77cea53c595a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationProFormaInformationRevenueOfAcquireeSinceAcquisitionDateActual"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_BusinessCombinationProFormaInformationRevenueOfAcquireeSinceAcquisitionDateActual_6e2964fb-de85-48b8-a8b4-77cea53c595a" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationAcquisitionRelatedCosts_a89bf62b-2b6b-46b8-ada7-cbf54806d32f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationAcquisitionRelatedCosts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_BusinessCombinationAcquisitionRelatedCosts_a89bf62b-2b6b-46b8-ada7-cbf54806d32f" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationLiabilityMeasurementInput_78c9ea40-b61a-466b-8102-deaea7e56eb0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationContingentConsiderationLiabilityMeasurementInput"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_8a85d427-5411-4ef6-b483-f2136d2459ba" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationLiabilityMeasurementInput_78c9ea40-b61a-466b-8102-deaea7e56eb0" xlink:type="arc" order="16"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/RESTRUCTURINGDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#RESTRUCTURINGDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/RESTRUCTURINGDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_583bf0ba-23bf-4b71-adde-fdf9deb4b414" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestructuringCostAndReserveLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_6859f2e8-7c91-4283-ac44-f694f9b9c563" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_583bf0ba-23bf-4b71-adde-fdf9deb4b414" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_6859f2e8-7c91-4283-ac44-f694f9b9c563" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanAxis_a8ff64ec-becb-4dd5-9f33-d125f15c0699" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestructuringPlanAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_6859f2e8-7c91-4283-ac44-f694f9b9c563" xlink:to="loc_us-gaap_RestructuringPlanAxis_a8ff64ec-becb-4dd5-9f33-d125f15c0699" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanDomain_a8ff64ec-becb-4dd5-9f33-d125f15c0699_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestructuringPlanDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_a8ff64ec-becb-4dd5-9f33-d125f15c0699" xlink:to="loc_us-gaap_RestructuringPlanDomain_a8ff64ec-becb-4dd5-9f33-d125f15c0699_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanDomain_ad4b3f30-3841-485c-b0b4-11661eca0db5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestructuringPlanDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_a8ff64ec-becb-4dd5-9f33-d125f15c0699" xlink:to="loc_us-gaap_RestructuringPlanDomain_ad4b3f30-3841-485c-b0b4-11661eca0db5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_OakvilleOntarioCanadaMember_8a3a0d94-8adc-4f54-ab1f-2e4506389d4c" xlink:href="anip-20231231.xsd#anip_OakvilleOntarioCanadaMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_ad4b3f30-3841-485c-b0b4-11661eca0db5" xlink:to="loc_anip_OakvilleOntarioCanadaMember_8a3a0d94-8adc-4f54-ab1f-2e4506389d4c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveAxis_14a35e72-95ca-4115-8640-fab052847fc0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestructuringCostAndReserveAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_6859f2e8-7c91-4283-ac44-f694f9b9c563" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_14a35e72-95ca-4115-8640-fab052847fc0" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_14a35e72-95ca-4115-8640-fab052847fc0_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TypeOfRestructuringDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_14a35e72-95ca-4115-8640-fab052847fc0" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_14a35e72-95ca-4115-8640-fab052847fc0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_d7608779-ce3f-4193-94f5-acf4bd9caf2e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TypeOfRestructuringDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_14a35e72-95ca-4115-8640-fab052847fc0" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_d7608779-ce3f-4193-94f5-acf4bd9caf2e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeSeveranceMember_57b0859b-3fdf-4d6f-a203-ea3d320eca51" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeSeveranceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_d7608779-ce3f-4193-94f5-acf4bd9caf2e" xlink:to="loc_us-gaap_EmployeeSeveranceMember_57b0859b-3fdf-4d6f-a203-ea3d320eca51" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FacilityClosingMember_40b178f9-22af-4f47-8072-bda1585063a5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FacilityClosingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_d7608779-ce3f-4193-94f5-acf4bd9caf2e" xlink:to="loc_us-gaap_FacilityClosingMember_40b178f9-22af-4f47-8072-bda1585063a5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherRestructuringMember_be73dc07-508c-430e-9b61-91e0aa32f1dd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherRestructuringMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_d7608779-ce3f-4193-94f5-acf4bd9caf2e" xlink:to="loc_us-gaap_OtherRestructuringMember_be73dc07-508c-430e-9b61-91e0aa32f1dd" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupClassificationAxis_a0506e06-b1f3-4b4a-beec-6465dc9ae3b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupClassificationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_6859f2e8-7c91-4283-ac44-f694f9b9c563" xlink:to="loc_us-gaap_DisposalGroupClassificationAxis_a0506e06-b1f3-4b4a-beec-6465dc9ae3b4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupClassificationDomain_a0506e06-b1f3-4b4a-beec-6465dc9ae3b4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupClassificationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DisposalGroupClassificationAxis_a0506e06-b1f3-4b4a-beec-6465dc9ae3b4" xlink:to="loc_us-gaap_DisposalGroupClassificationDomain_a0506e06-b1f3-4b4a-beec-6465dc9ae3b4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupClassificationDomain_1266e0e4-e1fd-4568-b662-dc1ebe5b4900" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupClassificationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DisposalGroupClassificationAxis_a0506e06-b1f3-4b4a-beec-6465dc9ae3b4" xlink:to="loc_us-gaap_DisposalGroupClassificationDomain_1266e0e4-e1fd-4568-b662-dc1ebe5b4900" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupHeldforsaleNotDiscontinuedOperationsMember_9748e04c-10c7-40f3-8124-d0bd859829dd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupHeldforsaleNotDiscontinuedOperationsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisposalGroupClassificationDomain_1266e0e4-e1fd-4568-b662-dc1ebe5b4900" xlink:to="loc_us-gaap_DisposalGroupHeldforsaleNotDiscontinuedOperationsMember_9748e04c-10c7-40f3-8124-d0bd859829dd" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_d943f5a9-fe14-44a9-ab62-ebc20396c0e4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_6859f2e8-7c91-4283-ac44-f694f9b9c563" xlink:to="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_d943f5a9-fe14-44a9-ab62-ebc20396c0e4" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_d943f5a9-fe14-44a9-ab62-ebc20396c0e4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_d943f5a9-fe14-44a9-ab62-ebc20396c0e4" xlink:to="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_d943f5a9-fe14-44a9-ab62-ebc20396c0e4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_904dde36-a391-417e-bb1c-4b994947e2bf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_d943f5a9-fe14-44a9-ab62-ebc20396c0e4" xlink:to="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_904dde36-a391-417e-bb1c-4b994947e2bf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_OakvilleOntarioFormerManufacturingFacilityMember_e9e60ea7-6a95-45cf-8aed-57e4e69a94e8" xlink:href="anip-20231231.xsd#anip_OakvilleOntarioFormerManufacturingFacilityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_904dde36-a391-417e-bb1c-4b994947e2bf" xlink:to="loc_anip_OakvilleOntarioFormerManufacturingFacilityMember_e9e60ea7-6a95-45cf-8aed-57e4e69a94e8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeAxis_4279d57b-8da4-4708-8aa4-667f09e868d2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_6859f2e8-7c91-4283-ac44-f694f9b9c563" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_4279d57b-8da4-4708-8aa4-667f09e868d2" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_4279d57b-8da4-4708-8aa4-667f09e868d2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_4279d57b-8da4-4708-8aa4-667f09e868d2" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_4279d57b-8da4-4708-8aa4-667f09e868d2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_ac0177fa-5333-4f28-8e32-95cdf232aa13" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_4279d57b-8da4-4708-8aa4-667f09e868d2" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_ac0177fa-5333-4f28-8e32-95cdf232aa13" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventMember_89e62995-9ccc-457b-8fda-66b6833cece1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventTypeDomain_ac0177fa-5333-4f28-8e32-95cdf232aa13" xlink:to="loc_us-gaap_SubsequentEventMember_89e62995-9ccc-457b-8fda-66b6833cece1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NumberOfPharmaceuticalManufacturingFacilities_1d560025-b451-47f1-a6ac-f87fe2356d39" xlink:href="anip-20231231.xsd#anip_NumberOfPharmaceuticalManufacturingFacilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_583bf0ba-23bf-4b71-adde-fdf9deb4b414" xlink:to="loc_anip_NumberOfPharmaceuticalManufacturingFacilities_1d560025-b451-47f1-a6ac-f87fe2356d39" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringAndRelatedCostIncurredCost_5e0b28c4-b1d8-428b-b654-46445bbbee6f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestructuringAndRelatedCostIncurredCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_583bf0ba-23bf-4b71-adde-fdf9deb4b414" xlink:to="loc_us-gaap_RestructuringAndRelatedCostIncurredCost_5e0b28c4-b1d8-428b-b654-46445bbbee6f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringReserve_5dc15d1a-d9f5-442f-903d-b631a96df653" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestructuringReserve"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_583bf0ba-23bf-4b71-adde-fdf9deb4b414" xlink:to="loc_us-gaap_RestructuringReserve_5dc15d1a-d9f5-442f-903d-b631a96df653" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsHeldForSaleNotPartOfDisposalGroupCurrent_96eca771-c850-4c58-8171-9b549ba4a12c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsHeldForSaleNotPartOfDisposalGroupCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_583bf0ba-23bf-4b71-adde-fdf9deb4b414" xlink:to="loc_us-gaap_AssetsHeldForSaleNotPartOfDisposalGroupCurrent_96eca771-c850-4c58-8171-9b549ba4a12c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationConsideration_ebb3025a-d173-46f8-94e4-2e4994b0ee83" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupIncludingDiscontinuedOperationConsideration"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_583bf0ba-23bf-4b71-adde-fdf9deb4b414" xlink:to="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationConsideration_ebb3025a-d173-46f8-94e4-2e4994b0ee83" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INDEBTEDNESSCreditfacilityDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INDEBTEDNESSCreditfacilityDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/INDEBTEDNESSCreditfacilityDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_8ac89626-ca69-4248-a5d8-d817cf3bb493" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_7282f00c-6e97-4a9f-ac02-7010f3214f82" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_8ac89626-ca69-4248-a5d8-d817cf3bb493" xlink:to="loc_us-gaap_DebtInstrumentTable_7282f00c-6e97-4a9f-ac02-7010f3214f82" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityAxis_99957c66-5e58-4359-98ce-d7ce93fc3da7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CreditFacilityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_7282f00c-6e97-4a9f-ac02-7010f3214f82" xlink:to="loc_us-gaap_CreditFacilityAxis_99957c66-5e58-4359-98ce-d7ce93fc3da7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityDomain_99957c66-5e58-4359-98ce-d7ce93fc3da7_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CreditFacilityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_99957c66-5e58-4359-98ce-d7ce93fc3da7" xlink:to="loc_us-gaap_CreditFacilityDomain_99957c66-5e58-4359-98ce-d7ce93fc3da7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityDomain_d48a7ada-390c-4af1-810f-30e28b3999e0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CreditFacilityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_99957c66-5e58-4359-98ce-d7ce93fc3da7" xlink:to="loc_us-gaap_CreditFacilityDomain_d48a7ada-390c-4af1-810f-30e28b3999e0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CreditAgreementMember_003c4fc4-9e59-4969-bf0f-8b169f5af355" xlink:href="anip-20231231.xsd#anip_CreditAgreementMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_d48a7ada-390c-4af1-810f-30e28b3999e0" xlink:to="loc_anip_CreditAgreementMember_003c4fc4-9e59-4969-bf0f-8b169f5af355" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_af95506c-50df-42cc-bbc0-b82e5c4d06c7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_7282f00c-6e97-4a9f-ac02-7010f3214f82" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_af95506c-50df-42cc-bbc0-b82e5c4d06c7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_af95506c-50df-42cc-bbc0-b82e5c4d06c7_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_af95506c-50df-42cc-bbc0-b82e5c4d06c7" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_af95506c-50df-42cc-bbc0-b82e5c4d06c7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_efad81bf-49b8-46d0-b77a-8b6d21627a68" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_af95506c-50df-42cc-bbc0-b82e5c4d06c7" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_efad81bf-49b8-46d0-b77a-8b6d21627a68" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_TermLoanMember_45cede8c-e89a-4c7b-a576-4fd36ee5500e" xlink:href="anip-20231231.xsd#anip_TermLoanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_efad81bf-49b8-46d0-b77a-8b6d21627a68" xlink:to="loc_anip_TermLoanMember_45cede8c-e89a-4c7b-a576-4fd36ee5500e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditMember_d82374a7-a6d9-4ce8-914e-3abbd02bcd57" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LineOfCreditMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_efad81bf-49b8-46d0-b77a-8b6d21627a68" xlink:to="loc_us-gaap_LineOfCreditMember_d82374a7-a6d9-4ce8-914e-3abbd02bcd57" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableRateAxis_05bd7712-107d-4d14-8e3e-25f81d3aa3e2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableRateAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_7282f00c-6e97-4a9f-ac02-7010f3214f82" xlink:to="loc_us-gaap_VariableRateAxis_05bd7712-107d-4d14-8e3e-25f81d3aa3e2" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableRateDomain_05bd7712-107d-4d14-8e3e-25f81d3aa3e2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableRateDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_VariableRateAxis_05bd7712-107d-4d14-8e3e-25f81d3aa3e2" xlink:to="loc_us-gaap_VariableRateDomain_05bd7712-107d-4d14-8e3e-25f81d3aa3e2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableRateDomain_5d9dd8fe-a071-4e2a-8994-42ea8827ca2f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableRateDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_VariableRateAxis_05bd7712-107d-4d14-8e3e-25f81d3aa3e2" xlink:to="loc_us-gaap_VariableRateDomain_5d9dd8fe-a071-4e2a-8994-42ea8827ca2f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BaseRateMember_f6f76174-9ce1-476d-9dc1-e6e2e17fefdb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BaseRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_5d9dd8fe-a071-4e2a-8994-42ea8827ca2f" xlink:to="loc_us-gaap_BaseRateMember_f6f76174-9ce1-476d-9dc1-e6e2e17fefdb" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuredOvernightFinancingRateSofrOvernightIndexSwapRateMember_e4c6b496-cd7b-483a-8852-d0fde21c3c32" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SecuredOvernightFinancingRateSofrOvernightIndexSwapRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_5d9dd8fe-a071-4e2a-8994-42ea8827ca2f" xlink:to="loc_us-gaap_SecuredOvernightFinancingRateSofrOvernightIndexSwapRateMember_e4c6b496-cd7b-483a-8852-d0fde21c3c32" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_InterestPeriodAxis_2210edfe-aae4-41a0-a98b-607b37a04cd0" xlink:href="anip-20231231.xsd#anip_InterestPeriodAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_7282f00c-6e97-4a9f-ac02-7010f3214f82" xlink:to="loc_anip_InterestPeriodAxis_2210edfe-aae4-41a0-a98b-607b37a04cd0" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_InterestPeriodDomain_2210edfe-aae4-41a0-a98b-607b37a04cd0_default" xlink:href="anip-20231231.xsd#anip_InterestPeriodDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_anip_InterestPeriodAxis_2210edfe-aae4-41a0-a98b-607b37a04cd0" xlink:to="loc_anip_InterestPeriodDomain_2210edfe-aae4-41a0-a98b-607b37a04cd0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_InterestPeriodDomain_f1454c41-776c-4661-a7c9-cb17dcea4490" xlink:href="anip-20231231.xsd#anip_InterestPeriodDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_anip_InterestPeriodAxis_2210edfe-aae4-41a0-a98b-607b37a04cd0" xlink:to="loc_anip_InterestPeriodDomain_f1454c41-776c-4661-a7c9-cb17dcea4490" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_OneMonthDurationMember_7ac07820-da8b-42e3-b8d6-dfb6da151d32" xlink:href="anip-20231231.xsd#anip_OneMonthDurationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_InterestPeriodDomain_f1454c41-776c-4661-a7c9-cb17dcea4490" xlink:to="loc_anip_OneMonthDurationMember_7ac07820-da8b-42e3-b8d6-dfb6da151d32" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ThreeMonthDurationMember_6906fcc8-333f-484b-994c-9e4dc5a53790" xlink:href="anip-20231231.xsd#anip_ThreeMonthDurationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_InterestPeriodDomain_f1454c41-776c-4661-a7c9-cb17dcea4490" xlink:to="loc_anip_ThreeMonthDurationMember_6906fcc8-333f-484b-994c-9e4dc5a53790" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_SixMonthDurationMember_193ef41d-52c9-4b13-a282-fedde69d641e" xlink:href="anip-20231231.xsd#anip_SixMonthDurationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_InterestPeriodDomain_f1454c41-776c-4661-a7c9-cb17dcea4490" xlink:to="loc_anip_SixMonthDurationMember_193ef41d-52c9-4b13-a282-fedde69d641e" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_6744e28c-b572-4761-85d1-f863585a40d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_8ac89626-ca69-4248-a5d8-d817cf3bb493" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_6744e28c-b572-4761-85d1-f863585a40d8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentBasisSpreadOnVariableRate1_ba5d58e8-1ef4-4d29-9973-b22fda27ad0e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentBasisSpreadOnVariableRate1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_8ac89626-ca69-4248-a5d8-d817cf3bb493" xlink:to="loc_us-gaap_DebtInstrumentBasisSpreadOnVariableRate1_ba5d58e8-1ef4-4d29-9973-b22fda27ad0e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentInterestRateEffectivePercentage_91501366-5300-4ed3-9b42-7b918134c697" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentInterestRateEffectivePercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_8ac89626-ca69-4248-a5d8-d817cf3bb493" xlink:to="loc_us-gaap_DebtInstrumentInterestRateEffectivePercentage_91501366-5300-4ed3-9b42-7b918134c697" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromLinesOfCredit_0ede7cc1-6d56-4f71-abb4-fea8d759662d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromLinesOfCredit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_8ac89626-ca69-4248-a5d8-d817cf3bb493" xlink:to="loc_us-gaap_ProceedsFromLinesOfCredit_0ede7cc1-6d56-4f71-abb4-fea8d759662d" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityRemainingBorrowingCapacity_e574d9dd-2392-4c4a-8e43-8a0ee77fcbd6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LineOfCreditFacilityRemainingBorrowingCapacity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_8ac89626-ca69-4248-a5d8-d817cf3bb493" xlink:to="loc_us-gaap_LineOfCreditFacilityRemainingBorrowingCapacity_e574d9dd-2392-4c4a-8e43-8a0ee77fcbd6" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDebtIssuanceCosts_218977a9-9acf-4398-8e86-64c659946cbe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsOfDebtIssuanceCosts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_8ac89626-ca69-4248-a5d8-d817cf3bb493" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_218977a9-9acf-4398-8e86-64c659946cbe" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityCommitmentFeePercentage_0a14d984-d261-4923-9c07-85af419a00df" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LineOfCreditFacilityCommitmentFeePercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_8ac89626-ca69-4248-a5d8-d817cf3bb493" xlink:to="loc_us-gaap_LineOfCreditFacilityCommitmentFeePercentage_0a14d984-d261-4923-9c07-85af419a00df" xlink:type="arc" order="6"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INDEBTEDNESSFacilitycomponentsDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INDEBTEDNESSFacilitycomponentsDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/INDEBTEDNESSFacilitycomponentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_5c8c6d79-f0c3-4ee1-b044-ee3712c06598" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_ca1b5bba-d039-428c-8793-de25b7c42069" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_5c8c6d79-f0c3-4ee1-b044-ee3712c06598" xlink:to="loc_us-gaap_DebtInstrumentTable_ca1b5bba-d039-428c-8793-de25b7c42069" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_bd0c2e0e-f988-4ddc-a9dd-baff4d3c981d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_ca1b5bba-d039-428c-8793-de25b7c42069" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_bd0c2e0e-f988-4ddc-a9dd-baff4d3c981d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_bd0c2e0e-f988-4ddc-a9dd-baff4d3c981d_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_bd0c2e0e-f988-4ddc-a9dd-baff4d3c981d" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_bd0c2e0e-f988-4ddc-a9dd-baff4d3c981d_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_b0da18fc-97ef-4c4c-b3f9-7925b4dbf590" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_bd0c2e0e-f988-4ddc-a9dd-baff4d3c981d" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_b0da18fc-97ef-4c4c-b3f9-7925b4dbf590" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_TermLoanAndDelayedDrawTermLoanMember_6c02af7d-b610-4e9d-8ad9-e445bf36c8aa" xlink:href="anip-20231231.xsd#anip_TermLoanAndDelayedDrawTermLoanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_b0da18fc-97ef-4c4c-b3f9-7925b4dbf590" xlink:to="loc_anip_TermLoanAndDelayedDrawTermLoanMember_6c02af7d-b610-4e9d-8ad9-e445bf36c8aa" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_LongTermDebtGrossCurrent_a4f4260c-a1b0-4510-94f5-ef00d519a393" xlink:href="anip-20231231.xsd#anip_LongTermDebtGrossCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_5c8c6d79-f0c3-4ee1-b044-ee3712c06598" xlink:to="loc_anip_LongTermDebtGrossCurrent_a4f4260c-a1b0-4510-94f5-ef00d519a393" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFinanceCostsCurrentNet_8391f9e0-7833-4e43-b1ab-a7a3f01aa563" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredFinanceCostsCurrentNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_5c8c6d79-f0c3-4ee1-b044-ee3712c06598" xlink:to="loc_us-gaap_DeferredFinanceCostsCurrentNet_8391f9e0-7833-4e43-b1ab-a7a3f01aa563" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_eea79871-c529-4c0d-a723-bd0ff97ce6b7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_5c8c6d79-f0c3-4ee1-b044-ee3712c06598" xlink:to="loc_us-gaap_LongTermDebtCurrent_eea79871-c529-4c0d-a723-bd0ff97ce6b7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_LongTermDebtGrossNonCurrent_00c8e968-8b34-4ada-8c71-79a5d1eca570" xlink:href="anip-20231231.xsd#anip_LongTermDebtGrossNonCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_5c8c6d79-f0c3-4ee1-b044-ee3712c06598" xlink:to="loc_anip_LongTermDebtGrossNonCurrent_00c8e968-8b34-4ada-8c71-79a5d1eca570" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFinanceCostsNoncurrentNet_15414dd2-8e42-4c65-a305-ede57a41897a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredFinanceCostsNoncurrentNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_5c8c6d79-f0c3-4ee1-b044-ee3712c06598" xlink:to="loc_us-gaap_DeferredFinanceCostsNoncurrentNet_15414dd2-8e42-4c65-a305-ede57a41897a" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_8ccb8f89-17ab-4f1a-8539-39aa54b53ad3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_5c8c6d79-f0c3-4ee1-b044-ee3712c06598" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_8ccb8f89-17ab-4f1a-8539-39aa54b53ad3" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INDEBTEDNESSOutstandingDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INDEBTEDNESSOutstandingDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/INDEBTEDNESSOutstandingDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_6ce04b0b-bf4f-4edf-9559-46a2d4a4cacf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_2956a3ab-ba41-428d-a55a-d2bb2938f56d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_6ce04b0b-bf4f-4edf-9559-46a2d4a4cacf" xlink:to="loc_us-gaap_DebtInstrumentTable_2956a3ab-ba41-428d-a55a-d2bb2938f56d" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityAxis_acf5688c-fd99-4304-8102-18b9d4038bd4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CreditFacilityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_2956a3ab-ba41-428d-a55a-d2bb2938f56d" xlink:to="loc_us-gaap_CreditFacilityAxis_acf5688c-fd99-4304-8102-18b9d4038bd4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityDomain_acf5688c-fd99-4304-8102-18b9d4038bd4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CreditFacilityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_acf5688c-fd99-4304-8102-18b9d4038bd4" xlink:to="loc_us-gaap_CreditFacilityDomain_acf5688c-fd99-4304-8102-18b9d4038bd4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityDomain_66e7e748-5d79-4787-9890-aa02dda4106c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CreditFacilityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_acf5688c-fd99-4304-8102-18b9d4038bd4" xlink:to="loc_us-gaap_CreditFacilityDomain_66e7e748-5d79-4787-9890-aa02dda4106c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CreditAgreementMember_5c4aab12-d033-41fd-9d3d-911f6b26fcdc" xlink:href="anip-20231231.xsd#anip_CreditAgreementMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_66e7e748-5d79-4787-9890-aa02dda4106c" xlink:to="loc_anip_CreditAgreementMember_5c4aab12-d033-41fd-9d3d-911f6b26fcdc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_fd4e4831-e1e1-4a99-97c9-1277d7fc0d4c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_2956a3ab-ba41-428d-a55a-d2bb2938f56d" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_fd4e4831-e1e1-4a99-97c9-1277d7fc0d4c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_fd4e4831-e1e1-4a99-97c9-1277d7fc0d4c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_fd4e4831-e1e1-4a99-97c9-1277d7fc0d4c" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_fd4e4831-e1e1-4a99-97c9-1277d7fc0d4c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_2c3f7b1c-4a16-484b-8bf9-9355d05d585e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_fd4e4831-e1e1-4a99-97c9-1277d7fc0d4c" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_2c3f7b1c-4a16-484b-8bf9-9355d05d585e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_TermLoanMember_015e2fa8-98ba-457c-933f-6ab81d242a9b" xlink:href="anip-20231231.xsd#anip_TermLoanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_2c3f7b1c-4a16-484b-8bf9-9355d05d585e" xlink:to="loc_anip_TermLoanMember_015e2fa8-98ba-457c-933f-6ab81d242a9b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditMember_0c850f49-9407-43fb-8827-585b6cf5b1e9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LineOfCreditMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_2c3f7b1c-4a16-484b-8bf9-9355d05d585e" xlink:to="loc_us-gaap_LineOfCreditMember_0c850f49-9407-43fb-8827-585b6cf5b1e9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentCarryingAmount_c6e1ed99-8b36-41eb-9876-a0f05ae0eaf9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentCarryingAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_6ce04b0b-bf4f-4edf-9559-46a2d4a4cacf" xlink:to="loc_us-gaap_DebtInstrumentCarryingAmount_c6e1ed99-8b36-41eb-9876-a0f05ae0eaf9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFinanceCostsNet_719d08ce-d6b2-4dda-9701-989a40e4c4ee" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredFinanceCostsNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_6ce04b0b-bf4f-4edf-9559-46a2d4a4cacf" xlink:to="loc_us-gaap_DeferredFinanceCostsNet_719d08ce-d6b2-4dda-9701-989a40e4c4ee" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFinanceCostsNoncurrentNet_d56899bf-2318-4a72-ad3f-174c2b3075a4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredFinanceCostsNoncurrentNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_6ce04b0b-bf4f-4edf-9559-46a2d4a4cacf" xlink:to="loc_us-gaap_DeferredFinanceCostsNoncurrentNet_d56899bf-2318-4a72-ad3f-174c2b3075a4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFinanceCostsCurrentNet_9e2a24f2-2b15-4f58-a9d2-a6ff2dbb2439" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredFinanceCostsCurrentNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_6ce04b0b-bf4f-4edf-9559-46a2d4a4cacf" xlink:to="loc_us-gaap_DeferredFinanceCostsCurrentNet_9e2a24f2-2b15-4f58-a9d2-a6ff2dbb2439" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INDEBTEDNESSCreditfacilitymaturityDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INDEBTEDNESSCreditfacilitymaturityDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/INDEBTEDNESSCreditfacilitymaturityDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_4b026289-6ee4-4e80-839b-24343a15a656" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_af51e421-4428-474a-b3d8-ee0e18b19914" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_4b026289-6ee4-4e80-839b-24343a15a656" xlink:to="loc_us-gaap_DebtInstrumentTable_af51e421-4428-474a-b3d8-ee0e18b19914" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_45b72556-a185-48c2-be6b-8712b5a76ede" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_af51e421-4428-474a-b3d8-ee0e18b19914" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_45b72556-a185-48c2-be6b-8712b5a76ede" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_45b72556-a185-48c2-be6b-8712b5a76ede_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_45b72556-a185-48c2-be6b-8712b5a76ede" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_45b72556-a185-48c2-be6b-8712b5a76ede_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_6b672654-86c8-415d-a2bb-6a62f804ce3d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_45b72556-a185-48c2-be6b-8712b5a76ede" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_6b672654-86c8-415d-a2bb-6a62f804ce3d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_TermLoanMember_944079b7-8102-411f-97e1-65f3a242decb" xlink:href="anip-20231231.xsd#anip_TermLoanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_6b672654-86c8-415d-a2bb-6a62f804ce3d" xlink:to="loc_anip_TermLoanMember_944079b7-8102-411f-97e1-65f3a242decb" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_476e4a7c-3ebc-4886-b9d5-6a9e0e74fb1e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_4b026289-6ee4-4e80-839b-24343a15a656" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_476e4a7c-3ebc-4886-b9d5-6a9e0e74fb1e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_af60c782-d5f5-4251-a4dc-9c4177703f65" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_4b026289-6ee4-4e80-839b-24343a15a656" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_af60c782-d5f5-4251-a4dc-9c4177703f65" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_53255070-1669-46ed-8fe6-29961197c4ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_4b026289-6ee4-4e80-839b-24343a15a656" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_53255070-1669-46ed-8fe6-29961197c4ec" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_cb485fa3-58c4-4ca8-9a8b-d3ce24718707" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_4b026289-6ee4-4e80-839b-24343a15a656" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_cb485fa3-58c4-4ca8-9a8b-d3ce24718707" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_178cecb9-39f1-4c5d-8c0e-0064733c6878" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_4b026289-6ee4-4e80-839b-24343a15a656" xlink:to="loc_us-gaap_LongTermDebt_178cecb9-39f1-4c5d-8c0e-0064733c6878" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/DERIVATIVEFINANCIALINSTRUMENTANDHEDGINGACTIVITYDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#DERIVATIVEFINANCIALINSTRUMENTANDHEDGINGACTIVITYDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/DERIVATIVEFINANCIALINSTRUMENTANDHEDGINGACTIVITYDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLineItems_c3b85460-9964-4312-8bff-5a1ff0b7a65b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeTable_ab7c2caa-b812-4b40-ab63-df4cb6a068fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_c3b85460-9964-4312-8bff-5a1ff0b7a65b" xlink:to="loc_us-gaap_DerivativeTable_ab7c2caa-b812-4b40-ab63-df4cb6a068fd" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_b27861f2-6a21-4c7e-b279-8710460b50ee" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_ab7c2caa-b812-4b40-ab63-df4cb6a068fd" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_b27861f2-6a21-4c7e-b279-8710460b50ee" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_b27861f2-6a21-4c7e-b279-8710460b50ee_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_b27861f2-6a21-4c7e-b279-8710460b50ee" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_b27861f2-6a21-4c7e-b279-8710460b50ee_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_da16c517-a975-4a43-a3a2-7f7dd2d0bec8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_b27861f2-6a21-4c7e-b279-8710460b50ee" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_da16c517-a975-4a43-a3a2-7f7dd2d0bec8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestRateSwapMember_1aed65f3-d14b-4ca6-a9d0-09195b01a31e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestRateSwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_da16c517-a975-4a43-a3a2-7f7dd2d0bec8" xlink:to="loc_us-gaap_InterestRateSwapMember_1aed65f3-d14b-4ca6-a9d0-09195b01a31e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityNotionalAmount_568cb419-629b-4783-bf9a-779defb78021" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityNotionalAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_c3b85460-9964-4312-8bff-5a1ff0b7a65b" xlink:to="loc_us-gaap_DerivativeLiabilityNotionalAmount_568cb419-629b-4783-bf9a-779defb78021" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentInterestRateEffectivePercentage_2de8f3c9-df77-4fcc-927d-a4abfdc79e6d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentInterestRateEffectivePercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_c3b85460-9964-4312-8bff-5a1ff0b7a65b" xlink:to="loc_us-gaap_DebtInstrumentInterestRateEffectivePercentage_2de8f3c9-df77-4fcc-927d-a4abfdc79e6d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_DerivativeLiabilityDecreaseInNotionalAmount_c5580cbc-9df0-475c-a9a4-13cfe1086186" xlink:href="anip-20231231.xsd#anip_DerivativeLiabilityDecreaseInNotionalAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_c3b85460-9964-4312-8bff-5a1ff0b7a65b" xlink:to="loc_anip_DerivativeLiabilityDecreaseInNotionalAmount_c5580cbc-9df0-475c-a9a4-13cfe1086186" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestRateDerivativeAssetsAtFairValue_ba863a30-cf16-446f-a423-9c896226e2b2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestRateDerivativeAssetsAtFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_c3b85460-9964-4312-8bff-5a1ff0b7a65b" xlink:to="loc_us-gaap_InterestRateDerivativeAssetsAtFairValue_ba863a30-cf16-446f-a423-9c896226e2b2" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_941ab6c2-ad41-478a-a923-f73fb9dae73d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_c3b85460-9964-4312-8bff-5a1ff0b7a65b" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_941ab6c2-ad41-478a-a923-f73fb9dae73d" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnrealizedGainLossOnDerivatives_447aa99b-08f5-471b-b0e8-01b1c987483a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UnrealizedGainLossOnDerivatives"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_c3b85460-9964-4312-8bff-5a1ff0b7a65b" xlink:to="loc_us-gaap_UnrealizedGainLossOnDerivatives_447aa99b-08f5-471b-b0e8-01b1c987483a" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossAfterReclassificationAndTax_18a61cc6-8b9b-43e3-85ce-e54d2a052a6b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossAfterReclassificationAndTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_c3b85460-9964-4312-8bff-5a1ff0b7a65b" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossAfterReclassificationAndTax_18a61cc6-8b9b-43e3-85ce-e54d2a052a6b" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_94d2457d-9eb4-4350-a821-d67dced8d5fa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_c3b85460-9964-4312-8bff-5a1ff0b7a65b" xlink:to="loc_us-gaap_InterestExpense_94d2457d-9eb4-4350-a821-d67dced8d5fa" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_7b9a39cc-fc27-4d9e-a0fb-ad375e1bebdb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_c3b85460-9964-4312-8bff-5a1ff0b7a65b" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_7b9a39cc-fc27-4d9e-a0fb-ad375e1bebdb" xlink:type="arc" order="8"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INVENTORIESNarrativeDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INVENTORIESNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/INVENTORIESNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryLineItems_ab6c7d33-4570-45e0-8c79-2c119dca5ae5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryCurrentTable_219e0485-3459-4e82-91d0-e4e0061ee52e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryCurrentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_InventoryLineItems_ab6c7d33-4570-45e0-8c79-2c119dca5ae5" xlink:to="loc_us-gaap_InventoryCurrentTable_219e0485-3459-4e82-91d0-e4e0061ee52e" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_a5d74b86-0a95-4818-a2eb-b049c4bcb426" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_InventoryCurrentTable_219e0485-3459-4e82-91d0-e4e0061ee52e" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_a5d74b86-0a95-4818-a2eb-b049c4bcb426" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_a5d74b86-0a95-4818-a2eb-b049c4bcb426_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskBenchmarkDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_a5d74b86-0a95-4818-a2eb-b049c4bcb426" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_a5d74b86-0a95-4818-a2eb-b049c4bcb426_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_44c1f1ad-2aba-4e1e-8937-2a3fa0308b5e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskBenchmarkDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_a5d74b86-0a95-4818-a2eb-b049c4bcb426" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_44c1f1ad-2aba-4e1e-8937-2a3fa0308b5e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsTotalMember_0ecd8162-b3c9-42fe-a74d-0cfe975c8c8c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CostOfGoodsTotalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_44c1f1ad-2aba-4e1e-8937-2a3fa0308b5e" xlink:to="loc_us-gaap_CostOfGoodsTotalMember_0ecd8162-b3c9-42fe-a74d-0cfe975c8c8c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskByTypeAxis_38306443-4611-458c-8cc4-950796eb736a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskByTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_InventoryCurrentTable_219e0485-3459-4e82-91d0-e4e0061ee52e" xlink:to="loc_us-gaap_ConcentrationRiskByTypeAxis_38306443-4611-458c-8cc4-950796eb736a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_38306443-4611-458c-8cc4-950796eb736a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_38306443-4611-458c-8cc4-950796eb736a" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_38306443-4611-458c-8cc4-950796eb736a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_4267184a-d3d9-4709-bb15-6b00d75c013a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_38306443-4611-458c-8cc4-950796eb736a" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_4267184a-d3d9-4709-bb15-6b00d75c013a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SupplierConcentrationRiskMember_c2374688-1dbe-43a5-9166-072ec862a82e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SupplierConcentrationRiskMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskTypeDomain_4267184a-d3d9-4709-bb15-6b00d75c013a" xlink:to="loc_us-gaap_SupplierConcentrationRiskMember_c2374688-1dbe-43a5-9166-072ec862a82e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedGoodsAndNonemployeeServicesTransactionBySupplierAxis_4a0eb83c-dc90-4805-a8bb-d15516db2737" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedGoodsAndNonemployeeServicesTransactionBySupplierAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_InventoryCurrentTable_219e0485-3459-4e82-91d0-e4e0061ee52e" xlink:to="loc_us-gaap_ShareBasedGoodsAndNonemployeeServicesTransactionBySupplierAxis_4a0eb83c-dc90-4805-a8bb-d15516db2737" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedGoodsAndNonemployeeServicesTransactionSupplierDomain_4a0eb83c-dc90-4805-a8bb-d15516db2737_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedGoodsAndNonemployeeServicesTransactionSupplierDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ShareBasedGoodsAndNonemployeeServicesTransactionBySupplierAxis_4a0eb83c-dc90-4805-a8bb-d15516db2737" xlink:to="loc_us-gaap_ShareBasedGoodsAndNonemployeeServicesTransactionSupplierDomain_4a0eb83c-dc90-4805-a8bb-d15516db2737_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedGoodsAndNonemployeeServicesTransactionSupplierDomain_7d606843-10a8-455a-9aed-d6cfd315d4e6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedGoodsAndNonemployeeServicesTransactionSupplierDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ShareBasedGoodsAndNonemployeeServicesTransactionBySupplierAxis_4a0eb83c-dc90-4805-a8bb-d15516db2737" xlink:to="loc_us-gaap_ShareBasedGoodsAndNonemployeeServicesTransactionSupplierDomain_7d606843-10a8-455a-9aed-d6cfd315d4e6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_OneSupplierMember_10f1851c-961d-43b4-870c-4afe1a747650" xlink:href="anip-20231231.xsd#anip_OneSupplierMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedGoodsAndNonemployeeServicesTransactionSupplierDomain_7d606843-10a8-455a-9aed-d6cfd315d4e6" xlink:to="loc_anip_OneSupplierMember_10f1851c-961d-43b4-870c-4afe1a747650" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskPercentage1_2785d5c7-00f5-43f3-9ed9-4fad9fe0a048" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConcentrationRiskPercentage1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InventoryLineItems_ab6c7d33-4570-45e0-8c79-2c119dca5ae5" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_2785d5c7-00f5-43f3-9ed9-4fad9fe0a048" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/PROPERTYANDEQUIPMENTNETScheduleofpropertyandequipmentDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#PROPERTYANDEQUIPMENTNETScheduleofpropertyandequipmentDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/PROPERTYANDEQUIPMENTNETScheduleofpropertyandequipmentDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentLineItems_a4ec75ab-45c0-422a-814a-1c70097db291" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_20b82bf4-e2b0-486d-8a50-413801f9c433" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfPropertyPlantAndEquipmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_a4ec75ab-45c0-422a-814a-1c70097db291" xlink:to="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_20b82bf4-e2b0-486d-8a50-413801f9c433" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_4b738aec-87cc-41ef-bd11-01e17c41877c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_20b82bf4-e2b0-486d-8a50-413801f9c433" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_4b738aec-87cc-41ef-bd11-01e17c41877c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_4b738aec-87cc-41ef-bd11-01e17c41877c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_4b738aec-87cc-41ef-bd11-01e17c41877c" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_4b738aec-87cc-41ef-bd11-01e17c41877c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_957ae0d9-e64f-4560-b44d-f29d13fda02d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_4b738aec-87cc-41ef-bd11-01e17c41877c" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_957ae0d9-e64f-4560-b44d-f29d13fda02d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LandMember_156cd700-ce22-4484-8d85-00781f15c238" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LandMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_957ae0d9-e64f-4560-b44d-f29d13fda02d" xlink:to="loc_us-gaap_LandMember_156cd700-ce22-4484-8d85-00781f15c238" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BuildingMember_207cc2ed-58fd-440d-b602-c8efa4abc866" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BuildingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_957ae0d9-e64f-4560-b44d-f29d13fda02d" xlink:to="loc_us-gaap_BuildingMember_207cc2ed-58fd-440d-b602-c8efa4abc866" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MachineryAndEquipmentMember_5bb3ed5a-ae61-4da5-97c1-58d44da3a4fb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MachineryAndEquipmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_957ae0d9-e64f-4560-b44d-f29d13fda02d" xlink:to="loc_us-gaap_MachineryAndEquipmentMember_5bb3ed5a-ae61-4da5-97c1-58d44da3a4fb" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConstructionInProgressMember_3c8dd0b9-8e97-4b67-8465-83278647b623" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConstructionInProgressMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_957ae0d9-e64f-4560-b44d-f29d13fda02d" xlink:to="loc_us-gaap_ConstructionInProgressMember_3c8dd0b9-8e97-4b67-8465-83278647b623" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_83beb6c8-08c7-44e4-b1e3-b143d42d38df" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_a4ec75ab-45c0-422a-814a-1c70097db291" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_83beb6c8-08c7-44e4-b1e3-b143d42d38df" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_27470205-96dd-41ec-a692-ef41cfa6aee7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_a4ec75ab-45c0-422a-814a-1c70097db291" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_27470205-96dd-41ec-a692-ef41cfa6aee7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_34bbdbdc-b01d-483b-807d-ffd0cec61fdd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_a4ec75ab-45c0-422a-814a-1c70097db291" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_34bbdbdc-b01d-483b-807d-ffd0cec61fdd" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/GOODWILLANDINTANGIBLEASSETSNarrativeDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#GOODWILLANDINTANGIBLEASSETSNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/GOODWILLANDINTANGIBLEASSETSNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillLineItems_0dcaeae9-946a-4ddd-9c40-91bd64dcdfa1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GoodwillLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfGoodwillTable_d9811d6b-09a3-4041-a762-23320ee03eaf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfGoodwillTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GoodwillLineItems_0dcaeae9-946a-4ddd-9c40-91bd64dcdfa1" xlink:to="loc_us-gaap_ScheduleOfGoodwillTable_d9811d6b-09a3-4041-a762-23320ee03eaf" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_e9bc388e-f4cf-4ba2-a483-44230992be17" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_d9811d6b-09a3-4041-a762-23320ee03eaf" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_e9bc388e-f4cf-4ba2-a483-44230992be17" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_e9bc388e-f4cf-4ba2-a483-44230992be17_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_e9bc388e-f4cf-4ba2-a483-44230992be17" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_e9bc388e-f4cf-4ba2-a483-44230992be17_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_1457b34e-417e-48bf-9cfa-36163490345d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_e9bc388e-f4cf-4ba2-a483-44230992be17" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_1457b34e-417e-48bf-9cfa-36163490345d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_BiosantePharmaceuticalsIncMember_95687d34-2492-40dc-a8db-afdefc3ac504" xlink:href="anip-20231231.xsd#anip_BiosantePharmaceuticalsIncMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_1457b34e-417e-48bf-9cfa-36163490345d" xlink:to="loc_anip_BiosantePharmaceuticalsIncMember_95687d34-2492-40dc-a8db-afdefc3ac504" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_WellSpringPharmaServicesIncMember_aefcf68c-7ca4-4da9-9173-1f743a091524" xlink:href="anip-20231231.xsd#anip_WellSpringPharmaServicesIncMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_1457b34e-417e-48bf-9cfa-36163490345d" xlink:to="loc_anip_WellSpringPharmaServicesIncMember_aefcf68c-7ca4-4da9-9173-1f743a091524" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NovitiumMember_e4adb901-68e4-4b05-9cc5-d91e029b6ea0" xlink:href="anip-20231231.xsd#anip_NovitiumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_1457b34e-417e-48bf-9cfa-36163490345d" xlink:to="loc_anip_NovitiumMember_e4adb901-68e4-4b05-9cc5-d91e029b6ea0" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_6bdd7dcb-ee6c-407f-85ce-00c6b7ac36bb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_d9811d6b-09a3-4041-a762-23320ee03eaf" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_6bdd7dcb-ee6c-407f-85ce-00c6b7ac36bb" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_6bdd7dcb-ee6c-407f-85ce-00c6b7ac36bb_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_6bdd7dcb-ee6c-407f-85ce-00c6b7ac36bb" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_6bdd7dcb-ee6c-407f-85ce-00c6b7ac36bb_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_e554e0c7-fa49-4ca2-a0d0-61c26345b11b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_6bdd7dcb-ee6c-407f-85ce-00c6b7ac36bb" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_e554e0c7-fa49-4ca2-a0d0-61c26345b11b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AcquiredAndaIntangibleAssetsMember_5a702227-f42a-4d6a-a5c4-51aeb46b5179" xlink:href="anip-20231231.xsd#anip_AcquiredAndaIntangibleAssetsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_e554e0c7-fa49-4ca2-a0d0-61c26345b11b" xlink:to="loc_anip_AcquiredAndaIntangibleAssetsMember_5a702227-f42a-4d6a-a5c4-51aeb46b5179" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ProductRightMember_a6e33a9b-7c57-4e63-9c2b-d27ee1dd614e" xlink:href="anip-20231231.xsd#anip_ProductRightMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_e554e0c7-fa49-4ca2-a0d0-61c26345b11b" xlink:to="loc_anip_ProductRightMember_a6e33a9b-7c57-4e63-9c2b-d27ee1dd614e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationTypeAxis_046daac1-fd67-46ca-98cb-6718ad3248b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_d9811d6b-09a3-4041-a762-23320ee03eaf" xlink:to="loc_us-gaap_ReclassificationTypeAxis_046daac1-fd67-46ca-98cb-6718ad3248b4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationTypeDomain_046daac1-fd67-46ca-98cb-6718ad3248b4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ReclassificationTypeAxis_046daac1-fd67-46ca-98cb-6718ad3248b4" xlink:to="loc_us-gaap_ReclassificationTypeDomain_046daac1-fd67-46ca-98cb-6718ad3248b4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationTypeDomain_90c277a4-afd8-469a-9188-127112bdec92" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ReclassificationTypeAxis_046daac1-fd67-46ca-98cb-6718ad3248b4" xlink:to="loc_us-gaap_ReclassificationTypeDomain_90c277a4-afd8-469a-9188-127112bdec92" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ReclassificationOfAssetsOnCompletionOfProjectAndLaunchOfRelatedProductsMember_dc8b9fbf-016d-41ee-a082-67315fe1404c" xlink:href="anip-20231231.xsd#anip_ReclassificationOfAssetsOnCompletionOfProjectAndLaunchOfRelatedProductsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ReclassificationTypeDomain_90c277a4-afd8-469a-9188-127112bdec92" xlink:to="loc_anip_ReclassificationOfAssetsOnCompletionOfProjectAndLaunchOfRelatedProductsMember_dc8b9fbf-016d-41ee-a082-67315fe1404c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_491f9c78-53e1-4d0a-a6e6-1c3a9c08fb87" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_d9811d6b-09a3-4041-a762-23320ee03eaf" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_491f9c78-53e1-4d0a-a6e6-1c3a9c08fb87" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_491f9c78-53e1-4d0a-a6e6-1c3a9c08fb87_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_491f9c78-53e1-4d0a-a6e6-1c3a9c08fb87" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_491f9c78-53e1-4d0a-a6e6-1c3a9c08fb87_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_669ddffa-44b2-4b3a-8092-98a5d4eb5ceb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_491f9c78-53e1-4d0a-a6e6-1c3a9c08fb87" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_669ddffa-44b2-4b3a-8092-98a5d4eb5ceb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InProcessResearchAndDevelopmentMember_2e5d6448-452e-41e6-a2b2-d226fa3f1356" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InProcessResearchAndDevelopmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_669ddffa-44b2-4b3a-8092-98a5d4eb5ceb" xlink:to="loc_us-gaap_InProcessResearchAndDevelopmentMember_2e5d6448-452e-41e6-a2b2-d226fa3f1356" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetAcquisitionAxis_92c4dd9b-697c-43ba-81e3-041362715066" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_d9811d6b-09a3-4041-a762-23320ee03eaf" xlink:to="loc_us-gaap_AssetAcquisitionAxis_92c4dd9b-697c-43ba-81e3-041362715066" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetAcquisitionDomain_92c4dd9b-697c-43ba-81e3-041362715066_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetAcquisitionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AssetAcquisitionAxis_92c4dd9b-697c-43ba-81e3-041362715066" xlink:to="loc_us-gaap_AssetAcquisitionDomain_92c4dd9b-697c-43ba-81e3-041362715066_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetAcquisitionDomain_e318d01a-6b9e-466e-b0a4-b1e845fc217e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetAcquisitionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AssetAcquisitionAxis_92c4dd9b-697c-43ba-81e3-041362715066" xlink:to="loc_us-gaap_AssetAcquisitionDomain_e318d01a-6b9e-466e-b0a4-b1e845fc217e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_SlaybackPharmaLimitedLiabilityCompanyAndAkornHoldingCompanyMember_92136bf1-da30-49d8-b8fc-c022fd30ae80" xlink:href="anip-20231231.xsd#anip_SlaybackPharmaLimitedLiabilityCompanyAndAkornHoldingCompanyMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetAcquisitionDomain_e318d01a-6b9e-466e-b0a4-b1e845fc217e" xlink:to="loc_anip_SlaybackPharmaLimitedLiabilityCompanyAndAkornHoldingCompanyMember_92136bf1-da30-49d8-b8fc-c022fd30ae80" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AlvogenIncMember_da24ac7f-3e5a-4b21-93df-653381973efd" xlink:href="anip-20231231.xsd#anip_AlvogenIncMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetAcquisitionDomain_e318d01a-6b9e-466e-b0a4-b1e845fc217e" xlink:to="loc_anip_AlvogenIncMember_da24ac7f-3e5a-4b21-93df-653381973efd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_OakrumPharmaMember_0fdfff1c-762c-42b1-b865-d1e1a7853b19" xlink:href="anip-20231231.xsd#anip_OakrumPharmaMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetAcquisitionDomain_e318d01a-6b9e-466e-b0a4-b1e845fc217e" xlink:to="loc_anip_OakrumPharmaMember_0fdfff1c-762c-42b1-b865-d1e1a7853b19" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_79a1bebb-3dad-460f-b468-f07c75d3c203" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_d9811d6b-09a3-4041-a762-23320ee03eaf" xlink:to="loc_srt_RangeAxis_79a1bebb-3dad-460f-b468-f07c75d3c203" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_79a1bebb-3dad-460f-b468-f07c75d3c203_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_79a1bebb-3dad-460f-b468-f07c75d3c203" xlink:to="loc_srt_RangeMember_79a1bebb-3dad-460f-b468-f07c75d3c203_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_a465b88e-84f8-4f37-b873-ea72584fa3aa" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_79a1bebb-3dad-460f-b468-f07c75d3c203" xlink:to="loc_srt_RangeMember_a465b88e-84f8-4f37-b873-ea72584fa3aa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_0c89ad7f-c3b7-45cd-9c6e-7522a0feec5f" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_a465b88e-84f8-4f37-b873-ea72584fa3aa" xlink:to="loc_srt_MinimumMember_0c89ad7f-c3b7-45cd-9c6e-7522a0feec5f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_26aa4b06-dade-4a08-873d-54d3e3a5e23e" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_a465b88e-84f8-4f37-b873-ea72584fa3aa" xlink:to="loc_srt_MaximumMember_26aa4b06-dade-4a08-873d-54d3e3a5e23e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillAcquiredDuringPeriod_78c332d0-cb29-4aad-96fd-1b8a09dbf93f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GoodwillAcquiredDuringPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_0dcaeae9-946a-4ddd-9c40-91bd64dcdfa1" xlink:to="loc_us-gaap_GoodwillAcquiredDuringPeriod_78c332d0-cb29-4aad-96fd-1b8a09dbf93f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NumberOfOperatingSegments_3a503089-9bca-449e-8f4c-66d8326ee788" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NumberOfOperatingSegments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_0dcaeae9-946a-4ddd-9c40-91bd64dcdfa1" xlink:to="loc_us-gaap_NumberOfOperatingSegments_3a503089-9bca-449e-8f4c-66d8326ee788" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NumberOfReportableSegments_e366a2af-c48c-451a-8f1b-970e7a67efb2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NumberOfReportableSegments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_0dcaeae9-946a-4ddd-9c40-91bd64dcdfa1" xlink:to="loc_us-gaap_NumberOfReportableSegments_e366a2af-c48c-451a-8f1b-970e7a67efb2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillImpairmentLoss_361d5793-9962-46bd-a6da-30e87484ce9c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GoodwillImpairmentLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_0dcaeae9-946a-4ddd-9c40-91bd64dcdfa1" xlink:to="loc_us-gaap_GoodwillImpairmentLoss_361d5793-9962-46bd-a6da-30e87484ce9c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_c5d6667a-5bc7-4b38-a1d9-852d9ef870d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Goodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_0dcaeae9-946a-4ddd-9c40-91bd64dcdfa1" xlink:to="loc_us-gaap_Goodwill_c5d6667a-5bc7-4b38-a1d9-852d9ef870d4" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_35d8e50a-2824-4df2-8815-45f9e089d70d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_0dcaeae9-946a-4ddd-9c40-91bd64dcdfa1" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_35d8e50a-2824-4df2-8815-45f9e089d70d" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsPeriodIncreaseDecrease_4157f614-8ae1-4977-ab56-b22ccf805b40" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsPeriodIncreaseDecrease"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_0dcaeae9-946a-4ddd-9c40-91bd64dcdfa1" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsPeriodIncreaseDecrease_4157f614-8ae1-4977-ab56-b22ccf805b40" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_a18cea7d-1d54-4495-8b8e-8c7e1f693d61" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_0dcaeae9-946a-4ddd-9c40-91bd64dcdfa1" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_a18cea7d-1d54-4495-8b8e-8c7e1f693d61" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinitelivedIntangibleAssetsAcquired1_032ab68e-27db-4540-bfab-7c0de958b587" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinitelivedIntangibleAssetsAcquired1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_0dcaeae9-946a-4ddd-9c40-91bd64dcdfa1" xlink:to="loc_us-gaap_FinitelivedIntangibleAssetsAcquired1_032ab68e-27db-4540-bfab-7c0de958b587" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfIntangibleAssets_10d8fea1-5b35-4b55-8ff8-5b5080e9f469" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AmortizationOfIntangibleAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_0dcaeae9-946a-4ddd-9c40-91bd64dcdfa1" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_10d8fea1-5b35-4b55-8ff8-5b5080e9f469" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_e15c600e-d404-4889-b525-41171536e8f0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ImpairmentOfIntangibleAssetsFinitelived"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_0dcaeae9-946a-4ddd-9c40-91bd64dcdfa1" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_e15c600e-d404-4889-b525-41171536e8f0" xlink:type="arc" order="10"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/GOODWILLANDINTANGIBLEASSETSComponentsDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#GOODWILLANDINTANGIBLEASSETSComponentsDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/GOODWILLANDINTANGIBLEASSETSComponentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_d8f35ed7-6148-436d-8cea-820c47723534" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_954aa3b1-1596-47fc-b58c-661504352ce1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_d8f35ed7-6148-436d-8cea-820c47723534" xlink:to="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_954aa3b1-1596-47fc-b58c-661504352ce1" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_1e451d79-ba20-4976-b276-3f1778e75944" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_954aa3b1-1596-47fc-b58c-661504352ce1" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_1e451d79-ba20-4976-b276-3f1778e75944" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_1e451d79-ba20-4976-b276-3f1778e75944_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_1e451d79-ba20-4976-b276-3f1778e75944" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_1e451d79-ba20-4976-b276-3f1778e75944_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_56bd9d19-529f-440c-87d0-82e5a70bff49" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_1e451d79-ba20-4976-b276-3f1778e75944" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_56bd9d19-529f-440c-87d0-82e5a70bff49" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AcquiredAndaIntangibleAssetsMember_53fb0aa8-b40d-4296-8091-fa67f4bdb131" xlink:href="anip-20231231.xsd#anip_AcquiredAndaIntangibleAssetsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_56bd9d19-529f-440c-87d0-82e5a70bff49" xlink:to="loc_anip_AcquiredAndaIntangibleAssetsMember_53fb0aa8-b40d-4296-8091-fa67f4bdb131" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ProductRightsMember_c3b3e2d2-29b2-4ea0-a8c3-4e0ae6e70778" xlink:href="anip-20231231.xsd#anip_ProductRightsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_56bd9d19-529f-440c-87d0-82e5a70bff49" xlink:to="loc_anip_ProductRightsMember_c3b3e2d2-29b2-4ea0-a8c3-4e0ae6e70778" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_MarketingAndDistributionRightsMember_0ba17e3b-5885-4beb-8a7c-e8c86e8f3215" xlink:href="anip-20231231.xsd#anip_MarketingAndDistributionRightsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_56bd9d19-529f-440c-87d0-82e5a70bff49" xlink:to="loc_anip_MarketingAndDistributionRightsMember_0ba17e3b-5885-4beb-8a7c-e8c86e8f3215" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NonCompeteAgreementMember_e62fa319-5ff0-4f8d-b9e4-5c83c9ba7617" xlink:href="anip-20231231.xsd#anip_NonCompeteAgreementMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_56bd9d19-529f-440c-87d0-82e5a70bff49" xlink:to="loc_anip_NonCompeteAgreementMember_e62fa319-5ff0-4f8d-b9e4-5c83c9ba7617" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CustomerRelationshipsMember_f54a575b-9425-4ad5-b904-b07c28f4d108" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CustomerRelationshipsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_56bd9d19-529f-440c-87d0-82e5a70bff49" xlink:to="loc_us-gaap_CustomerRelationshipsMember_f54a575b-9425-4ad5-b904-b07c28f4d108" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_4204d24f-cc3c-4085-9e43-668533094f21" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_954aa3b1-1596-47fc-b58c-661504352ce1" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_4204d24f-cc3c-4085-9e43-668533094f21" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_4204d24f-cc3c-4085-9e43-668533094f21_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_4204d24f-cc3c-4085-9e43-668533094f21" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_4204d24f-cc3c-4085-9e43-668533094f21_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_581088a9-afc8-4786-a2a6-bffbe6000276" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_4204d24f-cc3c-4085-9e43-668533094f21" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_581088a9-afc8-4786-a2a6-bffbe6000276" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InProcessResearchAndDevelopmentMember_24fe82f0-6f0f-4eeb-bb8a-7275b7f5392b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InProcessResearchAndDevelopmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_581088a9-afc8-4786-a2a6-bffbe6000276" xlink:to="loc_us-gaap_InProcessResearchAndDevelopmentMember_24fe82f0-6f0f-4eeb-bb8a-7275b7f5392b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNetAbstract_d5d79de8-15f4-438d-bf60-af84f661de7e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsNetAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_d8f35ed7-6148-436d-8cea-820c47723534" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsNetAbstract_d5d79de8-15f4-438d-bf60-af84f661de7e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_ab1d1e5c-966b-4ae4-95dd-7c1cdc0695a5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNetAbstract_d5d79de8-15f4-438d-bf60-af84f661de7e" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_ab1d1e5c-966b-4ae4-95dd-7c1cdc0695a5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_f1142f4b-0f95-46fd-8fff-0e86db8a9f32" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNetAbstract_d5d79de8-15f4-438d-bf60-af84f661de7e" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_f1142f4b-0f95-46fd-8fff-0e86db8a9f32" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_08ffd96b-c9fc-43f5-9691-e3db2d9a78e2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNetAbstract_d5d79de8-15f4-438d-bf60-af84f661de7e" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsNet_08ffd96b-c9fc-43f5-9691-e3db2d9a78e2" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsRemainingAmortizationPeriod1_0ceaf64c-459e-4374-a146-bcee8f993b97" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsRemainingAmortizationPeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNetAbstract_d5d79de8-15f4-438d-bf60-af84f661de7e" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsRemainingAmortizationPeriod1_0ceaf64c-459e-4374-a146-bcee8f993b97" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwillAbstract_196a8178-629c-430c-8808-b1cc3f2249df" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwillAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_d8f35ed7-6148-436d-8cea-820c47723534" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwillAbstract_196a8178-629c-430c-8808-b1cc3f2249df" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_91e5a194-aa9c-4ce1-806f-e81013416221" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwillAbstract_196a8178-629c-430c-8808-b1cc3f2249df" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_91e5a194-aa9c-4ce1-806f-e81013416221" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsGrossExcludingGoodwill_75cef0c6-9932-4b59-a206-ad16bc400236" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IntangibleAssetsGrossExcludingGoodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_d8f35ed7-6148-436d-8cea-820c47723534" xlink:to="loc_us-gaap_IntangibleAssetsGrossExcludingGoodwill_75cef0c6-9932-4b59-a206-ad16bc400236" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_6bfe2760-cc7b-417e-a97f-4fb6464b69b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_d8f35ed7-6148-436d-8cea-820c47723534" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_6bfe2760-cc7b-417e-a97f-4fb6464b69b4" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/FAIRVALUENarrativeDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#FAIRVALUENarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/FAIRVALUENarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByBalanceSheetGroupingTable_d658fb0e-6825-46b8-8299-953fd0b88b92" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByBalanceSheetGroupingTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_FairValueByBalanceSheetGroupingTable_d658fb0e-6825-46b8-8299-953fd0b88b92" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_4aac485d-9e7b-4625-a4be-f9eadb1848de" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_d658fb0e-6825-46b8-8299-953fd0b88b92" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_4aac485d-9e7b-4625-a4be-f9eadb1848de" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_4aac485d-9e7b-4625-a4be-f9eadb1848de_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_4aac485d-9e7b-4625-a4be-f9eadb1848de" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_4aac485d-9e7b-4625-a4be-f9eadb1848de_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_71147bd2-4cb6-4feb-a98c-7eb52008d3b0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_4aac485d-9e7b-4625-a4be-f9eadb1848de" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_71147bd2-4cb6-4feb-a98c-7eb52008d3b0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestRateSwapMember_6043a57d-fc0e-4bb4-bb2e-37219abbe51a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestRateSwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_71147bd2-4cb6-4feb-a98c-7eb52008d3b0" xlink:to="loc_us-gaap_InterestRateSwapMember_6043a57d-fc0e-4bb4-bb2e-37219abbe51a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_7a8b145b-76dc-4adc-92ff-da8553ab1f06" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_d658fb0e-6825-46b8-8299-953fd0b88b92" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_7a8b145b-76dc-4adc-92ff-da8553ab1f06" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_7a8b145b-76dc-4adc-92ff-da8553ab1f06_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_7a8b145b-76dc-4adc-92ff-da8553ab1f06" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_7a8b145b-76dc-4adc-92ff-da8553ab1f06_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_cd28d585-e1ce-4902-bfd3-5086a0a1ab7c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_7a8b145b-76dc-4adc-92ff-da8553ab1f06" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_cd28d585-e1ce-4902-bfd3-5086a0a1ab7c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NovitiumPharmaMember_ccdbf6ad-0d53-4cc9-96ab-9f4b317d43e9" xlink:href="anip-20231231.xsd#anip_NovitiumPharmaMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_cd28d585-e1ce-4902-bfd3-5086a0a1ab7c" xlink:to="loc_anip_NovitiumPharmaMember_ccdbf6ad-0d53-4cc9-96ab-9f4b317d43e9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_9a5deaa3-d2b0-4c0d-878a-1b3fc4fa18ce" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_d658fb0e-6825-46b8-8299-953fd0b88b92" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_9a5deaa3-d2b0-4c0d-878a-1b3fc4fa18ce" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_9a5deaa3-d2b0-4c0d-878a-1b3fc4fa18ce_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_9a5deaa3-d2b0-4c0d-878a-1b3fc4fa18ce" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_9a5deaa3-d2b0-4c0d-878a-1b3fc4fa18ce_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_f2338219-afe9-46f2-8502-66b8f3e68147" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_9a5deaa3-d2b0-4c0d-878a-1b3fc4fa18ce" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_f2338219-afe9-46f2-8502-66b8f3e68147" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AcquiredAndaIntangibleAssetsMember_53b40c1a-4ba7-4706-b18a-989e2e120005" xlink:href="anip-20231231.xsd#anip_AcquiredAndaIntangibleAssetsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_f2338219-afe9-46f2-8502-66b8f3e68147" xlink:to="loc_anip_AcquiredAndaIntangibleAssetsMember_53b40c1a-4ba7-4706-b18a-989e2e120005" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ProductIntellectualPropertyMember_6f57a71f-7900-4f14-82b1-06496a498558" xlink:href="anip-20231231.xsd#anip_ProductIntellectualPropertyMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_f2338219-afe9-46f2-8502-66b8f3e68147" xlink:to="loc_anip_ProductIntellectualPropertyMember_6f57a71f-7900-4f14-82b1-06496a498558" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AcquiredPipelineProductMember_19756268-5885-4e40-b624-54d6ee5836bd" xlink:href="anip-20231231.xsd#anip_AcquiredPipelineProductMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_f2338219-afe9-46f2-8502-66b8f3e68147" xlink:to="loc_anip_AcquiredPipelineProductMember_19756268-5885-4e40-b624-54d6ee5836bd" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AcquiredCommercialProductMember_fe7a0b79-113d-4276-8f72-e3e2f119a6c8" xlink:href="anip-20231231.xsd#anip_AcquiredCommercialProductMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_f2338219-afe9-46f2-8502-66b8f3e68147" xlink:to="loc_anip_AcquiredCommercialProductMember_fe7a0b79-113d-4276-8f72-e3e2f119a6c8" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AcquiredApprovedProductMember_abd74c83-5256-4d67-a968-97612b59d5fb" xlink:href="anip-20231231.xsd#anip_AcquiredApprovedProductMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_f2338219-afe9-46f2-8502-66b8f3e68147" xlink:to="loc_anip_AcquiredApprovedProductMember_abd74c83-5256-4d67-a968-97612b59d5fb" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AcquiredFiledProductsMember_ea91b6cc-a0bf-4da3-b4fd-89d1d12e0ca1" xlink:href="anip-20231231.xsd#anip_AcquiredFiledProductsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_f2338219-afe9-46f2-8502-66b8f3e68147" xlink:to="loc_anip_AcquiredFiledProductsMember_ea91b6cc-a0bf-4da3-b4fd-89d1d12e0ca1" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AcquiredNDAIntangibleAssetsMember_c4c200ee-84a1-468d-99be-3094e42eb289" xlink:href="anip-20231231.xsd#anip_AcquiredNDAIntangibleAssetsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_f2338219-afe9-46f2-8502-66b8f3e68147" xlink:to="loc_anip_AcquiredNDAIntangibleAssetsMember_c4c200ee-84a1-468d-99be-3094e42eb289" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetAcquisitionAxis_427d2051-7ed2-40a2-8838-dfe3ca4446c5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_d658fb0e-6825-46b8-8299-953fd0b88b92" xlink:to="loc_us-gaap_AssetAcquisitionAxis_427d2051-7ed2-40a2-8838-dfe3ca4446c5" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetAcquisitionDomain_427d2051-7ed2-40a2-8838-dfe3ca4446c5_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetAcquisitionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AssetAcquisitionAxis_427d2051-7ed2-40a2-8838-dfe3ca4446c5" xlink:to="loc_us-gaap_AssetAcquisitionDomain_427d2051-7ed2-40a2-8838-dfe3ca4446c5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetAcquisitionDomain_7d67f5e6-2b2a-4c0f-9349-dadccdce53b0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetAcquisitionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AssetAcquisitionAxis_427d2051-7ed2-40a2-8838-dfe3ca4446c5" xlink:to="loc_us-gaap_AssetAcquisitionDomain_7d67f5e6-2b2a-4c0f-9349-dadccdce53b0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_OakrumPharmaMember_def83b54-74e8-4a7c-8d5b-22af80c9dbe9" xlink:href="anip-20231231.xsd#anip_OakrumPharmaMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetAcquisitionDomain_7d67f5e6-2b2a-4c0f-9349-dadccdce53b0" xlink:to="loc_anip_OakrumPharmaMember_def83b54-74e8-4a7c-8d5b-22af80c9dbe9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_SlaybackPharmaLimitedLiabilityCompanyPatentsAndPendingPatentsMember_3f41a832-0a0a-4b63-99ed-5d5ecfccfd92" xlink:href="anip-20231231.xsd#anip_SlaybackPharmaLimitedLiabilityCompanyPatentsAndPendingPatentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetAcquisitionDomain_7d67f5e6-2b2a-4c0f-9349-dadccdce53b0" xlink:to="loc_anip_SlaybackPharmaLimitedLiabilityCompanyPatentsAndPendingPatentsMember_3f41a832-0a0a-4b63-99ed-5d5ecfccfd92" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AkornHoldingCompanyPipelineProductMember_39acf7b0-b320-4126-8a9e-4ab6b2ce739d" xlink:href="anip-20231231.xsd#anip_AkornHoldingCompanyPipelineProductMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetAcquisitionDomain_7d67f5e6-2b2a-4c0f-9349-dadccdce53b0" xlink:to="loc_anip_AkornHoldingCompanyPipelineProductMember_39acf7b0-b320-4126-8a9e-4ab6b2ce739d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AlvogenIncMember_f4db8d47-70cf-4068-a4af-8d90ed9af9d5" xlink:href="anip-20231231.xsd#anip_AlvogenIncMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetAcquisitionDomain_7d67f5e6-2b2a-4c0f-9349-dadccdce53b0" xlink:to="loc_anip_AlvogenIncMember_f4db8d47-70cf-4068-a4af-8d90ed9af9d5" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeAxis_81cc4b67-f90e-428e-95d8-b57bbfecdd96" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_d658fb0e-6825-46b8-8299-953fd0b88b92" xlink:to="loc_us-gaap_MeasurementInputTypeAxis_81cc4b67-f90e-428e-95d8-b57bbfecdd96" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeDomain_81cc4b67-f90e-428e-95d8-b57bbfecdd96_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MeasurementInputTypeAxis_81cc4b67-f90e-428e-95d8-b57bbfecdd96" xlink:to="loc_us-gaap_MeasurementInputTypeDomain_81cc4b67-f90e-428e-95d8-b57bbfecdd96_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeDomain_729e1598-5f27-4779-bd44-6de5a67e4141" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MeasurementInputTypeAxis_81cc4b67-f90e-428e-95d8-b57bbfecdd96" xlink:to="loc_us-gaap_MeasurementInputTypeDomain_729e1598-5f27-4779-bd44-6de5a67e4141" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputDiscountRateMember_d60be31d-2e34-4a90-98c1-c0030d141bb5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputDiscountRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MeasurementInputTypeDomain_729e1598-5f27-4779-bd44-6de5a67e4141" xlink:to="loc_us-gaap_MeasurementInputDiscountRateMember_d60be31d-2e34-4a90-98c1-c0030d141bb5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CounterpartyNameAxis_599f6f2f-42f0-4466-b99d-cde76e62a576" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CounterpartyNameAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_d658fb0e-6825-46b8-8299-953fd0b88b92" xlink:to="loc_srt_CounterpartyNameAxis_599f6f2f-42f0-4466-b99d-cde76e62a576" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RepurchaseAgreementCounterpartyNameDomain_599f6f2f-42f0-4466-b99d-cde76e62a576_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RepurchaseAgreementCounterpartyNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_CounterpartyNameAxis_599f6f2f-42f0-4466-b99d-cde76e62a576" xlink:to="loc_srt_RepurchaseAgreementCounterpartyNameDomain_599f6f2f-42f0-4466-b99d-cde76e62a576_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RepurchaseAgreementCounterpartyNameDomain_0fb79c80-323b-4aef-8494-e9ba01a18c69" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RepurchaseAgreementCounterpartyNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_CounterpartyNameAxis_599f6f2f-42f0-4466-b99d-cde76e62a576" xlink:to="loc_srt_RepurchaseAgreementCounterpartyNameDomain_0fb79c80-323b-4aef-8494-e9ba01a18c69" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_SandozIncMember_07d863d6-bd00-4e6a-8c4b-091dd0a181cd" xlink:href="anip-20231231.xsd#anip_SandozIncMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RepurchaseAgreementCounterpartyNameDomain_0fb79c80-323b-4aef-8494-e9ba01a18c69" xlink:to="loc_anip_SandozIncMember_07d863d6-bd00-4e6a-8c4b-091dd0a181cd" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeAxis_eee004b8-5164-4ffd-9482-9a2fe7c90784" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_d658fb0e-6825-46b8-8299-953fd0b88b92" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_eee004b8-5164-4ffd-9482-9a2fe7c90784" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_eee004b8-5164-4ffd-9482-9a2fe7c90784_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_eee004b8-5164-4ffd-9482-9a2fe7c90784" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_eee004b8-5164-4ffd-9482-9a2fe7c90784_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_d520b82a-0ac7-4b53-b2bc-d48615e5d44e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_eee004b8-5164-4ffd-9482-9a2fe7c90784" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_d520b82a-0ac7-4b53-b2bc-d48615e5d44e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventMember_7c69b895-9093-4e53-833c-198e5a253641" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventTypeDomain_d520b82a-0ac7-4b53-b2bc-d48615e5d44e" xlink:to="loc_us-gaap_SubsequentEventMember_7c69b895-9093-4e53-833c-198e5a253641" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_60a0fc22-2279-4ac5-90aa-449d5bf59ee7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashAndCashEquivalentsFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_60a0fc22-2279-4ac5-90aa-449d5bf59ee7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestRateDerivativeLiabilitiesAtFairValue_b328050d-880a-4837-984c-7e05df790829" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestRateDerivativeLiabilitiesAtFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_InterestRateDerivativeLiabilitiesAtFairValue_b328050d-880a-4837-984c-7e05df790829" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueHigh_6b4d2c3e-4630-4382-93ab-c2cb2b9386d7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueHigh"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueHigh_6b4d2c3e-4630-4382-93ab-c2cb2b9386d7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_BusinessCombinationContingentConsiderationArrangementsPeriod_55b6d304-5365-4113-a7f0-e21ea3ac7cb4" xlink:href="anip-20231231.xsd#anip_BusinessCombinationContingentConsiderationArrangementsPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_anip_BusinessCombinationContingentConsiderationArrangementsPeriod_55b6d304-5365-4113-a7f0-e21ea3ac7cb4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationLiability_97d9fdaa-f04c-49ea-af7a-d6e9a75c5ee2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationContingentConsiderationLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationLiability_97d9fdaa-f04c-49ea-af7a-d6e9a75c5ee2" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentForContingentConsiderationLiabilityFinancingActivities_f73db0c4-4e81-45ab-810f-1d805d32b8a0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentForContingentConsiderationLiabilityFinancingActivities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_PaymentForContingentConsiderationLiabilityFinancingActivities_f73db0c4-4e81-45ab-810f-1d805d32b8a0" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_b5ca4ada-5fbc-4350-b0ef-53010b59e8c2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ImpairmentOfIntangibleAssetsFinitelived"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_b5ca4ada-5fbc-4350-b0ef-53010b59e8c2" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireIntangibleAssets_fb090498-1266-4906-9daf-13fb45b28ac3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireIntangibleAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_PaymentsToAcquireIntangibleAssets_fb090498-1266-4906-9daf-13fb45b28ac3" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinitelivedIntangibleAssetsAcquired1_1d152dd3-c0a4-44a3-8b46-cb520770cd10" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinitelivedIntangibleAssetsAcquired1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_FinitelivedIntangibleAssetsAcquired1_1d152dd3-c0a4-44a3-8b46-cb520770cd10" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_ca8be2cf-4d9e-4d78-81a4-bed5f43e2163" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_ca8be2cf-4d9e-4d78-81a4-bed5f43e2163" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NumberOfIntangibleAssetsAcquired_fa3d9b17-6189-4534-8e93-3cc05deab891" xlink:href="anip-20231231.xsd#anip_NumberOfIntangibleAssetsAcquired"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_anip_NumberOfIntangibleAssetsAcquired_fa3d9b17-6189-4534-8e93-3cc05deab891" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireProductiveAssets_3ed81f8b-c7f1-4f1e-9fc3-a62f2cac50c1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireProductiveAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_PaymentsToAcquireProductiveAssets_3ed81f8b-c7f1-4f1e-9fc3-a62f2cac50c1" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_bcf1823e-59b7-4096-8df4-4ef27033ed8b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_bcf1823e-59b7-4096-8df4-4ef27033ed8b" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_78143839-1f50-4270-9368-5b9165e4141e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ResearchAndDevelopmentExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_78143839-1f50-4270-9368-5b9165e4141e" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_IntangibleAssetMeasurementInput_fc025a45-11d5-4795-ac23-c757cf921602" xlink:href="anip-20231231.xsd#anip_IntangibleAssetMeasurementInput"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_anip_IntangibleAssetMeasurementInput_fc025a45-11d5-4795-ac23-c757cf921602" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetAcquisitionConsiderationTransferredContingentConsideration_4ab2ab23-ce40-4ffd-899e-6766e546d30a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetAcquisitionConsiderationTransferredContingentConsideration"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_AssetAcquisitionConsiderationTransferredContingentConsideration_4ab2ab23-ce40-4ffd-899e-6766e546d30a" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForFees_38a1123c-364a-42ca-9e72-a11d66845ba0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsForFees"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_PaymentsForFees_38a1123c-364a-42ca-9e72-a11d66845ba0" xlink:type="arc" order="16"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_6c3d4ac1-98c1-4732-b4b6-67fe7563dae5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_InventoryNet_6c3d4ac1-98c1-4732-b4b6-67fe7563dae5" xlink:type="arc" order="17"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryRawMaterials_d67548de-44a5-4b6f-80e4-f1b9d82876cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryRawMaterials"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_InventoryRawMaterials_d67548de-44a5-4b6f-80e4-f1b9d82876cf" xlink:type="arc" order="18"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherInventoryDemo_9dba1812-5b87-402b-904b-7b6cb0f8cdcd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherInventoryDemo"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_OtherInventoryDemo_9dba1812-5b87-402b-904b-7b6cb0f8cdcd" xlink:type="arc" order="19"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoods_81b3fb35-9c31-4b7c-b3be-619621b281c1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryFinishedGoods"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_17cbebaf-80b0-4c6d-8769-8e9f70b28695" xlink:to="loc_us-gaap_InventoryFinishedGoods_81b3fb35-9c31-4b7c-b3be-619621b281c1" xlink:type="arc" order="20"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/FAIRVALUELevel3Details" xlink:type="simple" xlink:href="anip-20231231.xsd#FAIRVALUELevel3Details"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/FAIRVALUELevel3Details" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_7aecc88f-f0a2-4ca2-8d71-6ccdc9e79815" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_5bc55ff6-3220-40cb-b1ec-8fa5932d3249" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_7aecc88f-f0a2-4ca2-8d71-6ccdc9e79815" xlink:to="loc_us-gaap_StatementTable_5bc55ff6-3220-40cb-b1ec-8fa5932d3249" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeAxis_aa20e983-9776-4b89-ac69-ee66384e5a4c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_5bc55ff6-3220-40cb-b1ec-8fa5932d3249" xlink:to="loc_us-gaap_MeasurementInputTypeAxis_aa20e983-9776-4b89-ac69-ee66384e5a4c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeDomain_aa20e983-9776-4b89-ac69-ee66384e5a4c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MeasurementInputTypeAxis_aa20e983-9776-4b89-ac69-ee66384e5a4c" xlink:to="loc_us-gaap_MeasurementInputTypeDomain_aa20e983-9776-4b89-ac69-ee66384e5a4c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeDomain_eaae060c-6948-461c-8b68-4e4d08da2df4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MeasurementInputTypeAxis_aa20e983-9776-4b89-ac69-ee66384e5a4c" xlink:to="loc_us-gaap_MeasurementInputTypeDomain_eaae060c-6948-461c-8b68-4e4d08da2df4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputDiscountRateMember_eb065f25-d058-45f3-ab77-29234d68638c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputDiscountRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MeasurementInputTypeDomain_eaae060c-6948-461c-8b68-4e4d08da2df4" xlink:to="loc_us-gaap_MeasurementInputDiscountRateMember_eb065f25-d058-45f3-ab77-29234d68638c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_MeasurementInputProbabilityOfPaymentMember_52a61922-c4be-46f6-8ecc-6d11410b0b21" xlink:href="anip-20231231.xsd#anip_MeasurementInputProbabilityOfPaymentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MeasurementInputTypeDomain_eaae060c-6948-461c-8b68-4e4d08da2df4" xlink:to="loc_anip_MeasurementInputProbabilityOfPaymentMember_52a61922-c4be-46f6-8ecc-6d11410b0b21" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_PaymentTypeAxis_71862cc4-9cd0-42ae-87a4-57d1cdc41db8" xlink:href="anip-20231231.xsd#anip_PaymentTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_5bc55ff6-3220-40cb-b1ec-8fa5932d3249" xlink:to="loc_anip_PaymentTypeAxis_71862cc4-9cd0-42ae-87a4-57d1cdc41db8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_PaymentTypeDomain_71862cc4-9cd0-42ae-87a4-57d1cdc41db8_default" xlink:href="anip-20231231.xsd#anip_PaymentTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_anip_PaymentTypeAxis_71862cc4-9cd0-42ae-87a4-57d1cdc41db8" xlink:to="loc_anip_PaymentTypeDomain_71862cc4-9cd0-42ae-87a4-57d1cdc41db8_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_PaymentTypeDomain_a93b7522-638f-4f43-8aea-802054225885" xlink:href="anip-20231231.xsd#anip_PaymentTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_anip_PaymentTypeAxis_71862cc4-9cd0-42ae-87a4-57d1cdc41db8" xlink:to="loc_anip_PaymentTypeDomain_a93b7522-638f-4f43-8aea-802054225885" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ProjectBasedMilestonePaymentsMember_db257be4-5014-4d2c-a736-a6e1a252a32b" xlink:href="anip-20231231.xsd#anip_ProjectBasedMilestonePaymentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_PaymentTypeDomain_a93b7522-638f-4f43-8aea-802054225885" xlink:to="loc_anip_ProjectBasedMilestonePaymentsMember_db257be4-5014-4d2c-a736-a6e1a252a32b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ProductDevelopmentBasedMilestonePaymentsMember_513abc2b-da7d-4ded-825d-390402f8aa8e" xlink:href="anip-20231231.xsd#anip_ProductDevelopmentBasedMilestonePaymentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_PaymentTypeDomain_a93b7522-638f-4f43-8aea-802054225885" xlink:to="loc_anip_ProductDevelopmentBasedMilestonePaymentsMember_513abc2b-da7d-4ded-825d-390402f8aa8e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationTechniqueAxis_a4bbd6a1-8b0d-4160-8ac2-5b30edcc30a0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationTechniqueAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_5bc55ff6-3220-40cb-b1ec-8fa5932d3249" xlink:to="loc_us-gaap_ValuationTechniqueAxis_a4bbd6a1-8b0d-4160-8ac2-5b30edcc30a0" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationTechniqueDomain_a4bbd6a1-8b0d-4160-8ac2-5b30edcc30a0_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationTechniqueDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ValuationTechniqueAxis_a4bbd6a1-8b0d-4160-8ac2-5b30edcc30a0" xlink:to="loc_us-gaap_ValuationTechniqueDomain_a4bbd6a1-8b0d-4160-8ac2-5b30edcc30a0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationTechniqueDomain_33ee5082-dff9-4f1e-9b47-95204154595d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationTechniqueDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ValuationTechniqueAxis_a4bbd6a1-8b0d-4160-8ac2-5b30edcc30a0" xlink:to="loc_us-gaap_ValuationTechniqueDomain_33ee5082-dff9-4f1e-9b47-95204154595d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationTechniqueDiscountedCashFlowMember_76a5af6a-adc1-42d0-ae41-622ab664f3ba" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationTechniqueDiscountedCashFlowMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationTechniqueDomain_33ee5082-dff9-4f1e-9b47-95204154595d" xlink:to="loc_us-gaap_ValuationTechniqueDiscountedCashFlowMember_76a5af6a-adc1-42d0-ae41-622ab664f3ba" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationLiabilityMeasurementInput_3a052199-8642-44a1-8893-28ffcd3fa602" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationContingentConsiderationLiabilityMeasurementInput"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_7aecc88f-f0a2-4ca2-8d71-6ccdc9e79815" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationLiabilityMeasurementInput_3a052199-8642-44a1-8893-28ffcd3fa602" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_bc419911-83b3-456a-9a5b-4c93055dcec9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_7aecc88f-f0a2-4ca2-8d71-6ccdc9e79815" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_bc419911-83b3-456a-9a5b-4c93055dcec9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue_1e10aaaf-185b-494b-85da-d3a45e824189" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_bc419911-83b3-456a-9a5b-4c93055dcec9" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue_1e10aaaf-185b-494b-85da-d3a45e824189" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_FairValueMeasurementWithUnobservableInputsReconciliationMeasurementPeriodAdjustment_b244be7a-1409-4a90-bea0-68b04a301139" xlink:href="anip-20231231.xsd#anip_FairValueMeasurementWithUnobservableInputsReconciliationMeasurementPeriodAdjustment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_bc419911-83b3-456a-9a5b-4c93055dcec9" xlink:to="loc_anip_FairValueMeasurementWithUnobservableInputsReconciliationMeasurementPeriodAdjustment_b244be7a-1409-4a90-bea0-68b04a301139" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySettlements_08524831-1f1f-476f-8b7a-f670f376d114" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySettlements"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_bc419911-83b3-456a-9a5b-4c93055dcec9" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySettlements_08524831-1f1f-476f-8b7a-f670f376d114" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings_f1e75c19-46ac-49d0-b62b-79a7eea17d5a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_bc419911-83b3-456a-9a5b-4c93055dcec9" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings_f1e75c19-46ac-49d0-b62b-79a7eea17d5a" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueRecurringBasisUnobservableInputReconciliationLiabilityGainLossStatementOfIncomeExtensibleList_59b2cde5-4553-44cc-a153-540a27a04937" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueRecurringBasisUnobservableInputReconciliationLiabilityGainLossStatementOfIncomeExtensibleList"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings_f1e75c19-46ac-49d0-b62b-79a7eea17d5a" xlink:to="loc_us-gaap_FairValueRecurringBasisUnobservableInputReconciliationLiabilityGainLossStatementOfIncomeExtensibleList_59b2cde5-4553-44cc-a153-540a27a04937" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue_b9d157e9-f9f4-4e78-86eb-60dde552ee6c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/FAIRVALUEHierarchyDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#FAIRVALUEHierarchyDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/FAIRVALUEHierarchyDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_3ccf17d9-560f-4303-af4a-df44dae47b4f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_911c7b26-eb2c-41d9-9552-a75a718b5fbc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_3ccf17d9-560f-4303-af4a-df44dae47b4f" xlink:to="loc_us-gaap_StatementTable_911c7b26-eb2c-41d9-9552-a75a718b5fbc" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_d5008f90-c1c9-4c82-aab8-658aa52bd49b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_911c7b26-eb2c-41d9-9552-a75a718b5fbc" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_d5008f90-c1c9-4c82-aab8-658aa52bd49b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_d5008f90-c1c9-4c82-aab8-658aa52bd49b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_d5008f90-c1c9-4c82-aab8-658aa52bd49b" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_d5008f90-c1c9-4c82-aab8-658aa52bd49b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_f08b8aba-3cb6-40de-ab1e-37b6fa951ccc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_d5008f90-c1c9-4c82-aab8-658aa52bd49b" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_f08b8aba-3cb6-40de-ab1e-37b6fa951ccc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NovitiumPharmaMember_42e55e50-29b7-40e2-b4cb-c612a873e4dd" xlink:href="anip-20231231.xsd#anip_NovitiumPharmaMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_f08b8aba-3cb6-40de-ab1e-37b6fa951ccc" xlink:to="loc_anip_NovitiumPharmaMember_42e55e50-29b7-40e2-b4cb-c612a873e4dd" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_7384bb11-8bdd-4784-85ef-fa9ea9bcf9f4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_911c7b26-eb2c-41d9-9552-a75a718b5fbc" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_7384bb11-8bdd-4784-85ef-fa9ea9bcf9f4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_7384bb11-8bdd-4784-85ef-fa9ea9bcf9f4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_7384bb11-8bdd-4784-85ef-fa9ea9bcf9f4" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_7384bb11-8bdd-4784-85ef-fa9ea9bcf9f4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_f78f46ed-2675-4c5c-b7fa-2738d4b2f1b8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_7384bb11-8bdd-4784-85ef-fa9ea9bcf9f4" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_f78f46ed-2675-4c5c-b7fa-2738d4b2f1b8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel1Member_39b2103e-479f-43db-ba44-15f1ee7931cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel1Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_f78f46ed-2675-4c5c-b7fa-2738d4b2f1b8" xlink:to="loc_us-gaap_FairValueInputsLevel1Member_39b2103e-479f-43db-ba44-15f1ee7931cf" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_c5fb55ad-3b5d-4014-939d-c9905f3dbaca" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel2Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_f78f46ed-2675-4c5c-b7fa-2738d4b2f1b8" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_c5fb55ad-3b5d-4014-939d-c9905f3dbaca" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_7e62a277-e409-4fe3-b012-87940fd47632" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel3Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_f78f46ed-2675-4c5c-b7fa-2738d4b2f1b8" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_7e62a277-e409-4fe3-b012-87940fd47632" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_437cbf66-6982-40ef-9376-56aa84c9be86" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashAndCashEquivalentsFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_3ccf17d9-560f-4303-af4a-df44dae47b4f" xlink:to="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_437cbf66-6982-40ef-9376-56aa84c9be86" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestRateDerivativeAssetsAtFairValue_33c2635e-bac0-4bb4-82ae-e55886eae5f6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestRateDerivativeAssetsAtFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_3ccf17d9-560f-4303-af4a-df44dae47b4f" xlink:to="loc_us-gaap_InterestRateDerivativeAssetsAtFairValue_33c2635e-bac0-4bb4-82ae-e55886eae5f6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationLiability_826be323-18b0-4126-bbaf-dfa7d85e2bf3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationContingentConsiderationLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_3ccf17d9-560f-4303-af4a-df44dae47b4f" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationLiability_826be323-18b0-4126-bbaf-dfa7d85e2bf3" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/FAIRVALUEAcquiredDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#FAIRVALUEAcquiredDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/FAIRVALUEAcquiredDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_410988b1-703c-4644-9713-59964fdc46fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:to="loc_us-gaap_StatementTable_410988b1-703c-4644-9713-59964fdc46fd" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CounterpartyNameAxis_81c236ca-0ca5-481a-80a9-662a1559b226" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CounterpartyNameAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_410988b1-703c-4644-9713-59964fdc46fd" xlink:to="loc_srt_CounterpartyNameAxis_81c236ca-0ca5-481a-80a9-662a1559b226" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RepurchaseAgreementCounterpartyNameDomain_81c236ca-0ca5-481a-80a9-662a1559b226_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RepurchaseAgreementCounterpartyNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_CounterpartyNameAxis_81c236ca-0ca5-481a-80a9-662a1559b226" xlink:to="loc_srt_RepurchaseAgreementCounterpartyNameDomain_81c236ca-0ca5-481a-80a9-662a1559b226_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RepurchaseAgreementCounterpartyNameDomain_c28c099b-aec4-4bb8-a312-62fc0659067b" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RepurchaseAgreementCounterpartyNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_CounterpartyNameAxis_81c236ca-0ca5-481a-80a9-662a1559b226" xlink:to="loc_srt_RepurchaseAgreementCounterpartyNameDomain_c28c099b-aec4-4bb8-a312-62fc0659067b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_SandozIncMember_347c294f-5bc4-4e87-8409-5eff74f1f158" xlink:href="anip-20231231.xsd#anip_SandozIncMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RepurchaseAgreementCounterpartyNameDomain_c28c099b-aec4-4bb8-a312-62fc0659067b" xlink:to="loc_anip_SandozIncMember_347c294f-5bc4-4e87-8409-5eff74f1f158" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetAcquisitionAxis_e63b334b-6373-4d71-8302-fe33958f2dc4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_410988b1-703c-4644-9713-59964fdc46fd" xlink:to="loc_us-gaap_AssetAcquisitionAxis_e63b334b-6373-4d71-8302-fe33958f2dc4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetAcquisitionDomain_e63b334b-6373-4d71-8302-fe33958f2dc4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetAcquisitionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AssetAcquisitionAxis_e63b334b-6373-4d71-8302-fe33958f2dc4" xlink:to="loc_us-gaap_AssetAcquisitionDomain_e63b334b-6373-4d71-8302-fe33958f2dc4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetAcquisitionDomain_61d81810-9630-46f8-8ddd-32b71dc0b871" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetAcquisitionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AssetAcquisitionAxis_e63b334b-6373-4d71-8302-fe33958f2dc4" xlink:to="loc_us-gaap_AssetAcquisitionDomain_61d81810-9630-46f8-8ddd-32b71dc0b871" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_OakrumPharmaMember_216d3c33-43c2-4909-843b-0a28c017221b" xlink:href="anip-20231231.xsd#anip_OakrumPharmaMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetAcquisitionDomain_61d81810-9630-46f8-8ddd-32b71dc0b871" xlink:to="loc_anip_OakrumPharmaMember_216d3c33-43c2-4909-843b-0a28c017221b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_1850ae27-cf09-4775-b1c7-6f8105ee084a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_410988b1-703c-4644-9713-59964fdc46fd" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_1850ae27-cf09-4775-b1c7-6f8105ee084a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_1850ae27-cf09-4775-b1c7-6f8105ee084a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_1850ae27-cf09-4775-b1c7-6f8105ee084a" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_1850ae27-cf09-4775-b1c7-6f8105ee084a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_7b028c79-97d6-41e5-ae36-fc9ab8f05585" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_1850ae27-cf09-4775-b1c7-6f8105ee084a" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_7b028c79-97d6-41e5-ae36-fc9ab8f05585" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AcquiredAndaIntangibleAssetsMember_16d18a66-d6d0-4b4e-be16-99ff017ba9b5" xlink:href="anip-20231231.xsd#anip_AcquiredAndaIntangibleAssetsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_7b028c79-97d6-41e5-ae36-fc9ab8f05585" xlink:to="loc_anip_AcquiredAndaIntangibleAssetsMember_16d18a66-d6d0-4b4e-be16-99ff017ba9b5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeAxis_d20238c7-e0e2-49f1-bfbc-1da26440b0b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_410988b1-703c-4644-9713-59964fdc46fd" xlink:to="loc_us-gaap_MeasurementInputTypeAxis_d20238c7-e0e2-49f1-bfbc-1da26440b0b4" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeDomain_d20238c7-e0e2-49f1-bfbc-1da26440b0b4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MeasurementInputTypeAxis_d20238c7-e0e2-49f1-bfbc-1da26440b0b4" xlink:to="loc_us-gaap_MeasurementInputTypeDomain_d20238c7-e0e2-49f1-bfbc-1da26440b0b4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeDomain_f37455eb-a185-4659-b469-b19405f91e79" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MeasurementInputTypeAxis_d20238c7-e0e2-49f1-bfbc-1da26440b0b4" xlink:to="loc_us-gaap_MeasurementInputTypeDomain_f37455eb-a185-4659-b469-b19405f91e79" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputDiscountRateMember_7d2885f3-95b8-4de1-9d91-6d667c0b4adf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputDiscountRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MeasurementInputTypeDomain_f37455eb-a185-4659-b469-b19405f91e79" xlink:to="loc_us-gaap_MeasurementInputDiscountRateMember_7d2885f3-95b8-4de1-9d91-6d667c0b4adf" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireProductiveAssets_d8b3e050-a32d-45f3-a62a-e9a121ab7bdd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireProductiveAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:to="loc_us-gaap_PaymentsToAcquireProductiveAssets_d8b3e050-a32d-45f3-a62a-e9a121ab7bdd" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetAcquisitionConsiderationTransferredContingentConsideration_fbc9c25f-4d2c-401d-8b54-4af789d98702" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetAcquisitionConsiderationTransferredContingentConsideration"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:to="loc_us-gaap_AssetAcquisitionConsiderationTransferredContingentConsideration_fbc9c25f-4d2c-401d-8b54-4af789d98702" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForFees_c26c2869-20a5-4d0a-b923-6527f2d96c54" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsForFees"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:to="loc_us-gaap_PaymentsForFees_c26c2869-20a5-4d0a-b923-6527f2d96c54" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_46810a8c-5d00-4ba0-a100-66d0944ae7c1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_46810a8c-5d00-4ba0-a100-66d0944ae7c1" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_92f5f3d8-c41e-4af1-ade0-e16518c41ae4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ResearchAndDevelopmentExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_92f5f3d8-c41e-4af1-ade0-e16518c41ae4" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_IntangibleAssetMeasurementInput_72165c2c-4418-4898-bfe4-04079a9fca91" xlink:href="anip-20231231.xsd#anip_IntangibleAssetMeasurementInput"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:to="loc_anip_IntangibleAssetMeasurementInput_72165c2c-4418-4898-bfe4-04079a9fca91" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_d6f8d649-ae92-4116-8fc0-cc3a355c0bbf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:to="loc_us-gaap_InventoryNet_d6f8d649-ae92-4116-8fc0-cc3a355c0bbf" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryRawMaterials_318c5511-d8ce-49f2-9a91-ab7a2581c845" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryRawMaterials"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:to="loc_us-gaap_InventoryRawMaterials_318c5511-d8ce-49f2-9a91-ab7a2581c845" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherInventoryDemo_f7e93646-bb91-4d41-a8bb-3baa08e962d1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherInventoryDemo"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:to="loc_us-gaap_OtherInventoryDemo_f7e93646-bb91-4d41-a8bb-3baa08e962d1" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoods_bea92e6c-92f7-436c-ad5d-4a27245ec092" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryFinishedGoods"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:to="loc_us-gaap_InventoryFinishedGoods_bea92e6c-92f7-436c-ad5d-4a27245ec092" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_37fc5b03-c8e6-4221-9fd1-d963e8627de0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_37fc5b03-c8e6-4221-9fd1-d963e8627de0" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_68da5d02-412f-41ac-916c-f7e9481b8c91" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ImpairmentOfIntangibleAssetsFinitelived"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_d620eac4-873c-4dcf-a8b4-8b4e41577ecf" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_68da5d02-412f-41ac-916c-f7e9481b8c91" xlink:type="arc" order="11"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/MEZZANINEANDSTOCKHOLDERSEQUITYDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#MEZZANINEANDSTOCKHOLDERSEQUITYDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/MEZZANINEANDSTOCKHOLDERSEQUITYDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_b33482ff-6090-4d11-9423-06dbd170d0c2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_StatementTable_b33482ff-6090-4d11-9423-06dbd170d0c2" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_27013327-4c5a-481e-81a5-9f171853c7c4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_b33482ff-6090-4d11-9423-06dbd170d0c2" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_27013327-4c5a-481e-81a5-9f171853c7c4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_27013327-4c5a-481e-81a5-9f171853c7c4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_27013327-4c5a-481e-81a5-9f171853c7c4" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_27013327-4c5a-481e-81a5-9f171853c7c4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_a36d798b-a0ae-4b9f-96e7-747d46a7b9f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_27013327-4c5a-481e-81a5-9f171853c7c4" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_a36d798b-a0ae-4b9f-96e7-747d46a7b9f3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NovitiumPharmaMember_dace65b7-c717-4b92-afe8-47fbf3e203a0" xlink:href="anip-20231231.xsd#anip_NovitiumPharmaMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_a36d798b-a0ae-4b9f-96e7-747d46a7b9f3" xlink:to="loc_anip_NovitiumPharmaMember_dace65b7-c717-4b92-afe8-47fbf3e203a0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_f2d03ecc-a1cd-4ddd-a580-ed997ddf0500" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_b33482ff-6090-4d11-9423-06dbd170d0c2" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_f2d03ecc-a1cd-4ddd-a580-ed997ddf0500" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_f2d03ecc-a1cd-4ddd-a580-ed997ddf0500_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_f2d03ecc-a1cd-4ddd-a580-ed997ddf0500" xlink:to="loc_us-gaap_EquityComponentDomain_f2d03ecc-a1cd-4ddd-a580-ed997ddf0500_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_86799763-cb8d-4173-9cb8-53c27f15fdb6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_f2d03ecc-a1cd-4ddd-a580-ed997ddf0500" xlink:to="loc_us-gaap_EquityComponentDomain_86799763-cb8d-4173-9cb8-53c27f15fdb6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_736ace1c-f754-438d-bca5-4a7864271196" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_86799763-cb8d-4173-9cb8-53c27f15fdb6" xlink:to="loc_us-gaap_CommonStockMember_736ace1c-f754-438d-bca5-4a7864271196" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ClassCSpecialStockMember_928d6273-8113-4e69-91b3-1800e2320969" xlink:href="anip-20231231.xsd#anip_ClassCSpecialStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_86799763-cb8d-4173-9cb8-53c27f15fdb6" xlink:to="loc_anip_ClassCSpecialStockMember_928d6273-8113-4e69-91b3-1800e2320969" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsidiarySaleOfStockAxis_55cbffbe-68a9-4978-974e-a3bb05c329ea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsidiarySaleOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_b33482ff-6090-4d11-9423-06dbd170d0c2" xlink:to="loc_us-gaap_SubsidiarySaleOfStockAxis_55cbffbe-68a9-4978-974e-a3bb05c329ea" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SaleOfStockNameOfTransactionDomain_55cbffbe-68a9-4978-974e-a3bb05c329ea_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SaleOfStockNameOfTransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsidiarySaleOfStockAxis_55cbffbe-68a9-4978-974e-a3bb05c329ea" xlink:to="loc_us-gaap_SaleOfStockNameOfTransactionDomain_55cbffbe-68a9-4978-974e-a3bb05c329ea_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SaleOfStockNameOfTransactionDomain_b1d42528-d421-4e21-9375-53acda431352" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SaleOfStockNameOfTransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsidiarySaleOfStockAxis_55cbffbe-68a9-4978-974e-a3bb05c329ea" xlink:to="loc_us-gaap_SaleOfStockNameOfTransactionDomain_b1d42528-d421-4e21-9375-53acda431352" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_PrivateInvestmentInPublicEquityMember_d50112e6-4bb2-4251-924e-a1f602002a4b" xlink:href="anip-20231231.xsd#anip_PrivateInvestmentInPublicEquityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SaleOfStockNameOfTransactionDomain_b1d42528-d421-4e21-9375-53acda431352" xlink:to="loc_anip_PrivateInvestmentInPublicEquityMember_d50112e6-4bb2-4251-924e-a1f602002a4b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_PublicOfferingMember_27c7712d-0504-4d9c-a8c4-e0af51b86143" xlink:href="anip-20231231.xsd#anip_PublicOfferingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SaleOfStockNameOfTransactionDomain_b1d42528-d421-4e21-9375-53acda431352" xlink:to="loc_anip_PublicOfferingMember_27c7712d-0504-4d9c-a8c4-e0af51b86143" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_8790e247-d5d1-4f2f-a71c-cd6fee23897c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_b33482ff-6090-4d11-9423-06dbd170d0c2" xlink:to="loc_us-gaap_StatementClassOfStockAxis_8790e247-d5d1-4f2f-a71c-cd6fee23897c" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_8790e247-d5d1-4f2f-a71c-cd6fee23897c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_8790e247-d5d1-4f2f-a71c-cd6fee23897c" xlink:to="loc_us-gaap_ClassOfStockDomain_8790e247-d5d1-4f2f-a71c-cd6fee23897c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_303b495c-b251-4515-a16f-2f443615ae2a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_8790e247-d5d1-4f2f-a71c-cd6fee23897c" xlink:to="loc_us-gaap_ClassOfStockDomain_303b495c-b251-4515-a16f-2f443615ae2a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConvertiblePreferredStockMember_a3157b90-1e2b-4af8-a314-3f8accf3b8ad" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConvertiblePreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_303b495c-b251-4515-a16f-2f443615ae2a" xlink:to="loc_us-gaap_ConvertiblePreferredStockMember_a3157b90-1e2b-4af8-a314-3f8accf3b8ad" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_427e900b-4602-46ef-957b-eca64178679f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_303b495c-b251-4515-a16f-2f443615ae2a" xlink:to="loc_us-gaap_CommonStockMember_427e900b-4602-46ef-957b-eca64178679f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesAuthorized_53a93cfa-c2c5-425e-a0c8-435eab867a9e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesAuthorized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_CommonStockSharesAuthorized_53a93cfa-c2c5-425e-a0c8-435eab867a9e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockParOrStatedValuePerShare_ac8875cf-3b35-45be-86c9-881394647b37" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockParOrStatedValuePerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_CommonStockParOrStatedValuePerShare_ac8875cf-3b35-45be-86c9-881394647b37" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockSharesAuthorized_3cc3b12f-1e1f-415b-9b95-343c20d163c9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockSharesAuthorized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_PreferredStockSharesAuthorized_3cc3b12f-1e1f-415b-9b95-343c20d163c9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockParOrStatedValuePerShare_a2966779-5815-4333-af7d-e4b48fd71f96" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockParOrStatedValuePerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_PreferredStockParOrStatedValuePerShare_a2966779-5815-4333-af7d-e4b48fd71f96" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesIssued_2c2f3181-3aa6-4784-a55a-8dcd6a58df22" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_CommonStockSharesIssued_2c2f3181-3aa6-4784-a55a-8dcd6a58df22" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_3761c383-6ced-4dcb-97b9-564db0f46828" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_3761c383-6ced-4dcb-97b9-564db0f46828" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SaleOfStockNumberOfSharesIssuedInTransaction_f640000a-113f-48c4-b5b6-750ac47c1831" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SaleOfStockNumberOfSharesIssuedInTransaction"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_SaleOfStockNumberOfSharesIssuedInTransaction_f640000a-113f-48c4-b5b6-750ac47c1831" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SaleOfStockConsiderationReceivedOnTransaction_ec5bf032-cb0d-41f7-bbc6-df4aba44e54c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SaleOfStockConsiderationReceivedOnTransaction"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_SaleOfStockConsiderationReceivedOnTransaction_ec5bf032-cb0d-41f7-bbc6-df4aba44e54c" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_48d14fbe-4746-4a37-a14d-862642099d52" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodSharesNewIssues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_48d14fbe-4746-4a37-a14d-862642099d52" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionEquityInterestsIssuedOrIssuableNumberOfSharesIssued_faf30ff6-8158-44b4-ba22-3b3e167f5145" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionEquityInterestsIssuedOrIssuableNumberOfSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_BusinessAcquisitionEquityInterestsIssuedOrIssuableNumberOfSharesIssued_faf30ff6-8158-44b4-ba22-3b3e167f5145" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CommonStockNumberOfVotesPerShare_628ae5c9-9d6b-420a-92e7-23a26497ae41" xlink:href="anip-20231231.xsd#anip_CommonStockNumberOfVotesPerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_anip_CommonStockNumberOfVotesPerShare_628ae5c9-9d6b-420a-92e7-23a26497ae41" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CommonStockConvertibleConversionRatio_6258f34d-05ee-4d34-95b8-b98aa230a31e" xlink:href="anip-20231231.xsd#anip_CommonStockConvertibleConversionRatio"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_anip_CommonStockConvertibleConversionRatio_6258f34d-05ee-4d34-95b8-b98aa230a31e" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CommonStockConversionPrice_fdc56324-2b31-4525-974c-c7b91de011d0" xlink:href="anip-20231231.xsd#anip_CommonStockConversionPrice"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_anip_CommonStockConversionPrice_fdc56324-2b31-4525-974c-c7b91de011d0" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_TemporaryEquityStockIssuedDuringPeriodSharesNewIssues_0ab17b83-bcd0-46da-91f3-5d5d32340ae8" xlink:href="anip-20231231.xsd#anip_TemporaryEquityStockIssuedDuringPeriodSharesNewIssues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_anip_TemporaryEquityStockIssuedDuringPeriodSharesNewIssues_0ab17b83-bcd0-46da-91f3-5d5d32340ae8" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquityRedemptionPricePerShare_59ae59fd-b3b1-4a1c-8654-7247cb670db6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquityRedemptionPricePerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_TemporaryEquityRedemptionPricePerShare_59ae59fd-b3b1-4a1c-8654-7247cb670db6" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues_fef2fc7e-5432-4154-b63a-ec76e105a417" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues_fef2fc7e-5432-4154-b63a-ec76e105a417" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfStockIssuanceCosts_972a7314-409e-4287-ae7b-fb97d5435a67" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsOfStockIssuanceCosts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_PaymentsOfStockIssuanceCosts_972a7314-409e-4287-ae7b-fb97d5435a67" xlink:type="arc" order="16"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockDividendRatePercentage_0a9820fe-d301-4065-b744-291fec196c79" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockDividendRatePercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_PreferredStockDividendRatePercentage_0a9820fe-d301-4065-b744-291fec196c79" xlink:type="arc" order="17"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockConvertibleConversionPrice_48ed8f08-be08-422a-b89e-c7c0568c5c3b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockConvertibleConversionPrice"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_PreferredStockConvertibleConversionPrice_48ed8f08-be08-422a-b89e-c7c0568c5c3b" xlink:type="arc" order="18"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ThresholdNumberOfTradingDays_b536a1ab-3880-4aa1-932e-a16e9ab64f16" xlink:href="anip-20231231.xsd#anip_ThresholdNumberOfTradingDays"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_anip_ThresholdNumberOfTradingDays_b536a1ab-3880-4aa1-932e-a16e9ab64f16" xlink:type="arc" order="19"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NumberOfConsecutiveTradingDays_137b30d5-f92e-454e-9ecc-f755ad5e7ad1" xlink:href="anip-20231231.xsd#anip_NumberOfConsecutiveTradingDays"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_anip_NumberOfConsecutiveTradingDays_137b30d5-f92e-454e-9ecc-f755ad5e7ad1" xlink:type="arc" order="20"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_PercentageOfConversionPrice_a64ce7ee-cd6e-4c78-b456-b661d403b4bc" xlink:href="anip-20231231.xsd#anip_PercentageOfConversionPrice"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_anip_PercentageOfConversionPrice_a64ce7ee-cd6e-4c78-b456-b661d403b4bc" xlink:type="arc" order="21"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockConvertibleSharesIssuable_3ffd5024-1813-453d-b6f2-1442f69a3b85" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockConvertibleSharesIssuable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_PreferredStockConvertibleSharesIssuable_3ffd5024-1813-453d-b6f2-1442f69a3b85" xlink:type="arc" order="22"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquitySharesOutstanding_7e5c99f1-2a08-4b79-b741-d3da8030c96d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquitySharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_us-gaap_TemporaryEquitySharesOutstanding_7e5c99f1-2a08-4b79-b741-d3da8030c96d" xlink:type="arc" order="23"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_PreferredStockConvertibleMinimumPeriodOfConversion_a7817aab-8d42-4464-83d5-96910c9acca1" xlink:href="anip-20231231.xsd#anip_PreferredStockConvertibleMinimumPeriodOfConversion"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3490de2-f44a-4d0c-95df-fa377058cc48" xlink:to="loc_anip_PreferredStockConvertibleMinimumPeriodOfConversion_a7817aab-8d42-4464-83d5-96910c9acca1" xlink:type="arc" order="24"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/STOCKBASEDCOMPENSATIONNarrativeDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#STOCKBASEDCOMPENSATIONNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/STOCKBASEDCOMPENSATIONNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_017f4c74-76fa-4a78-ba58-d7a351e93b9b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_017f4c74-76fa-4a78-ba58-d7a351e93b9b" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanNameAxis_695f0691-0713-4508-b2bc-51015627c4df" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanNameAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_017f4c74-76fa-4a78-ba58-d7a351e93b9b" xlink:to="loc_us-gaap_PlanNameAxis_695f0691-0713-4508-b2bc-51015627c4df" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanNameDomain_695f0691-0713-4508-b2bc-51015627c4df_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_695f0691-0713-4508-b2bc-51015627c4df" xlink:to="loc_us-gaap_PlanNameDomain_695f0691-0713-4508-b2bc-51015627c4df_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanNameDomain_e4aa04ad-06c7-4839-bf36-12d3660fc9a6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_695f0691-0713-4508-b2bc-51015627c4df" xlink:to="loc_us-gaap_PlanNameDomain_e4aa04ad-06c7-4839-bf36-12d3660fc9a6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_EmployeeStockPurchasePlanTwoThousandAndSixteenMember_b95f1af3-cc93-481d-b683-362b31dfff6b" xlink:href="anip-20231231.xsd#anip_EmployeeStockPurchasePlanTwoThousandAndSixteenMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_e4aa04ad-06c7-4839-bf36-12d3660fc9a6" xlink:to="loc_anip_EmployeeStockPurchasePlanTwoThousandAndSixteenMember_b95f1af3-cc93-481d-b683-362b31dfff6b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_StockIncentivePlanMember_7fdf4dc3-6479-44f1-924d-1f460681c31b" xlink:href="anip-20231231.xsd#anip_StockIncentivePlanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_e4aa04ad-06c7-4839-bf36-12d3660fc9a6" xlink:to="loc_anip_StockIncentivePlanMember_7fdf4dc3-6479-44f1-924d-1f460681c31b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_TitleOfIndividualAxis_2013687a-f0de-4198-9f7d-89623a262fb5" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_TitleOfIndividualAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_017f4c74-76fa-4a78-ba58-d7a351e93b9b" xlink:to="loc_srt_TitleOfIndividualAxis_2013687a-f0de-4198-9f7d-89623a262fb5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_TitleOfIndividualWithRelationshipToEntityDomain_2013687a-f0de-4198-9f7d-89623a262fb5_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_TitleOfIndividualWithRelationshipToEntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_TitleOfIndividualAxis_2013687a-f0de-4198-9f7d-89623a262fb5" xlink:to="loc_srt_TitleOfIndividualWithRelationshipToEntityDomain_2013687a-f0de-4198-9f7d-89623a262fb5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_TitleOfIndividualWithRelationshipToEntityDomain_f305c497-89d4-4113-8c68-699e284a3a3c" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_TitleOfIndividualWithRelationshipToEntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_TitleOfIndividualAxis_2013687a-f0de-4198-9f7d-89623a262fb5" xlink:to="loc_srt_TitleOfIndividualWithRelationshipToEntityDomain_f305c497-89d4-4113-8c68-699e284a3a3c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_EmployeesAndConsultantsMember_4fa79b6a-62d0-4337-acba-a07b204eeea9" xlink:href="anip-20231231.xsd#anip_EmployeesAndConsultantsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_TitleOfIndividualWithRelationshipToEntityDomain_f305c497-89d4-4113-8c68-699e284a3a3c" xlink:to="loc_anip_EmployeesAndConsultantsMember_4fa79b6a-62d0-4337-acba-a07b204eeea9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NonEmployeeDirectorStockOptionMember_6ae4d408-b534-4967-a419-c8b45987046b" xlink:href="anip-20231231.xsd#anip_NonEmployeeDirectorStockOptionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_TitleOfIndividualWithRelationshipToEntityDomain_f305c497-89d4-4113-8c68-699e284a3a3c" xlink:to="loc_anip_NonEmployeeDirectorStockOptionMember_6ae4d408-b534-4967-a419-c8b45987046b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_2795148d-591f-4a38-b095-714472f0942f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_017f4c74-76fa-4a78-ba58-d7a351e93b9b" xlink:to="loc_us-gaap_AwardTypeAxis_2795148d-591f-4a38-b095-714472f0942f" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_2795148d-591f-4a38-b095-714472f0942f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_2795148d-591f-4a38-b095-714472f0942f" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_2795148d-591f-4a38-b095-714472f0942f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_d68198c6-5102-46ed-a27f-d3dedfbb776f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_2795148d-591f-4a38-b095-714472f0942f" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_d68198c6-5102-46ed-a27f-d3dedfbb776f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeStockOptionMember_2d16207a-21e9-4927-8616-1be7f45e0b5a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeStockOptionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_d68198c6-5102-46ed-a27f-d3dedfbb776f" xlink:to="loc_us-gaap_EmployeeStockOptionMember_2d16207a-21e9-4927-8616-1be7f45e0b5a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedStockMember_64a82ac4-b6b6-4a15-a983-aa7e78c50b85" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestrictedStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_d68198c6-5102-46ed-a27f-d3dedfbb776f" xlink:to="loc_us-gaap_RestrictedStockMember_64a82ac4-b6b6-4a15-a983-aa7e78c50b85" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_PerformanceBasedRestrictedStockUnitsMember_5b4c613e-9527-49be-943b-4f82958ca4ce" xlink:href="anip-20231231.xsd#anip_PerformanceBasedRestrictedStockUnitsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_d68198c6-5102-46ed-a27f-d3dedfbb776f" xlink:to="loc_anip_PerformanceBasedRestrictedStockUnitsMember_5b4c613e-9527-49be-943b-4f82958ca4ce" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_MarketPerformanceBasedRestrictedStockUnitsMember_65e922d0-bf86-4071-aeac-8c306312a01d" xlink:href="anip-20231231.xsd#anip_MarketPerformanceBasedRestrictedStockUnitsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_d68198c6-5102-46ed-a27f-d3dedfbb776f" xlink:to="loc_anip_MarketPerformanceBasedRestrictedStockUnitsMember_65e922d0-bf86-4071-aeac-8c306312a01d" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PerformanceSharesMember_9a8d1321-06c9-4f45-bdb3-b98d48ac26f0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PerformanceSharesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_d68198c6-5102-46ed-a27f-d3dedfbb776f" xlink:to="loc_us-gaap_PerformanceSharesMember_9a8d1321-06c9-4f45-bdb3-b98d48ac26f0" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_c5dd6494-fcc2-41d7-8702-584b09085fd5" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_017f4c74-76fa-4a78-ba58-d7a351e93b9b" xlink:to="loc_srt_RangeAxis_c5dd6494-fcc2-41d7-8702-584b09085fd5" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_c5dd6494-fcc2-41d7-8702-584b09085fd5_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_c5dd6494-fcc2-41d7-8702-584b09085fd5" xlink:to="loc_srt_RangeMember_c5dd6494-fcc2-41d7-8702-584b09085fd5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_1b75d1e8-b9c4-4f5b-840b-23c73250a70d" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_c5dd6494-fcc2-41d7-8702-584b09085fd5" xlink:to="loc_srt_RangeMember_1b75d1e8-b9c4-4f5b-840b-23c73250a70d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_3dd146e7-34cb-4d76-a88e-d0e79fb05bb9" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_1b75d1e8-b9c4-4f5b-840b-23c73250a70d" xlink:to="loc_srt_MinimumMember_3dd146e7-34cb-4d76-a88e-d0e79fb05bb9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_60535671-9ce5-4b65-8f44-9381e5b40dca" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_1b75d1e8-b9c4-4f5b-840b-23c73250a70d" xlink:to="loc_srt_MaximumMember_60535671-9ce5-4b65-8f44-9381e5b40dca" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant_a01f83a9-da99-4774-841c-be14fb2a766e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant_a01f83a9-da99-4774-841c-be14fb2a766e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardDiscountFromMarketPricePurchaseDate_c87c4143-6cac-4617-bb52-2f301dca0320" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardDiscountFromMarketPricePurchaseDate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardDiscountFromMarketPricePurchaseDate_c87c4143-6cac-4617-bb52-2f301dca0320" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardSharesIssuedInPeriod_1f80d0b0-8cb0-43cb-8f03-707ed79028c4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardSharesIssuedInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardSharesIssuedInPeriod_1f80d0b0-8cb0-43cb-8f03-707ed79028c4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfAdditionalSharesAuthorized_f58ffc6e-a9c7-4acb-88d5-b65212455fa7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfAdditionalSharesAuthorized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfAdditionalSharesAuthorized_f58ffc6e-a9c7-4acb-88d5-b65212455fa7" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense_d02e942c-e2ad-451d-8f86-e798965518b8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense_d02e942c-e2ad-451d-8f86-e798965518b8" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_fa013753-7823-4637-93c9-e0056ee0cc32" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_fa013753-7823-4637-93c9-e0056ee0cc32" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_61d3239a-2176-42ea-a6f0-60b4118824ce" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_61d3239a-2176-42ea-a6f0-60b4118824ce" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_dbbc08e6-dbd2-46b9-8282-5b447409cf27" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_dbbc08e6-dbd2-46b9-8282-5b447409cf27" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions_130a475c-ee78-4446-967c-effa9eaac1fb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions_130a475c-ee78-4446-967c-effa9eaac1fb" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_f38b3825-0585-40b1-88a2-8ff822d3f590" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_f38b3825-0585-40b1-88a2-8ff822d3f590" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockOptionsExercised_132f415e-4ef4-40b3-ad71-3a06bbe276be" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_132f415e-4ef4-40b3-ad71-3a06bbe276be" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromExerciseOfStockOptions_59d754a9-54ab-4f7b-b4f8-692fcde86169" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromExerciseOfStockOptions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromExerciseOfStockOptions_59d754a9-54ab-4f7b-b4f8-692fcde86169" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions_12b565ab-cdce-412d-b7ba-90567269419c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions_12b565ab-cdce-412d-b7ba-90567269419c" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1_ebc5f55a-b1a4-40aa-832b-475479e82707" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1_ebc5f55a-b1a4-40aa-832b-475479e82707" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPercentageOfAwards_448a05ac-ead4-49ed-b4d1-81fa3aac11f7" xlink:href="anip-20231231.xsd#anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPercentageOfAwards"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPercentageOfAwards_448a05ac-ead4-49ed-b4d1-81fa3aac11f7" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsMaximumPotentialToVestPercentage_a7fdab3b-d1db-4304-8b86-0351f7eb3a0a" xlink:href="anip-20231231.xsd#anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsMaximumPotentialToVestPercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsMaximumPotentialToVestPercentage_a7fdab3b-d1db-4304-8b86-0351f7eb3a0a" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsMaximumPotentialToVestShares_c9d59f2e-e72d-4b4b-b97c-b92c0a8f1b43" xlink:href="anip-20231231.xsd#anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsMaximumPotentialToVestShares"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsMaximumPotentialToVestShares_c9d59f2e-e72d-4b4b-b97c-b92c0a8f1b43" xlink:type="arc" order="16"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_9dd66a13-7a5c-4b1b-ae2b-0eddfce6d44c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_9dd66a13-7a5c-4b1b-ae2b-0eddfce6d44c" xlink:type="arc" order="17"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardEstimateNumberOfSharesPercentage_fb9d4d67-79f4-4272-825c-906ade35837e" xlink:href="anip-20231231.xsd#anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardEstimateNumberOfSharesPercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardEstimateNumberOfSharesPercentage_fb9d4d67-79f4-4272-825c-906ade35837e" xlink:type="arc" order="18"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_f384a5b3-917f-407a-b825-6851542c42fc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_ec73bcce-bcfd-48ae-902b-b1db98fa1bf0" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_f384a5b3-917f-407a-b825-6851542c42fc" xlink:type="arc" order="19"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/STOCKBASEDCOMPENSATIONExpenseDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#STOCKBASEDCOMPENSATIONExpenseDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/STOCKBASEDCOMPENSATIONExpenseDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_b0bb67b7-34cb-4cfd-8d31-236f42ca962d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_c2214f17-26a2-497f-919b-c3fec6b80d45" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_b0bb67b7-34cb-4cfd-8d31-236f42ca962d" xlink:to="loc_us-gaap_StatementTable_c2214f17-26a2-497f-919b-c3fec6b80d45" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_58436893-6dfb-4a96-a80e-2b3bab0a03d6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_c2214f17-26a2-497f-919b-c3fec6b80d45" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_58436893-6dfb-4a96-a80e-2b3bab0a03d6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_58436893-6dfb-4a96-a80e-2b3bab0a03d6_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_58436893-6dfb-4a96-a80e-2b3bab0a03d6" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_58436893-6dfb-4a96-a80e-2b3bab0a03d6_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_6be02e33-825c-4a4d-ad46-ea3f24ac1e89" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_58436893-6dfb-4a96-a80e-2b3bab0a03d6" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_6be02e33-825c-4a4d-ad46-ea3f24ac1e89" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_95369945-e04d-41fc-87ff-15d50dccf35d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SellingGeneralAndAdministrativeExpensesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_6be02e33-825c-4a4d-ad46-ea3f24ac1e89" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_95369945-e04d-41fc-87ff-15d50dccf35d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfSalesMember_2c772dbd-b1e0-411c-a22a-1c80f67839aa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CostOfSalesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_6be02e33-825c-4a4d-ad46-ea3f24ac1e89" xlink:to="loc_us-gaap_CostOfSalesMember_2c772dbd-b1e0-411c-a22a-1c80f67839aa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpenseMember_4478bc92-29e7-468f-b743-5e659c7207e2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ResearchAndDevelopmentExpenseMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_6be02e33-825c-4a4d-ad46-ea3f24ac1e89" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpenseMember_4478bc92-29e7-468f-b743-5e659c7207e2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanNameAxis_b57146c2-d03e-4a2f-a90c-4de0106b176a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanNameAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_c2214f17-26a2-497f-919b-c3fec6b80d45" xlink:to="loc_us-gaap_PlanNameAxis_b57146c2-d03e-4a2f-a90c-4de0106b176a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanNameDomain_b57146c2-d03e-4a2f-a90c-4de0106b176a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_b57146c2-d03e-4a2f-a90c-4de0106b176a" xlink:to="loc_us-gaap_PlanNameDomain_b57146c2-d03e-4a2f-a90c-4de0106b176a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanNameDomain_89f09d77-df7b-4355-b6a4-afd393578e26" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_b57146c2-d03e-4a2f-a90c-4de0106b176a" xlink:to="loc_us-gaap_PlanNameDomain_89f09d77-df7b-4355-b6a4-afd393578e26" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_EmployeeStockPurchasePlanTwoThousandAndSixteenMember_cc5ed14b-d590-4354-b6b0-a79d1cbc57e9" xlink:href="anip-20231231.xsd#anip_EmployeeStockPurchasePlanTwoThousandAndSixteenMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_89f09d77-df7b-4355-b6a4-afd393578e26" xlink:to="loc_anip_EmployeeStockPurchasePlanTwoThousandAndSixteenMember_cc5ed14b-d590-4354-b6b0-a79d1cbc57e9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_StockIncentivePlanMember_b52b139f-b775-4bfe-a086-899307e5fb7f" xlink:href="anip-20231231.xsd#anip_StockIncentivePlanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_89f09d77-df7b-4355-b6a4-afd393578e26" xlink:to="loc_anip_StockIncentivePlanMember_b52b139f-b775-4bfe-a086-899307e5fb7f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AllocatedShareBasedCompensationExpense_c7d01146-664f-45e2-9f33-0b5061bf1ac5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AllocatedShareBasedCompensationExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_b0bb67b7-34cb-4cfd-8d31-236f42ca962d" xlink:to="loc_us-gaap_AllocatedShareBasedCompensationExpense_c7d01146-664f-45e2-9f33-0b5061bf1ac5" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/STOCKBASEDCOMPENSATIONFairvalueoptionsDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#STOCKBASEDCOMPENSATIONFairvalueoptionsDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/STOCKBASEDCOMPENSATIONFairvalueoptionsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_63778284-7b15-4dad-a1b1-f28e6afb6a27" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_9596001c-67a1-4be2-bdf4-e3df3e231590" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_63778284-7b15-4dad-a1b1-f28e6afb6a27" xlink:to="loc_us-gaap_StatementTable_9596001c-67a1-4be2-bdf4-e3df3e231590" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_9feff8c3-5203-4353-9b39-8b0c241115b8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_9596001c-67a1-4be2-bdf4-e3df3e231590" xlink:to="loc_us-gaap_AwardTypeAxis_9feff8c3-5203-4353-9b39-8b0c241115b8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_9feff8c3-5203-4353-9b39-8b0c241115b8_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_9feff8c3-5203-4353-9b39-8b0c241115b8" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_9feff8c3-5203-4353-9b39-8b0c241115b8_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6420be4d-cd4e-4a02-9081-38ec2c8b95cb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_9feff8c3-5203-4353-9b39-8b0c241115b8" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6420be4d-cd4e-4a02-9081-38ec2c8b95cb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeStockOptionMember_37b66040-b43e-4c4e-8a25-597ab1f5f879" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeStockOptionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6420be4d-cd4e-4a02-9081-38ec2c8b95cb" xlink:to="loc_us-gaap_EmployeeStockOptionMember_37b66040-b43e-4c4e-8a25-597ab1f5f879" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_db1cd633-7da7-4d2a-bb4a-ec343e585620" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_9596001c-67a1-4be2-bdf4-e3df3e231590" xlink:to="loc_srt_RangeAxis_db1cd633-7da7-4d2a-bb4a-ec343e585620" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_db1cd633-7da7-4d2a-bb4a-ec343e585620_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_db1cd633-7da7-4d2a-bb4a-ec343e585620" xlink:to="loc_srt_RangeMember_db1cd633-7da7-4d2a-bb4a-ec343e585620_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_2bcc4351-f572-4150-a910-04c66f43ae97" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_db1cd633-7da7-4d2a-bb4a-ec343e585620" xlink:to="loc_srt_RangeMember_2bcc4351-f572-4150-a910-04c66f43ae97" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_6890aca7-0525-4d38-9362-523bf51b8780" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_2bcc4351-f572-4150-a910-04c66f43ae97" xlink:to="loc_srt_MinimumMember_6890aca7-0525-4d38-9362-523bf51b8780" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_c472213a-0ed6-46dd-8a40-20b0d2e61bdc" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_2bcc4351-f572-4150-a910-04c66f43ae97" xlink:to="loc_srt_MaximumMember_c472213a-0ed6-46dd-8a40-20b0d2e61bdc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1_90ebd01e-bd7e-4b27-bd76-06b1b7bd49a1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_63778284-7b15-4dad-a1b1-f28e6afb6a27" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1_90ebd01e-bd7e-4b27-bd76-06b1b7bd49a1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate_3d973d1c-6ea2-4d24-9d7e-3832e7188f55" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_63778284-7b15-4dad-a1b1-f28e6afb6a27" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate_3d973d1c-6ea2-4d24-9d7e-3832e7188f55" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate_b5441172-c38b-4c60-8a65-08137813188a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_63778284-7b15-4dad-a1b1-f28e6afb6a27" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate_b5441172-c38b-4c60-8a65-08137813188a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_aa5fef67-01da-4fae-a264-1daf29f6a9f4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_63778284-7b15-4dad-a1b1-f28e6afb6a27" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_aa5fef67-01da-4fae-a264-1daf29f6a9f4" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/STOCKBASEDCOMPENSATIONStockoptionactivityDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#STOCKBASEDCOMPENSATIONStockoptionactivityDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/STOCKBASEDCOMPENSATIONStockoptionactivityDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_91125896-87ae-4a7f-81d1-4bbf1671d2d3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_2bd9eb10-2e91-4e08-83af-0ad1ea6e4d9a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_91125896-87ae-4a7f-81d1-4bbf1671d2d3" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_2bd9eb10-2e91-4e08-83af-0ad1ea6e4d9a" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_35929fb6-229a-40bf-9074-fc3c1322e1fb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_2bd9eb10-2e91-4e08-83af-0ad1ea6e4d9a" xlink:to="loc_us-gaap_AwardTypeAxis_35929fb6-229a-40bf-9074-fc3c1322e1fb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_35929fb6-229a-40bf-9074-fc3c1322e1fb_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_35929fb6-229a-40bf-9074-fc3c1322e1fb" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_35929fb6-229a-40bf-9074-fc3c1322e1fb_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0b21c412-49a7-4836-8b4c-91efa37054a6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_35929fb6-229a-40bf-9074-fc3c1322e1fb" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0b21c412-49a7-4836-8b4c-91efa37054a6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeStockOptionMember_0c8cee4f-522c-44c2-821a-7738e3acb916" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeStockOptionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0b21c412-49a7-4836-8b4c-91efa37054a6" xlink:to="loc_us-gaap_EmployeeStockOptionMember_0c8cee4f-522c-44c2-821a-7738e3acb916" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_06dbc4c5-778c-4240-a354-8709fc0b515f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_91125896-87ae-4a7f-81d1-4bbf1671d2d3" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_06dbc4c5-778c-4240-a354-8709fc0b515f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber_81f57c9e-ce07-4cce-bf63-9069a5d006c3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_06dbc4c5-778c-4240-a354-8709fc0b515f" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber_81f57c9e-ce07-4cce-bf63-9069a5d006c3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross_98a9eb93-ab87-4b32-be45-38f5125ef8d2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_06dbc4c5-778c-4240-a354-8709fc0b515f" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross_98a9eb93-ab87-4b32-be45-38f5125ef8d2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_b8e7b2d7-9d9e-4e92-aa26-9b4003fae291" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_06dbc4c5-778c-4240-a354-8709fc0b515f" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_b8e7b2d7-9d9e-4e92-aa26-9b4003fae291" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresInPeriod_e67d2ccb-0915-4e02-b58c-9ec3fe8414d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_06dbc4c5-778c-4240-a354-8709fc0b515f" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresInPeriod_e67d2ccb-0915-4e02-b58c-9ec3fe8414d4" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExpirationsInPeriod_e21855a9-1ac1-4d53-b6e9-1be639f62728" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExpirationsInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_06dbc4c5-778c-4240-a354-8709fc0b515f" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExpirationsInPeriod_e21855a9-1ac1-4d53-b6e9-1be639f62728" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber_bba05363-31b9-42c4-9620-277704f08176" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber_777787a5-deeb-4da6-a012-978ce7b25947" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_91125896-87ae-4a7f-81d1-4bbf1671d2d3" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber_777787a5-deeb-4da6-a012-978ce7b25947" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_0381fc7c-42c5-47ab-a449-f043b22e0f96" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_91125896-87ae-4a7f-81d1-4bbf1671d2d3" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_0381fc7c-42c5-47ab-a449-f043b22e0f96" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice_0471fd21-fb86-483b-a61b-f25c5c9fb21e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_0381fc7c-42c5-47ab-a449-f043b22e0f96" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice_0471fd21-fb86-483b-a61b-f25c5c9fb21e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice_fe6208a2-0d58-46bb-a204-54ef0fe8c741" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_0381fc7c-42c5-47ab-a449-f043b22e0f96" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice_fe6208a2-0d58-46bb-a204-54ef0fe8c741" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice_58171a21-c75b-4aa2-b0e3-8692f611f01c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_0381fc7c-42c5-47ab-a449-f043b22e0f96" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice_58171a21-c75b-4aa2-b0e3-8692f611f01c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsForfeituresInPeriodWeightedAverageExercisePrice_e3bf8349-3d13-4dae-bee5-4b585297b2d7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsForfeituresInPeriodWeightedAverageExercisePrice"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_0381fc7c-42c5-47ab-a449-f043b22e0f96" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsForfeituresInPeriodWeightedAverageExercisePrice_e3bf8349-3d13-4dae-bee5-4b585297b2d7" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExpirationsInPeriodWeightedAverageExercisePrice_9118bb85-230c-49b2-a285-d84c822b5cb9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExpirationsInPeriodWeightedAverageExercisePrice"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_0381fc7c-42c5-47ab-a449-f043b22e0f96" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExpirationsInPeriodWeightedAverageExercisePrice_9118bb85-230c-49b2-a285-d84c822b5cb9" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice_22811952-63a8-42c0-abc6-a090a1ae1ee8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageExercisePrice_a40eb7b3-3ae7-487a-aec0-900e7a3a9640" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageExercisePrice"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_91125896-87ae-4a7f-81d1-4bbf1671d2d3" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageExercisePrice_a40eb7b3-3ae7-487a-aec0-900e7a3a9640" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValueAbstract_685d8a73-02f5-4a9d-a3a4-b14f3e581b1c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValueAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_91125896-87ae-4a7f-81d1-4bbf1671d2d3" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValueAbstract_685d8a73-02f5-4a9d-a3a4-b14f3e581b1c" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_244c10d2-bfab-43f4-8263-fd050711a3ea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValueAbstract_685d8a73-02f5-4a9d-a3a4-b14f3e581b1c" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_244c10d2-bfab-43f4-8263-fd050711a3ea" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsWeightedAverageRemainingContractualTermAbstract_a12cbb72-93af-4633-8e68-9d9bdb2c6a7b" xlink:href="anip-20231231.xsd#anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsWeightedAverageRemainingContractualTermAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_91125896-87ae-4a7f-81d1-4bbf1671d2d3" xlink:to="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsWeightedAverageRemainingContractualTermAbstract_a12cbb72-93af-4633-8e68-9d9bdb2c6a7b" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsOutstandingWeightedAverageRemainingContractualTerm2_37060113-c606-4196-9e01-e936ef9913e3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsOutstandingWeightedAverageRemainingContractualTerm2"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsWeightedAverageRemainingContractualTermAbstract_a12cbb72-93af-4633-8e68-9d9bdb2c6a7b" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsOutstandingWeightedAverageRemainingContractualTerm2_37060113-c606-4196-9e01-e936ef9913e3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableWeightedAverageRemainingContractualTerm1_12286f13-327a-4f86-96ab-73827e497768" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableWeightedAverageRemainingContractualTerm1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsWeightedAverageRemainingContractualTermAbstract_a12cbb72-93af-4633-8e68-9d9bdb2c6a7b" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableWeightedAverageRemainingContractualTerm1_12286f13-327a-4f86-96ab-73827e497768" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsIntrinsicValueAbstract_491196ad-278a-43c9-81f9-7ac28225f2bf" xlink:href="anip-20231231.xsd#anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsIntrinsicValueAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_91125896-87ae-4a7f-81d1-4bbf1671d2d3" xlink:to="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsIntrinsicValueAbstract_491196ad-278a-43c9-81f9-7ac28225f2bf" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingIntrinsicValue_e00498a0-97b8-4a76-80eb-ad79006e8094" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingIntrinsicValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsIntrinsicValueAbstract_491196ad-278a-43c9-81f9-7ac28225f2bf" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingIntrinsicValue_e00498a0-97b8-4a76-80eb-ad79006e8094" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue_a5d6f928-5d8a-412b-a3ee-f74ab804ade2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsIntrinsicValueAbstract_491196ad-278a-43c9-81f9-7ac28225f2bf" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue_a5d6f928-5d8a-412b-a3ee-f74ab804ade2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingIntrinsicValue_84b3c792-50f5-4959-a448-4c9f4d0c9230" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingIntrinsicValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableIntrinsicValue1_80d674a6-7b39-4438-9793-20b192519e05" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableIntrinsicValue1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_anip_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsIntrinsicValueAbstract_491196ad-278a-43c9-81f9-7ac28225f2bf" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableIntrinsicValue1_80d674a6-7b39-4438-9793-20b192519e05" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/STOCKBASEDCOMPENSATIONRSAactivityDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#STOCKBASEDCOMPENSATIONRSAactivityDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/STOCKBASEDCOMPENSATIONRSAactivityDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_02ac5a94-731a-4b1a-b29c-668af3f1b806" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_119c7250-00d6-4d1c-ba0c-c451128f3d54" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_02ac5a94-731a-4b1a-b29c-668af3f1b806" xlink:to="loc_us-gaap_StatementTable_119c7250-00d6-4d1c-ba0c-c451128f3d54" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_43a8ce92-3d3e-4e3e-b015-101d6b954590" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_119c7250-00d6-4d1c-ba0c-c451128f3d54" xlink:to="loc_us-gaap_AwardTypeAxis_43a8ce92-3d3e-4e3e-b015-101d6b954590" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_43a8ce92-3d3e-4e3e-b015-101d6b954590_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_43a8ce92-3d3e-4e3e-b015-101d6b954590" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_43a8ce92-3d3e-4e3e-b015-101d6b954590_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_256f8aee-ad47-41ba-ab73-71b827249aed" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_43a8ce92-3d3e-4e3e-b015-101d6b954590" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_256f8aee-ad47-41ba-ab73-71b827249aed" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedStockMember_b410b58e-36bd-40f2-87ae-98964cbb3d84" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestrictedStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_256f8aee-ad47-41ba-ab73-71b827249aed" xlink:to="loc_us-gaap_RestrictedStockMember_b410b58e-36bd-40f2-87ae-98964cbb3d84" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_ea2971a2-d1b0-43eb-84c2-154c687b40ac" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_02ac5a94-731a-4b1a-b29c-668af3f1b806" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_ea2971a2-d1b0-43eb-84c2-154c687b40ac" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_6e8c8ac8-3e21-483b-ba67-c80694631acb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_ea2971a2-d1b0-43eb-84c2-154c687b40ac" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_6e8c8ac8-3e21-483b-ba67-c80694631acb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_aa94d88d-73ba-491b-89bb-2fa23a2bd36b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_ea2971a2-d1b0-43eb-84c2-154c687b40ac" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_aa94d88d-73ba-491b-89bb-2fa23a2bd36b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_ebe65d06-0c98-43cc-ab83-e15a9f99dafe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_ea2971a2-d1b0-43eb-84c2-154c687b40ac" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_ebe65d06-0c98-43cc-ab83-e15a9f99dafe" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_613e342e-d9ae-4f05-b2ad-7b7d8e16b1d7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_ea2971a2-d1b0-43eb-84c2-154c687b40ac" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_613e342e-d9ae-4f05-b2ad-7b7d8e16b1d7" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_0352f286-e492-4482-a576-7857096787bc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_a588f100-2bc4-4c23-ba5b-ba2753d7ee90" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_02ac5a94-731a-4b1a-b29c-668af3f1b806" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_a588f100-2bc4-4c23-ba5b-ba2753d7ee90" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_1ef008a0-84cc-4c03-a72a-b2327d82cf40" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_a588f100-2bc4-4c23-ba5b-ba2753d7ee90" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_1ef008a0-84cc-4c03-a72a-b2327d82cf40" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_b4cbcae7-9a85-47bc-9a2d-305d404aaa49" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_a588f100-2bc4-4c23-ba5b-ba2753d7ee90" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_b4cbcae7-9a85-47bc-9a2d-305d404aaa49" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_c894e660-5bb5-4105-8afe-45d4086ba7d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_a588f100-2bc4-4c23-ba5b-ba2753d7ee90" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_c894e660-5bb5-4105-8afe-45d4086ba7d4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_c28039cf-3124-4eef-8278-0b26a1d97d1b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_a588f100-2bc4-4c23-ba5b-ba2753d7ee90" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_c28039cf-3124-4eef-8278-0b26a1d97d1b" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_f8bf4cda-8ccd-4978-9f43-89df8a2e8dcf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTerms_df41b605-4daa-413f-ac65-28e7d75ec3cd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTerms"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_02ac5a94-731a-4b1a-b29c-668af3f1b806" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTerms_df41b605-4daa-413f-ac65-28e7d75ec3cd" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/STOCKBASEDCOMPENSATIONPerformancesharesactivityDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#STOCKBASEDCOMPENSATIONPerformancesharesactivityDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/STOCKBASEDCOMPENSATIONPerformancesharesactivityDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_4484d192-b9dc-4a37-af74-1f83e3a568b9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_c7b8ecaf-7b25-4745-b46b-b0608f495152" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_4484d192-b9dc-4a37-af74-1f83e3a568b9" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_c7b8ecaf-7b25-4745-b46b-b0608f495152" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_d9a1bc1d-8336-4347-a7a3-a1e96b0697b3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_c7b8ecaf-7b25-4745-b46b-b0608f495152" xlink:to="loc_us-gaap_AwardTypeAxis_d9a1bc1d-8336-4347-a7a3-a1e96b0697b3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_d9a1bc1d-8336-4347-a7a3-a1e96b0697b3_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_d9a1bc1d-8336-4347-a7a3-a1e96b0697b3" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_d9a1bc1d-8336-4347-a7a3-a1e96b0697b3_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_95dcbd12-5a86-40dd-8afe-7bc525574ce4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_d9a1bc1d-8336-4347-a7a3-a1e96b0697b3" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_95dcbd12-5a86-40dd-8afe-7bc525574ce4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PerformanceSharesMember_4e5b41c7-80d2-4029-bc24-3b039c117504" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PerformanceSharesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_95dcbd12-5a86-40dd-8afe-7bc525574ce4" xlink:to="loc_us-gaap_PerformanceSharesMember_4e5b41c7-80d2-4029-bc24-3b039c117504" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_b39ecd20-4676-4c2b-9c4a-e9b633f0f8d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_4484d192-b9dc-4a37-af74-1f83e3a568b9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_b39ecd20-4676-4c2b-9c4a-e9b633f0f8d4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_2e51572c-28b2-49bd-98e8-ccc3ab72ec69" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_b39ecd20-4676-4c2b-9c4a-e9b633f0f8d4" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_2e51572c-28b2-49bd-98e8-ccc3ab72ec69" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_bf1c5381-51c2-41e8-bdc0-878e3bf45cab" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_b39ecd20-4676-4c2b-9c4a-e9b633f0f8d4" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_bf1c5381-51c2-41e8-bdc0-878e3bf45cab" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_a8e912e1-6e7c-4dae-b571-8c827f96cfbb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_b39ecd20-4676-4c2b-9c4a-e9b633f0f8d4" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_a8e912e1-6e7c-4dae-b571-8c827f96cfbb" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_f41ef367-d0c5-4088-b5d2-4c50551a6fc6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_b39ecd20-4676-4c2b-9c4a-e9b633f0f8d4" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_f41ef367-d0c5-4088-b5d2-4c50551a6fc6" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_3eed822a-6251-44f4-b8b7-104a6b5a6e2c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_6e3bba2b-8a52-4dae-8d5f-ed89c537c89b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_4484d192-b9dc-4a37-af74-1f83e3a568b9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_6e3bba2b-8a52-4dae-8d5f-ed89c537c89b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_59d61211-335f-4451-9a38-386ef6bd7d6b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_6e3bba2b-8a52-4dae-8d5f-ed89c537c89b" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_59d61211-335f-4451-9a38-386ef6bd7d6b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_8b96c5c0-949f-4fed-adcd-78c9a01b010a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_6e3bba2b-8a52-4dae-8d5f-ed89c537c89b" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_8b96c5c0-949f-4fed-adcd-78c9a01b010a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_b94c1c16-e963-434c-a08c-bf78dc5d63a6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_6e3bba2b-8a52-4dae-8d5f-ed89c537c89b" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_b94c1c16-e963-434c-a08c-bf78dc5d63a6" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_c183a8f8-99a3-4770-bd66-f201e31ce7a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_6e3bba2b-8a52-4dae-8d5f-ed89c537c89b" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_c183a8f8-99a3-4770-bd66-f201e31ce7a2" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_f3064bc1-04cf-4325-a992-0eaa04d062a4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTerms_fffc9d07-d168-43cf-84f6-5beaa88f45bb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTerms"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_4484d192-b9dc-4a37-af74-1f83e3a568b9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTerms_fffc9d07-d168-43cf-84f6-5beaa88f45bb" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INCOMETAXESNarrativeDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INCOMETAXESNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/INCOMETAXESNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentsOwnedFederalIncomeTaxNoteLineItems_5d4d5fe1-06f5-4e09-a3f3-29c91af4270a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentsOwnedFederalIncomeTaxNoteLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FederalIncomeTaxNoteTable_9df4b6bc-b0f6-4569-8268-f7630c70e9e8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FederalIncomeTaxNoteTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_InvestmentsOwnedFederalIncomeTaxNoteLineItems_5d4d5fe1-06f5-4e09-a3f3-29c91af4270a" xlink:to="loc_us-gaap_FederalIncomeTaxNoteTable_9df4b6bc-b0f6-4569-8268-f7630c70e9e8" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesAxis_1656f082-0ae1-439f-9117-04bfd4e41c71" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FederalIncomeTaxNoteTable_9df4b6bc-b0f6-4569-8268-f7630c70e9e8" xlink:to="loc_srt_ConsolidatedEntitiesAxis_1656f082-0ae1-439f-9117-04bfd4e41c71" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_1656f082-0ae1-439f-9117-04bfd4e41c71_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidatedEntitiesAxis_1656f082-0ae1-439f-9117-04bfd4e41c71" xlink:to="loc_srt_ConsolidatedEntitiesDomain_1656f082-0ae1-439f-9117-04bfd4e41c71_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_9091666f-2e43-4737-b94f-428cff5e9deb" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidatedEntitiesAxis_1656f082-0ae1-439f-9117-04bfd4e41c71" xlink:to="loc_srt_ConsolidatedEntitiesDomain_9091666f-2e43-4737-b94f-428cff5e9deb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ANICanadaMember_57a67451-2e40-4c7d-8ac5-106f82964f4e" xlink:href="anip-20231231.xsd#anip_ANICanadaMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidatedEntitiesDomain_9091666f-2e43-4737-b94f-428cff5e9deb" xlink:to="loc_anip_ANICanadaMember_57a67451-2e40-4c7d-8ac5-106f82964f4e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxAuthorityAxis_acbdddff-328d-49b1-965e-62022e472236" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxAuthorityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FederalIncomeTaxNoteTable_9df4b6bc-b0f6-4569-8268-f7630c70e9e8" xlink:to="loc_us-gaap_IncomeTaxAuthorityAxis_acbdddff-328d-49b1-965e-62022e472236" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxAuthorityDomain_acbdddff-328d-49b1-965e-62022e472236_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxAuthorityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeTaxAuthorityAxis_acbdddff-328d-49b1-965e-62022e472236" xlink:to="loc_us-gaap_IncomeTaxAuthorityDomain_acbdddff-328d-49b1-965e-62022e472236_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxAuthorityDomain_d8e4626a-1184-45df-a34d-bd801511fd76" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxAuthorityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeTaxAuthorityAxis_acbdddff-328d-49b1-965e-62022e472236" xlink:to="loc_us-gaap_IncomeTaxAuthorityDomain_d8e4626a-1184-45df-a34d-bd801511fd76" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DomesticCountryMember_7725536f-196f-455a-8f87-7cf943a6966d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DomesticCountryMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxAuthorityDomain_d8e4626a-1184-45df-a34d-bd801511fd76" xlink:to="loc_us-gaap_DomesticCountryMember_7725536f-196f-455a-8f87-7cf943a6966d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StateAndLocalJurisdictionMember_d23a141d-fa15-4c62-b6a0-914d4e658ce0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StateAndLocalJurisdictionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxAuthorityDomain_d8e4626a-1184-45df-a34d-bd801511fd76" xlink:to="loc_us-gaap_StateAndLocalJurisdictionMember_d23a141d-fa15-4c62-b6a0-914d4e658ce0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_c883eef0-c151-46c3-b079-19f376c7e876" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsLiabilitiesNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentsOwnedFederalIncomeTaxNoteLineItems_5d4d5fe1-06f5-4e09-a3f3-29c91af4270a" xlink:to="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_c883eef0-c151-46c3-b079-19f376c7e876" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLossCarryforwards_1fc71c81-74d8-497a-b913-1855b243bb97" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLossCarryforwards"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentsOwnedFederalIncomeTaxNoteLineItems_5d4d5fe1-06f5-4e09-a3f3-29c91af4270a" xlink:to="loc_us-gaap_OperatingLossCarryforwards_1fc71c81-74d8-497a-b913-1855b243bb97" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_OperatingLossCarryforwardsAnnualLimitationsOnUse_ac760646-1383-4283-b4e1-aef28fa078ad" xlink:href="anip-20231231.xsd#anip_OperatingLossCarryforwardsAnnualLimitationsOnUse"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentsOwnedFederalIncomeTaxNoteLineItems_5d4d5fe1-06f5-4e09-a3f3-29c91af4270a" xlink:to="loc_anip_OperatingLossCarryforwardsAnnualLimitationsOnUse_ac760646-1383-4283-b4e1-aef28fa078ad" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/COMMITMENTSANDCONTINGENCIESNarrativeDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#COMMITMENTSANDCONTINGENCIESNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/COMMITMENTSANDCONTINGENCIESNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeasedAssetsLineItems_7adb907b-adef-4440-8284-62834030a2c3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeasedAssetsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfOperatingLeasedAssetsTable_cfa11a46-407b-4f64-990f-d52d09eaf5e3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfOperatingLeasedAssetsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_OperatingLeasedAssetsLineItems_7adb907b-adef-4440-8284-62834030a2c3" xlink:to="loc_us-gaap_ScheduleOfOperatingLeasedAssetsTable_cfa11a46-407b-4f64-990f-d52d09eaf5e3" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductOrServiceAxis_dd458b64-1738-45c0-95c0-6831332894b1" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductOrServiceAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfOperatingLeasedAssetsTable_cfa11a46-407b-4f64-990f-d52d09eaf5e3" xlink:to="loc_srt_ProductOrServiceAxis_dd458b64-1738-45c0-95c0-6831332894b1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_dd458b64-1738-45c0-95c0-6831332894b1_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ProductOrServiceAxis_dd458b64-1738-45c0-95c0-6831332894b1" xlink:to="loc_srt_ProductsAndServicesDomain_dd458b64-1738-45c0-95c0-6831332894b1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_ff124135-0558-4356-87ee-0e6c17166cf2" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ProductOrServiceAxis_dd458b64-1738-45c0-95c0-6831332894b1" xlink:to="loc_srt_ProductsAndServicesDomain_ff124135-0558-4356-87ee-0e6c17166cf2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_UnapprovedProductsMember_55236fe4-a2d1-4ddb-8005-b4edcf0946b5" xlink:href="anip-20231231.xsd#anip_UnapprovedProductsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_ff124135-0558-4356-87ee-0e6c17166cf2" xlink:to="loc_anip_UnapprovedProductsMember_55236fe4-a2d1-4ddb-8005-b4edcf0946b5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MajorCustomersAxis_41e437fe-cdf5-4f96-89bf-28f907c15f7b" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MajorCustomersAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfOperatingLeasedAssetsTable_cfa11a46-407b-4f64-990f-d52d09eaf5e3" xlink:to="loc_srt_MajorCustomersAxis_41e437fe-cdf5-4f96-89bf-28f907c15f7b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_NameOfMajorCustomerDomain_41e437fe-cdf5-4f96-89bf-28f907c15f7b_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_NameOfMajorCustomerDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_MajorCustomersAxis_41e437fe-cdf5-4f96-89bf-28f907c15f7b" xlink:to="loc_srt_NameOfMajorCustomerDomain_41e437fe-cdf5-4f96-89bf-28f907c15f7b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_NameOfMajorCustomerDomain_43fefdee-b062-4636-a93a-83170b9cbdb8" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_NameOfMajorCustomerDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_MajorCustomersAxis_41e437fe-cdf5-4f96-89bf-28f907c15f7b" xlink:to="loc_srt_NameOfMajorCustomerDomain_43fefdee-b062-4636-a93a-83170b9cbdb8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ContractCustomerMember_58441aa1-770e-43b1-a9ac-091de3a56389" xlink:href="anip-20231231.xsd#anip_ContractCustomerMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_43fefdee-b062-4636-a93a-83170b9cbdb8" xlink:to="loc_anip_ContractCustomerMember_58441aa1-770e-43b1-a9ac-091de3a56389" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CounterpartyNameAxis_0dc2b618-16f8-4c93-91a4-5caab2b05dbb" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CounterpartyNameAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfOperatingLeasedAssetsTable_cfa11a46-407b-4f64-990f-d52d09eaf5e3" xlink:to="loc_srt_CounterpartyNameAxis_0dc2b618-16f8-4c93-91a4-5caab2b05dbb" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RepurchaseAgreementCounterpartyNameDomain_0dc2b618-16f8-4c93-91a4-5caab2b05dbb_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RepurchaseAgreementCounterpartyNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_CounterpartyNameAxis_0dc2b618-16f8-4c93-91a4-5caab2b05dbb" xlink:to="loc_srt_RepurchaseAgreementCounterpartyNameDomain_0dc2b618-16f8-4c93-91a4-5caab2b05dbb_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RepurchaseAgreementCounterpartyNameDomain_676f9be8-aa8f-4b2c-aed4-826fea160c2a" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RepurchaseAgreementCounterpartyNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_CounterpartyNameAxis_0dc2b618-16f8-4c93-91a4-5caab2b05dbb" xlink:to="loc_srt_RepurchaseAgreementCounterpartyNameDomain_676f9be8-aa8f-4b2c-aed4-826fea160c2a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AzurityPharmaceuticalsMember_7622bb9a-e49e-4275-8bae-1f4a0d4b6d0d" xlink:href="anip-20231231.xsd#anip_AzurityPharmaceuticalsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RepurchaseAgreementCounterpartyNameDomain_676f9be8-aa8f-4b2c-aed4-826fea160c2a" xlink:to="loc_anip_AzurityPharmaceuticalsMember_7622bb9a-e49e-4275-8bae-1f4a0d4b6d0d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NovitiumMember_35aab8b3-c339-4ac8-a60e-fd84d9b98abd" xlink:href="anip-20231231.xsd#anip_NovitiumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RepurchaseAgreementCounterpartyNameDomain_676f9be8-aa8f-4b2c-aed4-826fea160c2a" xlink:to="loc_anip_NovitiumMember_35aab8b3-c339-4ac8-a60e-fd84d9b98abd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NumberOfOperatingLeases_2904874f-a833-4361-90ef-3f9d75b2455e" xlink:href="anip-20231231.xsd#anip_NumberOfOperatingLeases"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLeasedAssetsLineItems_7adb907b-adef-4440-8284-62834030a2c3" xlink:to="loc_anip_NumberOfOperatingLeases_2904874f-a833-4361-90ef-3f9d75b2455e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1_c838fa72-0b38-430f-9c79-244284fc6a87" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLeasedAssetsLineItems_7adb907b-adef-4440-8284-62834030a2c3" xlink:to="loc_us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1_c838fa72-0b38-430f-9c79-244284fc6a87" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent_fe55f63a-57c0-4572-8589-8d5d58d45ee4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLeasedAssetsLineItems_7adb907b-adef-4440-8284-62834030a2c3" xlink:to="loc_us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent_fe55f63a-57c0-4572-8589-8d5d58d45ee4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NumberOfProductsMarketed_65dbc61e-0c07-4bba-91f7-964693ba8dd5" xlink:href="anip-20231231.xsd#anip_NumberOfProductsMarketed"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLeasedAssetsLineItems_7adb907b-adef-4440-8284-62834030a2c3" xlink:to="loc_anip_NumberOfProductsMarketed_65dbc61e-0c07-4bba-91f7-964693ba8dd5" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_b24aebc1-907f-41c7-b0f0-51b8aff7cda5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLeasedAssetsLineItems_7adb907b-adef-4440-8284-62834030a2c3" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_b24aebc1-907f-41c7-b0f0-51b8aff7cda5" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LitigationSettlementAmountAwardedToOtherParty_162bedb2-4d1c-46e9-ba48-fbf13d9237af" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LitigationSettlementAmountAwardedToOtherParty"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLeasedAssetsLineItems_7adb907b-adef-4440-8284-62834030a2c3" xlink:to="loc_us-gaap_LitigationSettlementAmountAwardedToOtherParty_162bedb2-4d1c-46e9-ba48-fbf13d9237af" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_RoyaltyOnFutureSalesPercent_5141511f-8d7a-48ce-9905-44ed885b7d93" xlink:href="anip-20231231.xsd#anip_RoyaltyOnFutureSalesPercent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLeasedAssetsLineItems_7adb907b-adef-4440-8284-62834030a2c3" xlink:to="loc_anip_RoyaltyOnFutureSalesPercent_5141511f-8d7a-48ce-9905-44ed885b7d93" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossContingencyNumberOfPlaintiffs_765eb3cb-bf84-46c5-bdef-fa383776e02d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LossContingencyNumberOfPlaintiffs"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLeasedAssetsLineItems_7adb907b-adef-4440-8284-62834030a2c3" xlink:to="loc_us-gaap_LossContingencyNumberOfPlaintiffs_765eb3cb-bf84-46c5-bdef-fa383776e02d" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_LossContingencyNumberOfManufacturers_10db9a6b-bc3d-46c8-bf88-3b60e3aac1af" xlink:href="anip-20231231.xsd#anip_LossContingencyNumberOfManufacturers"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLeasedAssetsLineItems_7adb907b-adef-4440-8284-62834030a2c3" xlink:to="loc_anip_LossContingencyNumberOfManufacturers_10db9a6b-bc3d-46c8-bf88-3b60e3aac1af" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossContingencyNewClaimsFiledNumber_1be2fa40-8198-4fff-ab9c-2fce17b82c8a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LossContingencyNewClaimsFiledNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLeasedAssetsLineItems_7adb907b-adef-4440-8284-62834030a2c3" xlink:to="loc_us-gaap_LossContingencyNewClaimsFiledNumber_1be2fa40-8198-4fff-ab9c-2fce17b82c8a" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossContingencyPendingClaimsNumber_906c67ea-066e-4b71-8ad4-37f99d2a13b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LossContingencyPendingClaimsNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLeasedAssetsLineItems_7adb907b-adef-4440-8284-62834030a2c3" xlink:to="loc_us-gaap_LossContingencyPendingClaimsNumber_906c67ea-066e-4b71-8ad4-37f99d2a13b4" xlink:type="arc" order="10"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/PURIFIEDCORTROPHINGELPRELAUNCHCHARGESDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#PURIFIEDCORTROPHINGELPRELAUNCHCHARGESDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/PURIFIEDCORTROPHINGELPRELAUNCHCHARGESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_357c6d4a-b5bd-4d1f-ae5c-eab2756adadc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_f280899c-a236-4442-bd95-e67a465b2aa5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_357c6d4a-b5bd-4d1f-ae5c-eab2756adadc" xlink:to="loc_us-gaap_StatementTable_f280899c-a236-4442-bd95-e67a465b2aa5" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductOrServiceAxis_2c91ecdb-6765-4673-b88a-f226a6c34a88" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductOrServiceAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_f280899c-a236-4442-bd95-e67a465b2aa5" xlink:to="loc_srt_ProductOrServiceAxis_2c91ecdb-6765-4673-b88a-f226a6c34a88" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_2c91ecdb-6765-4673-b88a-f226a6c34a88_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ProductOrServiceAxis_2c91ecdb-6765-4673-b88a-f226a6c34a88" xlink:to="loc_srt_ProductsAndServicesDomain_2c91ecdb-6765-4673-b88a-f226a6c34a88_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_c1b2e8f1-740b-4f29-97b9-ad19ee53efcf" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ProductOrServiceAxis_2c91ecdb-6765-4673-b88a-f226a6c34a88" xlink:to="loc_srt_ProductsAndServicesDomain_c1b2e8f1-740b-4f29-97b9-ad19ee53efcf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CortrophinGelMember_f56e9f61-9f86-47d7-a7bf-8fed9f57d651" xlink:href="anip-20231231.xsd#anip_CortrophinGelMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_c1b2e8f1-740b-4f29-97b9-ad19ee53efcf" xlink:to="loc_anip_CortrophinGelMember_f56e9f61-9f86-47d7-a7bf-8fed9f57d651" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CortrophinPreLaunchCharges_0e150112-0376-4e07-9dbd-b00881e28101" xlink:href="anip-20231231.xsd#anip_CortrophinPreLaunchCharges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_357c6d4a-b5bd-4d1f-ae5c-eab2756adadc" xlink:to="loc_anip_CortrophinPreLaunchCharges_0e150112-0376-4e07-9dbd-b00881e28101" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_e87399df-2740-4cd6-b312-2ed85942d2ed" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_357c6d4a-b5bd-4d1f-ae5c-eab2756adadc" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_e87399df-2740-4cd6-b312-2ed85942d2ed" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/RELATEDPARTYTRANSACTIONSNarrativeDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#RELATEDPARTYTRANSACTIONSNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/RELATEDPARTYTRANSACTIONSNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionLineItems_f73de6d5-9052-402a-acfe-1e66bcf6fab3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_691fbc0f-a0cc-4969-a3ff-e5417c328010" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_f73de6d5-9052-402a-acfe-1e66bcf6fab3" xlink:to="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_691fbc0f-a0cc-4969-a3ff-e5417c328010" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_516ca14d-b513-4f2a-b070-fc5818997431" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_691fbc0f-a0cc-4969-a3ff-e5417c328010" xlink:to="loc_us-gaap_StatementClassOfStockAxis_516ca14d-b513-4f2a-b070-fc5818997431" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_516ca14d-b513-4f2a-b070-fc5818997431_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_516ca14d-b513-4f2a-b070-fc5818997431" xlink:to="loc_us-gaap_ClassOfStockDomain_516ca14d-b513-4f2a-b070-fc5818997431_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_dba815a4-fbf1-4f2f-998b-bfe3cf167f7e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_516ca14d-b513-4f2a-b070-fc5818997431" xlink:to="loc_us-gaap_ClassOfStockDomain_dba815a4-fbf1-4f2f-998b-bfe3cf167f7e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConvertiblePreferredStockMember_aab5ab2c-49a4-4658-8300-bcdb08d12a8a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConvertiblePreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_dba815a4-fbf1-4f2f-998b-bfe3cf167f7e" xlink:to="loc_us-gaap_ConvertiblePreferredStockMember_aab5ab2c-49a4-4658-8300-bcdb08d12a8a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsidiarySaleOfStockAxis_eba80e94-a728-40ac-95e2-7289b6da6fa3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsidiarySaleOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_691fbc0f-a0cc-4969-a3ff-e5417c328010" xlink:to="loc_us-gaap_SubsidiarySaleOfStockAxis_eba80e94-a728-40ac-95e2-7289b6da6fa3" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SaleOfStockNameOfTransactionDomain_eba80e94-a728-40ac-95e2-7289b6da6fa3_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SaleOfStockNameOfTransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsidiarySaleOfStockAxis_eba80e94-a728-40ac-95e2-7289b6da6fa3" xlink:to="loc_us-gaap_SaleOfStockNameOfTransactionDomain_eba80e94-a728-40ac-95e2-7289b6da6fa3_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SaleOfStockNameOfTransactionDomain_a6e193c7-cb2d-4303-b282-f7ea102b0ac8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SaleOfStockNameOfTransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsidiarySaleOfStockAxis_eba80e94-a728-40ac-95e2-7289b6da6fa3" xlink:to="loc_us-gaap_SaleOfStockNameOfTransactionDomain_a6e193c7-cb2d-4303-b282-f7ea102b0ac8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_PrivateInvestmentInPublicEquityMember_21172013-99cf-40f1-803f-779f6941f742" xlink:href="anip-20231231.xsd#anip_PrivateInvestmentInPublicEquityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SaleOfStockNameOfTransactionDomain_a6e193c7-cb2d-4303-b282-f7ea102b0ac8" xlink:to="loc_anip_PrivateInvestmentInPublicEquityMember_21172013-99cf-40f1-803f-779f6941f742" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_ed537ba9-04f8-4223-8584-59852ebe0f42" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionsByRelatedPartyAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_691fbc0f-a0cc-4969-a3ff-e5417c328010" xlink:to="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_ed537ba9-04f8-4223-8584-59852ebe0f42" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyDomain_ed537ba9-04f8-4223-8584-59852ebe0f42_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_ed537ba9-04f8-4223-8584-59852ebe0f42" xlink:to="loc_us-gaap_RelatedPartyDomain_ed537ba9-04f8-4223-8584-59852ebe0f42_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyDomain_f8c45788-045d-4619-bdce-30ff10526b56" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_ed537ba9-04f8-4223-8584-59852ebe0f42" xlink:to="loc_us-gaap_RelatedPartyDomain_f8c45788-045d-4619-bdce-30ff10526b56" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyMember_3fc91528-3b03-4732-88b9-ee807884c56f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyDomain_f8c45788-045d-4619-bdce-30ff10526b56" xlink:to="loc_us-gaap_RelatedPartyMember_3fc91528-3b03-4732-88b9-ee807884c56f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionAxis_06bf337c-ea50-4032-8ff0-9edd40271aa7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_691fbc0f-a0cc-4969-a3ff-e5417c328010" xlink:to="loc_us-gaap_RelatedPartyTransactionAxis_06bf337c-ea50-4032-8ff0-9edd40271aa7" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionDomain_06bf337c-ea50-4032-8ff0-9edd40271aa7_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RelatedPartyTransactionAxis_06bf337c-ea50-4032-8ff0-9edd40271aa7" xlink:to="loc_us-gaap_RelatedPartyTransactionDomain_06bf337c-ea50-4032-8ff0-9edd40271aa7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionDomain_5f1ea055-197a-4fc1-9e30-d419053f556b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RelatedPartyTransactionAxis_06bf337c-ea50-4032-8ff0-9edd40271aa7" xlink:to="loc_us-gaap_RelatedPartyTransactionDomain_5f1ea055-197a-4fc1-9e30-d419053f556b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ScitusPharmaServicesMember_b6aed21b-59e3-478b-82ad-3d50fe970997" xlink:href="anip-20231231.xsd#anip_ScitusPharmaServicesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionDomain_5f1ea055-197a-4fc1-9e30-d419053f556b" xlink:to="loc_anip_ScitusPharmaServicesMember_b6aed21b-59e3-478b-82ad-3d50fe970997" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_SsPharmaLlcMember_ab305522-3a29-4962-9010-68be293823f0" xlink:href="anip-20231231.xsd#anip_SsPharmaLlcMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionDomain_5f1ea055-197a-4fc1-9e30-d419053f556b" xlink:to="loc_anip_SsPharmaLlcMember_ab305522-3a29-4962-9010-68be293823f0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NurayChemicalPrivateLimitedMember_34bee557-8d28-4ceb-b62a-ade2e510514f" xlink:href="anip-20231231.xsd#anip_NurayChemicalPrivateLimitedMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionDomain_5f1ea055-197a-4fc1-9e30-d419053f556b" xlink:to="loc_anip_NurayChemicalPrivateLimitedMember_34bee557-8d28-4ceb-b62a-ade2e510514f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_65752cb6-5040-40bc-a8ec-ea145d0d6f37" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_691fbc0f-a0cc-4969-a3ff-e5417c328010" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_65752cb6-5040-40bc-a8ec-ea145d0d6f37" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_65752cb6-5040-40bc-a8ec-ea145d0d6f37_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_65752cb6-5040-40bc-a8ec-ea145d0d6f37" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_65752cb6-5040-40bc-a8ec-ea145d0d6f37_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_e0706493-4e12-47d9-a703-cfb448b8d36c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_65752cb6-5040-40bc-a8ec-ea145d0d6f37" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_e0706493-4e12-47d9-a703-cfb448b8d36c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NovitiumPharmaMember_0074e3ef-cba6-4ae2-aa69-e972cdc0c50f" xlink:href="anip-20231231.xsd#anip_NovitiumPharmaMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_e0706493-4e12-47d9-a703-cfb448b8d36c" xlink:to="loc_anip_NovitiumPharmaMember_0074e3ef-cba6-4ae2-aa69-e972cdc0c50f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CounterpartyNameAxis_4f217ad2-5325-446d-98a5-abba1d984e10" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CounterpartyNameAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_691fbc0f-a0cc-4969-a3ff-e5417c328010" xlink:to="loc_srt_CounterpartyNameAxis_4f217ad2-5325-446d-98a5-abba1d984e10" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RepurchaseAgreementCounterpartyNameDomain_4f217ad2-5325-446d-98a5-abba1d984e10_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RepurchaseAgreementCounterpartyNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_CounterpartyNameAxis_4f217ad2-5325-446d-98a5-abba1d984e10" xlink:to="loc_srt_RepurchaseAgreementCounterpartyNameDomain_4f217ad2-5325-446d-98a5-abba1d984e10_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RepurchaseAgreementCounterpartyNameDomain_b5b1c6ba-93c3-496d-999a-105cdc8897c0" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RepurchaseAgreementCounterpartyNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_CounterpartyNameAxis_4f217ad2-5325-446d-98a5-abba1d984e10" xlink:to="loc_srt_RepurchaseAgreementCounterpartyNameDomain_b5b1c6ba-93c3-496d-999a-105cdc8897c0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_Mr.ShanmugamAndEsjayMember_3106f076-8c02-4aa4-a40b-5144034e5654" xlink:href="anip-20231231.xsd#anip_Mr.ShanmugamAndEsjayMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RepurchaseAgreementCounterpartyNameDomain_b5b1c6ba-93c3-496d-999a-105cdc8897c0" xlink:to="loc_anip_Mr.ShanmugamAndEsjayMember_3106f076-8c02-4aa4-a40b-5144034e5654" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ChaliPropertiesLLCMember_ba860901-5a90-4464-8805-303f06fe9d1a" xlink:href="anip-20231231.xsd#anip_ChaliPropertiesLLCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RepurchaseAgreementCounterpartyNameDomain_b5b1c6ba-93c3-496d-999a-105cdc8897c0" xlink:to="loc_anip_ChaliPropertiesLLCMember_ba860901-5a90-4464-8805-303f06fe9d1a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeAxis_f114c231-c942-45bc-887f-a6ceffc7dd10" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_691fbc0f-a0cc-4969-a3ff-e5417c328010" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_f114c231-c942-45bc-887f-a6ceffc7dd10" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_f114c231-c942-45bc-887f-a6ceffc7dd10_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_f114c231-c942-45bc-887f-a6ceffc7dd10" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_f114c231-c942-45bc-887f-a6ceffc7dd10_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_0385f37f-306f-45b1-975c-419d4905f1bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_f114c231-c942-45bc-887f-a6ceffc7dd10" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_0385f37f-306f-45b1-975c-419d4905f1bd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventMember_a47dc4d7-ff9a-4230-8ff8-ea28ac3f6887" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventTypeDomain_0385f37f-306f-45b1-975c-419d4905f1bd" xlink:to="loc_us-gaap_SubsequentEventMember_a47dc4d7-ff9a-4230-8ff8-ea28ac3f6887" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_TemporaryEquityStockIssuedDuringPeriodSharesNewIssues_35c28d44-9ba9-42c0-81f1-ed8736cc5784" xlink:href="anip-20231231.xsd#anip_TemporaryEquityStockIssuedDuringPeriodSharesNewIssues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_f73de6d5-9052-402a-acfe-1e66bcf6fab3" xlink:to="loc_anip_TemporaryEquityStockIssuedDuringPeriodSharesNewIssues_35c28d44-9ba9-42c0-81f1-ed8736cc5784" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquityRedemptionPricePerShare_b68f881d-c56f-460f-8b53-867acbe621fb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquityRedemptionPricePerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_f73de6d5-9052-402a-acfe-1e66bcf6fab3" xlink:to="loc_us-gaap_TemporaryEquityRedemptionPricePerShare_b68f881d-c56f-460f-8b53-867acbe621fb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues_b8d6bb6f-a05c-4852-90b9-a18f04768b8d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_f73de6d5-9052-402a-acfe-1e66bcf6fab3" xlink:to="loc_us-gaap_TemporaryEquityStockIssuedDuringPeriodValueNewIssues_b8d6bb6f-a05c-4852-90b9-a18f04768b8d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NumberOfExecutiveFounders_24481d1b-a38e-423b-91dc-ca05532aff5b" xlink:href="anip-20231231.xsd#anip_NumberOfExecutiveFounders"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_f73de6d5-9052-402a-acfe-1e66bcf6fab3" xlink:to="loc_anip_NumberOfExecutiveFounders_24481d1b-a38e-423b-91dc-ca05532aff5b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_3e251993-6809-4712-97da-b041952340f6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_f73de6d5-9052-402a-acfe-1e66bcf6fab3" xlink:to="loc_us-gaap_AccountsPayableCurrent_3e251993-6809-4712-97da-b041952340f6" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentForContingentConsiderationLiabilityFinancingActivities_a1a907cc-964c-49d0-993d-ec682dad47c8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentForContingentConsiderationLiabilityFinancingActivities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_f73de6d5-9052-402a-acfe-1e66bcf6fab3" xlink:to="loc_us-gaap_PaymentForContingentConsiderationLiabilityFinancingActivities_a1a907cc-964c-49d0-993d-ec682dad47c8" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/RELATEDPARTYTRANSACTIONSScheduleofrelatedpartiesDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#RELATEDPARTYTRANSACTIONSScheduleofrelatedpartiesDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/RELATEDPARTYTRANSACTIONSScheduleofrelatedpartiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionLineItems_4704d044-b84b-48f6-9319-8f41c8ee2ba9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_b2462591-1d02-462f-8ab5-1be8a3656b0c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_4704d044-b84b-48f6-9319-8f41c8ee2ba9" xlink:to="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_b2462591-1d02-462f-8ab5-1be8a3656b0c" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_bb0ad3d0-9f2b-47f4-bf72-e69f0698ed98" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionsByRelatedPartyAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_b2462591-1d02-462f-8ab5-1be8a3656b0c" xlink:to="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_bb0ad3d0-9f2b-47f4-bf72-e69f0698ed98" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyDomain_bb0ad3d0-9f2b-47f4-bf72-e69f0698ed98_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_bb0ad3d0-9f2b-47f4-bf72-e69f0698ed98" xlink:to="loc_us-gaap_RelatedPartyDomain_bb0ad3d0-9f2b-47f4-bf72-e69f0698ed98_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyDomain_9820d86d-3d55-40e3-9d33-0b8e63c6dbe2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_bb0ad3d0-9f2b-47f4-bf72-e69f0698ed98" xlink:to="loc_us-gaap_RelatedPartyDomain_9820d86d-3d55-40e3-9d33-0b8e63c6dbe2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyMember_a5148569-9e99-46ea-906d-18b6824578d6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyDomain_9820d86d-3d55-40e3-9d33-0b8e63c6dbe2" xlink:to="loc_us-gaap_RelatedPartyMember_a5148569-9e99-46ea-906d-18b6824578d6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionAxis_8aa54e13-8a10-48cd-bc1c-a1dac5f471b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_b2462591-1d02-462f-8ab5-1be8a3656b0c" xlink:to="loc_us-gaap_RelatedPartyTransactionAxis_8aa54e13-8a10-48cd-bc1c-a1dac5f471b4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionDomain_8aa54e13-8a10-48cd-bc1c-a1dac5f471b4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RelatedPartyTransactionAxis_8aa54e13-8a10-48cd-bc1c-a1dac5f471b4" xlink:to="loc_us-gaap_RelatedPartyTransactionDomain_8aa54e13-8a10-48cd-bc1c-a1dac5f471b4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionDomain_1a9b910c-2150-407f-9d0c-84109d58ade2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RelatedPartyTransactionAxis_8aa54e13-8a10-48cd-bc1c-a1dac5f471b4" xlink:to="loc_us-gaap_RelatedPartyTransactionDomain_1a9b910c-2150-407f-9d0c-84109d58ade2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ScitusPharmaServicesMember_17036b67-7230-400c-9c09-d281bea47bff" xlink:href="anip-20231231.xsd#anip_ScitusPharmaServicesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionDomain_1a9b910c-2150-407f-9d0c-84109d58ade2" xlink:to="loc_anip_ScitusPharmaServicesMember_17036b67-7230-400c-9c09-d281bea47bff" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_SsPharmaLlcMember_4ee4625a-4beb-430a-b51b-8839efe52fd6" xlink:href="anip-20231231.xsd#anip_SsPharmaLlcMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionDomain_1a9b910c-2150-407f-9d0c-84109d58ade2" xlink:to="loc_anip_SsPharmaLlcMember_4ee4625a-4beb-430a-b51b-8839efe52fd6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_EsjayPharmaLlcMember_ce6b14de-b64b-407b-a1ad-a4cb3a3ad164" xlink:href="anip-20231231.xsd#anip_EsjayPharmaLlcMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionDomain_1a9b910c-2150-407f-9d0c-84109d58ade2" xlink:to="loc_anip_EsjayPharmaLlcMember_ce6b14de-b64b-407b-a1ad-a4cb3a3ad164" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NurayChemicalPrivateLimitedMember_120b878e-1772-4c37-b55d-fe45d6375236" xlink:href="anip-20231231.xsd#anip_NurayChemicalPrivateLimitedMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionDomain_1a9b910c-2150-407f-9d0c-84109d58ade2" xlink:to="loc_anip_NurayChemicalPrivateLimitedMember_120b878e-1772-4c37-b55d-fe45d6375236" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionPurchasesFromRelatedParty_bc579641-c803-4b63-b21b-e3faca44147b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionPurchasesFromRelatedParty"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_4704d044-b84b-48f6-9319-8f41c8ee2ba9" xlink:to="loc_us-gaap_RelatedPartyTransactionPurchasesFromRelatedParty_bc579641-c803-4b63-b21b-e3faca44147b" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/SEGMENTREPORTINGRevenueDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#SEGMENTREPORTINGRevenueDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/SEGMENTREPORTINGRevenueDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_3d263bff-438e-4c28-8cac-9badabdcfb76" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_ec50105d-bb36-4205-83b6-0d1640916194" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3d263bff-438e-4c28-8cac-9badabdcfb76" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_ec50105d-bb36-4205-83b6-0d1640916194" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_7d803db1-fa7e-4d5d-8b5a-e448d2004144" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_ec50105d-bb36-4205-83b6-0d1640916194" xlink:to="loc_srt_ConsolidationItemsAxis_7d803db1-fa7e-4d5d-8b5a-e448d2004144" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_7d803db1-fa7e-4d5d-8b5a-e448d2004144_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_7d803db1-fa7e-4d5d-8b5a-e448d2004144" xlink:to="loc_srt_ConsolidationItemsDomain_7d803db1-fa7e-4d5d-8b5a-e448d2004144_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_30e0740e-d11c-4759-8f7a-cd5218514436" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_7d803db1-fa7e-4d5d-8b5a-e448d2004144" xlink:to="loc_srt_ConsolidationItemsDomain_30e0740e-d11c-4759-8f7a-cd5218514436" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_d277c1a1-c2f3-4162-a456-24b26d1bad70" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_30e0740e-d11c-4759-8f7a-cd5218514436" xlink:to="loc_us-gaap_OperatingSegmentsMember_d277c1a1-c2f3-4162-a456-24b26d1bad70" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MaterialReconcilingItemsMember_912d4655-5660-4d0f-a7d0-4fdf1df543ef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MaterialReconcilingItemsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_30e0740e-d11c-4759-8f7a-cd5218514436" xlink:to="loc_us-gaap_MaterialReconcilingItemsMember_912d4655-5660-4d0f-a7d0-4fdf1df543ef" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateNonSegmentMember_149be952-0461-4109-af97-5692cea99ccc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CorporateNonSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_30e0740e-d11c-4759-8f7a-cd5218514436" xlink:to="loc_us-gaap_CorporateNonSegmentMember_149be952-0461-4109-af97-5692cea99ccc" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_2c8afed6-1e52-444f-9508-29466244bb21" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_ec50105d-bb36-4205-83b6-0d1640916194" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_2c8afed6-1e52-444f-9508-29466244bb21" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_2c8afed6-1e52-444f-9508-29466244bb21_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_2c8afed6-1e52-444f-9508-29466244bb21" xlink:to="loc_us-gaap_SegmentDomain_2c8afed6-1e52-444f-9508-29466244bb21_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_d324d87d-1d9a-40ce-b35e-f0551fe61dff" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_2c8afed6-1e52-444f-9508-29466244bb21" xlink:to="loc_us-gaap_SegmentDomain_d324d87d-1d9a-40ce-b35e-f0551fe61dff" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_GenericsEstablishedBrandsAndOtherMember_aeff79f9-635a-43b0-81dd-54a75e99010c" xlink:href="anip-20231231.xsd#anip_GenericsEstablishedBrandsAndOtherMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_d324d87d-1d9a-40ce-b35e-f0551fe61dff" xlink:to="loc_anip_GenericsEstablishedBrandsAndOtherMember_aeff79f9-635a-43b0-81dd-54a75e99010c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_RareDiseaseMember_0944e8c3-abab-4bac-8748-c3e0175441f5" xlink:href="anip-20231231.xsd#anip_RareDiseaseMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_d324d87d-1d9a-40ce-b35e-f0551fe61dff" xlink:to="loc_anip_RareDiseaseMember_0944e8c3-abab-4bac-8748-c3e0175441f5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NumberOfReportableSegments_08b57b60-e367-433d-aee0-d6f7966e7b73" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NumberOfReportableSegments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3d263bff-438e-4c28-8cac-9badabdcfb76" xlink:to="loc_us-gaap_NumberOfReportableSegments_08b57b60-e367-433d-aee0-d6f7966e7b73" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_1a918f70-157a-452f-b34f-0f3d62a80f12" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3d263bff-438e-4c28-8cac-9badabdcfb76" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_1a918f70-157a-452f-b34f-0f3d62a80f12" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_EarningsLossBeforeInterestTaxesDepreciationAndAmortization_85ffe79f-526a-4f37-98d0-a44c9089015f" xlink:href="anip-20231231.xsd#anip_EarningsLossBeforeInterestTaxesDepreciationAndAmortization"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3d263bff-438e-4c28-8cac-9badabdcfb76" xlink:to="loc_anip_EarningsLossBeforeInterestTaxesDepreciationAndAmortization_85ffe79f-526a-4f37-98d0-a44c9089015f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationAndAmortization_ef73849f-e0a3-4851-9296-31e139cf795e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DepreciationAndAmortization"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3d263bff-438e-4c28-8cac-9badabdcfb76" xlink:to="loc_us-gaap_DepreciationAndAmortization_ef73849f-e0a3-4851-9296-31e139cf795e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_462999eb-d777-4602-9301-00c768295b94" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3d263bff-438e-4c28-8cac-9badabdcfb76" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_462999eb-d777-4602-9301-00c768295b94" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_832e4dd1-aa9e-4e1b-9db4-12be7fe2cff1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3d263bff-438e-4c28-8cac-9badabdcfb76" xlink:to="loc_us-gaap_OperatingIncomeLoss_832e4dd1-aa9e-4e1b-9db4-12be7fe2cff1" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_eaf41413-2874-42a1-a9b0-597f8009e470" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3d263bff-438e-4c28-8cac-9badabdcfb76" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_eaf41413-2874-42a1-a9b0-597f8009e470" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_5ca1fa3f-e211-41d8-b07d-3da25a54d729" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3d263bff-438e-4c28-8cac-9badabdcfb76" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_5ca1fa3f-e211-41d8-b07d-3da25a54d729" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_0128864e-ad9a-46b0-8c60-5c5ce206895b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3d263bff-438e-4c28-8cac-9badabdcfb76" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_0128864e-ad9a-46b0-8c60-5c5ce206895b" xlink:type="arc" order="8"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/SEGMENTREPORTINGGeographicDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#SEGMENTREPORTINGGeographicDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/SEGMENTREPORTINGGeographicDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_a036f6bd-e7a2-41f1-bf86-03347e98a489" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_c993ab95-49a3-4e1b-a34e-3821309155b8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_a036f6bd-e7a2-41f1-bf86-03347e98a489" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_c993ab95-49a3-4e1b-a34e-3821309155b8" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StatementGeographicalAxis_b870a359-325a-4e39-a161-be8065abd97d" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_StatementGeographicalAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_c993ab95-49a3-4e1b-a34e-3821309155b8" xlink:to="loc_srt_StatementGeographicalAxis_b870a359-325a-4e39-a161-be8065abd97d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_b870a359-325a-4e39-a161-be8065abd97d_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_b870a359-325a-4e39-a161-be8065abd97d" xlink:to="loc_srt_SegmentGeographicalDomain_b870a359-325a-4e39-a161-be8065abd97d_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_9ca07562-49b3-49de-9784-92854f53cea4" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_b870a359-325a-4e39-a161-be8065abd97d" xlink:to="loc_srt_SegmentGeographicalDomain_9ca07562-49b3-49de-9784-92854f53cea4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_country_US_b6945a79-17c9-4757-992d-5db0e96959a0" xlink:href="https://xbrl.sec.gov/country/2023/country-2023.xsd#country_US"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_9ca07562-49b3-49de-9784-92854f53cea4" xlink:to="loc_country_US_b6945a79-17c9-4757-992d-5db0e96959a0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_country_CA_43861144-2c69-472a-806d-159e59261d62" xlink:href="https://xbrl.sec.gov/country/2023/country-2023.xsd#country_CA"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_9ca07562-49b3-49de-9784-92854f53cea4" xlink:to="loc_country_CA_43861144-2c69-472a-806d-159e59261d62" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_country_IN_f3e8b14d-a2f7-4199-b7a9-c5fa23624c7c" xlink:href="https://xbrl.sec.gov/country/2023/country-2023.xsd#country_IN"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_9ca07562-49b3-49de-9784-92854f53cea4" xlink:to="loc_country_IN_f3e8b14d-a2f7-4199-b7a9-c5fa23624c7c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_d8beae22-24ee-4571-8bd1-90d67617664d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_a036f6bd-e7a2-41f1-bf86-03347e98a489" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_d8beae22-24ee-4571-8bd1-90d67617664d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_8fd244e6-d90d-4437-ad6f-d23ef1ed5192" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_a036f6bd-e7a2-41f1-bf86-03347e98a489" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_8fd244e6-d90d-4437-ad6f-d23ef1ed5192" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsHeldForSaleNotPartOfDisposalGroupCurrent_59a3e42b-a917-41e8-9990-9eaf8e1a324d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsHeldForSaleNotPartOfDisposalGroupCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_a036f6bd-e7a2-41f1-bf86-03347e98a489" xlink:to="loc_us-gaap_AssetsHeldForSaleNotPartOfDisposalGroupCurrent_59a3e42b-a917-41e8-9990-9eaf8e1a324d" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/SUBSEQUENTEVENTSDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#SUBSEQUENTEVENTSDetails"/>
  <link:definitionLink xlink:role="http://www.anipharmaceuticals.com/role/SUBSEQUENTEVENTSDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventLineItems_cc3e66f6-c7be-4132-83ed-1214ca288d30" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTable_3bd45a61-6f04-4cb4-800c-bbcf1e27c342" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SubsequentEventLineItems_cc3e66f6-c7be-4132-83ed-1214ca288d30" xlink:to="loc_us-gaap_SubsequentEventTable_3bd45a61-6f04-4cb4-800c-bbcf1e27c342" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_e77ad9e7-118b-4331-b854-a28142475b02" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3bd45a61-6f04-4cb4-800c-bbcf1e27c342" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_e77ad9e7-118b-4331-b854-a28142475b02" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_e77ad9e7-118b-4331-b854-a28142475b02_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_e77ad9e7-118b-4331-b854-a28142475b02" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_e77ad9e7-118b-4331-b854-a28142475b02_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_75ac613c-6e08-4f66-817d-e1fa6a265089" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_e77ad9e7-118b-4331-b854-a28142475b02" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_75ac613c-6e08-4f66-817d-e1fa6a265089" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NovitiumPharmaMember_02b435bc-5646-4938-a248-7eaae591a631" xlink:href="anip-20231231.xsd#anip_NovitiumPharmaMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_75ac613c-6e08-4f66-817d-e1fa6a265089" xlink:to="loc_anip_NovitiumPharmaMember_02b435bc-5646-4938-a248-7eaae591a631" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeAxis_9cdd22a6-647f-4ece-bb26-ae6277fdab19" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3bd45a61-6f04-4cb4-800c-bbcf1e27c342" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_9cdd22a6-647f-4ece-bb26-ae6277fdab19" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_9cdd22a6-647f-4ece-bb26-ae6277fdab19_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_9cdd22a6-647f-4ece-bb26-ae6277fdab19" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_9cdd22a6-647f-4ece-bb26-ae6277fdab19_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_c70d7314-eee7-44a6-a58a-7ee4244c23ab" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_9cdd22a6-647f-4ece-bb26-ae6277fdab19" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_c70d7314-eee7-44a6-a58a-7ee4244c23ab" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventMember_9397f26d-fe84-4238-877d-2924edcda050" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventTypeDomain_c70d7314-eee7-44a6-a58a-7ee4244c23ab" xlink:to="loc_us-gaap_SubsequentEventMember_9397f26d-fe84-4238-877d-2924edcda050" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_f7fddd38-a67e-466a-bd6c-524aeabe1239" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3bd45a61-6f04-4cb4-800c-bbcf1e27c342" xlink:to="loc_us-gaap_AwardTypeAxis_f7fddd38-a67e-466a-bd6c-524aeabe1239" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_f7fddd38-a67e-466a-bd6c-524aeabe1239_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_f7fddd38-a67e-466a-bd6c-524aeabe1239" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_f7fddd38-a67e-466a-bd6c-524aeabe1239_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_d5e22da4-6f41-4038-97ba-8713c8f5e822" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_f7fddd38-a67e-466a-bd6c-524aeabe1239" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_d5e22da4-6f41-4038-97ba-8713c8f5e822" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedStockMember_5fb915b3-978b-4ae0-ab6b-b846c0d39cf1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestrictedStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_d5e22da4-6f41-4038-97ba-8713c8f5e822" xlink:to="loc_us-gaap_RestrictedStockMember_5fb915b3-978b-4ae0-ab6b-b846c0d39cf1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PerformanceSharesMember_b1cd829d-8241-49c2-8a55-8ef1cdec0526" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PerformanceSharesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_d5e22da4-6f41-4038-97ba-8713c8f5e822" xlink:to="loc_us-gaap_PerformanceSharesMember_b1cd829d-8241-49c2-8a55-8ef1cdec0526" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_TitleOfIndividualAxis_62aafed2-826e-469e-977a-3aadd760f86f" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_TitleOfIndividualAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3bd45a61-6f04-4cb4-800c-bbcf1e27c342" xlink:to="loc_srt_TitleOfIndividualAxis_62aafed2-826e-469e-977a-3aadd760f86f" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_TitleOfIndividualWithRelationshipToEntityDomain_62aafed2-826e-469e-977a-3aadd760f86f_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_TitleOfIndividualWithRelationshipToEntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_TitleOfIndividualAxis_62aafed2-826e-469e-977a-3aadd760f86f" xlink:to="loc_srt_TitleOfIndividualWithRelationshipToEntityDomain_62aafed2-826e-469e-977a-3aadd760f86f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_TitleOfIndividualWithRelationshipToEntityDomain_1d22ea42-1a93-4451-b6f1-9ed4bcdfcd24" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_TitleOfIndividualWithRelationshipToEntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_TitleOfIndividualAxis_62aafed2-826e-469e-977a-3aadd760f86f" xlink:to="loc_srt_TitleOfIndividualWithRelationshipToEntityDomain_1d22ea42-1a93-4451-b6f1-9ed4bcdfcd24" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_OfficerMember_3d4ca501-baab-4d38-8e15-43ab9a5d55df" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_OfficerMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_TitleOfIndividualWithRelationshipToEntityDomain_1d22ea42-1a93-4451-b6f1-9ed4bcdfcd24" xlink:to="loc_srt_OfficerMember_3d4ca501-baab-4d38-8e15-43ab9a5d55df" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_NewEmployeesMember_5a975d99-15e6-4b5e-ad58-1230aae8aa7e" xlink:href="anip-20231231.xsd#anip_NewEmployeesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_TitleOfIndividualWithRelationshipToEntityDomain_1d22ea42-1a93-4451-b6f1-9ed4bcdfcd24" xlink:to="loc_anip_NewEmployeesMember_5a975d99-15e6-4b5e-ad58-1230aae8aa7e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_bc6b7221-0e6b-4166-96a9-787339b8c6a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3bd45a61-6f04-4cb4-800c-bbcf1e27c342" xlink:to="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_bc6b7221-0e6b-4166-96a9-787339b8c6a2" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_bc6b7221-0e6b-4166-96a9-787339b8c6a2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_bc6b7221-0e6b-4166-96a9-787339b8c6a2" xlink:to="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_bc6b7221-0e6b-4166-96a9-787339b8c6a2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_2a13663f-3822-4a5e-afdf-3155ac726a2c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_bc6b7221-0e6b-4166-96a9-787339b8c6a2" xlink:to="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_2a13663f-3822-4a5e-afdf-3155ac726a2c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_OakvilleOntarioFormerManufacturingFacilityMember_b3e492bc-a070-4196-aa05-5016d0461ac6" xlink:href="anip-20231231.xsd#anip_OakvilleOntarioFormerManufacturingFacilityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_2a13663f-3822-4a5e-afdf-3155ac726a2c" xlink:to="loc_anip_OakvilleOntarioFormerManufacturingFacilityMember_b3e492bc-a070-4196-aa05-5016d0461ac6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupClassificationAxis_bf3c07fb-606f-4f31-b3a2-768b79825a16" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupClassificationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3bd45a61-6f04-4cb4-800c-bbcf1e27c342" xlink:to="loc_us-gaap_DisposalGroupClassificationAxis_bf3c07fb-606f-4f31-b3a2-768b79825a16" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupClassificationDomain_bf3c07fb-606f-4f31-b3a2-768b79825a16_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupClassificationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DisposalGroupClassificationAxis_bf3c07fb-606f-4f31-b3a2-768b79825a16" xlink:to="loc_us-gaap_DisposalGroupClassificationDomain_bf3c07fb-606f-4f31-b3a2-768b79825a16_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupClassificationDomain_9d14f3c3-f214-46e4-a4b7-cd4a36c80915" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupClassificationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DisposalGroupClassificationAxis_bf3c07fb-606f-4f31-b3a2-768b79825a16" xlink:to="loc_us-gaap_DisposalGroupClassificationDomain_9d14f3c3-f214-46e4-a4b7-cd4a36c80915" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupHeldforsaleNotDiscontinuedOperationsMember_f2f1a989-8d43-4d9a-9f5b-4cec113bf1d3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupHeldforsaleNotDiscontinuedOperationsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisposalGroupClassificationDomain_9d14f3c3-f214-46e4-a4b7-cd4a36c80915" xlink:to="loc_us-gaap_DisposalGroupHeldforsaleNotDiscontinuedOperationsMember_f2f1a989-8d43-4d9a-9f5b-4cec113bf1d3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_LegalEntityAxis_c8e79a4f-ee05-41d1-bc46-1796ad6d81b7" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_LegalEntityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3bd45a61-6f04-4cb4-800c-bbcf1e27c342" xlink:to="loc_dei_LegalEntityAxis_c8e79a4f-ee05-41d1-bc46-1796ad6d81b7" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_c8e79a4f-ee05-41d1-bc46-1796ad6d81b7_default" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_c8e79a4f-ee05-41d1-bc46-1796ad6d81b7" xlink:to="loc_dei_EntityDomain_c8e79a4f-ee05-41d1-bc46-1796ad6d81b7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_5b600be5-46ad-47f8-a2dd-3aefd5cbc288" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_c8e79a4f-ee05-41d1-bc46-1796ad6d81b7" xlink:to="loc_dei_EntityDomain_5b600be5-46ad-47f8-a2dd-3aefd5cbc288" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CGOncologyInc.Member_8fafe551-14e3-40cb-b1ae-22fc0c3de24c" xlink:href="anip-20231231.xsd#anip_CGOncologyInc.Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_5b600be5-46ad-47f8-a2dd-3aefd5cbc288" xlink:to="loc_anip_CGOncologyInc.Member_8fafe551-14e3-40cb-b1ae-22fc0c3de24c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsidiarySaleOfStockAxis_ec704027-318d-4f65-8440-ca2112052d4c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsidiarySaleOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3bd45a61-6f04-4cb4-800c-bbcf1e27c342" xlink:to="loc_us-gaap_SubsidiarySaleOfStockAxis_ec704027-318d-4f65-8440-ca2112052d4c" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SaleOfStockNameOfTransactionDomain_ec704027-318d-4f65-8440-ca2112052d4c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SaleOfStockNameOfTransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsidiarySaleOfStockAxis_ec704027-318d-4f65-8440-ca2112052d4c" xlink:to="loc_us-gaap_SaleOfStockNameOfTransactionDomain_ec704027-318d-4f65-8440-ca2112052d4c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SaleOfStockNameOfTransactionDomain_d73ceef5-9ed5-492c-9fdb-12592c09ee78" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SaleOfStockNameOfTransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsidiarySaleOfStockAxis_ec704027-318d-4f65-8440-ca2112052d4c" xlink:to="loc_us-gaap_SaleOfStockNameOfTransactionDomain_d73ceef5-9ed5-492c-9fdb-12592c09ee78" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IPOMember_c773c100-2dea-4b29-a67d-f93f24b26a29" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IPOMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SaleOfStockNameOfTransactionDomain_d73ceef5-9ed5-492c-9fdb-12592c09ee78" xlink:to="loc_us-gaap_IPOMember_c773c100-2dea-4b29-a67d-f93f24b26a29" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis_8b4ede72-1bff-48f5-9cb1-7210be933046" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3bd45a61-6f04-4cb4-800c-bbcf1e27c342" xlink:to="loc_srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis_8b4ede72-1bff-48f5-9cb1-7210be933046" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_EquityMethodInvesteeNameDomain_8b4ede72-1bff-48f5-9cb1-7210be933046_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis_8b4ede72-1bff-48f5-9cb1-7210be933046" xlink:to="loc_srt_EquityMethodInvesteeNameDomain_8b4ede72-1bff-48f5-9cb1-7210be933046_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_EquityMethodInvesteeNameDomain_21ee9223-e4e5-4917-9707-dfc54d797940" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis_8b4ede72-1bff-48f5-9cb1-7210be933046" xlink:to="loc_srt_EquityMethodInvesteeNameDomain_21ee9223-e4e5-4917-9707-dfc54d797940" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CGOncologyInc.Member_a7b7c219-1a0d-48b2-95c7-6632c40745c7" xlink:href="anip-20231231.xsd#anip_CGOncologyInc.Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_EquityMethodInvesteeNameDomain_21ee9223-e4e5-4917-9707-dfc54d797940" xlink:to="loc_anip_CGOncologyInc.Member_a7b7c219-1a0d-48b2-95c7-6632c40745c7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_5f77a58c-7cc5-4719-a27b-f751e874e8d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_cc3e66f6-c7be-4132-83ed-1214ca288d30" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_5f77a58c-7cc5-4719-a27b-f751e874e8d4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_6e9b0ab1-f6c0-49c9-8bb4-3f8c85d6d33e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_cc3e66f6-c7be-4132-83ed-1214ca288d30" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_6e9b0ab1-f6c0-49c9-8bb4-3f8c85d6d33e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1_5bab5c72-b770-4714-bcb2-a1662bb798c8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_cc3e66f6-c7be-4132-83ed-1214ca288d30" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1_5bab5c72-b770-4714-bcb2-a1662bb798c8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationConsideration_29929f2c-342f-4a8d-a2a1-337ef6c88ec0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisposalGroupIncludingDiscontinuedOperationConsideration"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_cc3e66f6-c7be-4132-83ed-1214ca288d30" xlink:to="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationConsideration_29929f2c-342f-4a8d-a2a1-337ef6c88ec0" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_DisposalGroupIncludingDiscontinuedOperationConsiderationFirstDeposit_542f2ce1-bda7-44a2-ac3e-b43c6a469d37" xlink:href="anip-20231231.xsd#anip_DisposalGroupIncludingDiscontinuedOperationConsiderationFirstDeposit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_cc3e66f6-c7be-4132-83ed-1214ca288d30" xlink:to="loc_anip_DisposalGroupIncludingDiscontinuedOperationConsiderationFirstDeposit_542f2ce1-bda7-44a2-ac3e-b43c6a469d37" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentForContingentConsiderationLiabilityFinancingActivities_ec87d168-bcd3-4f7c-a65f-a60405ee9900" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentForContingentConsiderationLiabilityFinancingActivities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_cc3e66f6-c7be-4132-83ed-1214ca288d30" xlink:to="loc_us-gaap_PaymentForContingentConsiderationLiabilityFinancingActivities_ec87d168-bcd3-4f7c-a65f-a60405ee9900" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentOwnedAtCost_d247c6f2-32b5-46c4-a2b5-703e0878d8bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentOwnedAtCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_cc3e66f6-c7be-4132-83ed-1214ca288d30" xlink:to="loc_us-gaap_InvestmentOwnedAtCost_d247c6f2-32b5-46c4-a2b5-703e0878d8bd" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharesIssuedPricePerShare_d0d289c8-36d7-46b3-831c-f88eda2ed581" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SharesIssuedPricePerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_cc3e66f6-c7be-4132-83ed-1214ca288d30" xlink:to="loc_us-gaap_SharesIssuedPricePerShare_d0d289c8-36d7-46b3-831c-f88eda2ed581" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentOwnedBalanceShares_2b88a143-29d7-4a52-b2d0-daa50e8f694a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentOwnedBalanceShares"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_cc3e66f6-c7be-4132-83ed-1214ca288d30" xlink:to="loc_us-gaap_InvestmentOwnedBalanceShares_2b88a143-29d7-4a52-b2d0-daa50e8f694a" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentOwnedAtFairValue_ad44a11f-1aba-462b-8121-614b27f3586b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentOwnedAtFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_cc3e66f6-c7be-4132-83ed-1214ca288d30" xlink:to="loc_us-gaap_InvestmentOwnedAtFairValue_ad44a11f-1aba-462b-8121-614b27f3586b" xlink:type="arc" order="9"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://fasb.org/us-gaap/role/eedm/ExtensibleEnumerationLists" xlink:type="simple" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-roles-2023.xsd#eedm"/>
  <link:definitionLink xlink:role="http://fasb.org/us-gaap/role/eedm/ExtensibleEnumerationLists" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementAbstract"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationArrangementsChangeInAmountOfContingentConsiderationLiability1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationContingentConsiderationArrangementsChangeInAmountOfContingentConsiderationLiability1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationArrangementsChangeInAmountOfContingentConsiderationLiability1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrentAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesCurrentAbstract"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://xbrl.sec.gov/ecd/AwardTypeOnly" xlink:type="simple" xlink:href="https://xbrl.sec.gov/ecd/2023/ecd-2023.xsd#AwardTypeOnly"/>
  <link:definitionLink xlink:role="http://xbrl.sec.gov/ecd/AwardTypeOnly" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PerformanceSharesMember" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PerformanceSharesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="loc_us-gaap_PerformanceSharesMember" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedStockMember" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestrictedStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="loc_us-gaap_RestrictedStockMember" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_PerformanceBasedRestrictedStockUnitsMember_00b6c505-2721-4c95-b58d-bc5a94031c7d" xlink:href="anip-20231231.xsd#anip_PerformanceBasedRestrictedStockUnitsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="loc_anip_PerformanceBasedRestrictedStockUnitsMember_00b6c505-2721-4c95-b58d-bc5a94031c7d" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_MarketPerformanceBasedRestrictedStockUnitsMember_5657d8f6-aba8-48e1-9250-cf4f303e7494" xlink:href="anip-20231231.xsd#anip_MarketPerformanceBasedRestrictedStockUnitsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="loc_anip_MarketPerformanceBasedRestrictedStockUnitsMember_5657d8f6-aba8-48e1-9250-cf4f303e7494" xlink:type="arc" order="7"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://xbrl.sec.gov/ecd/role/IndividualsOnly" xlink:type="simple" xlink:href="https://xbrl.sec.gov/ecd/2023/ecd-2023.xsd#IndividualsOnly"/>
  <link:definitionLink xlink:role="http://xbrl.sec.gov/ecd/role/IndividualsOnly" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_ecd_AllIndividualsMember" xlink:href="https://xbrl.sec.gov/ecd/2023/ecd-2023.xsd#ecd_AllIndividualsMember"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_Mr.MuthusamyShanmugamMember_a538a6c9-0cd7-418f-86ee-24596bf8151c" xlink:href="anip-20231231.xsd#anip_Mr.MuthusamyShanmugamMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ecd_AllIndividualsMember" xlink:to="loc_anip_Mr.MuthusamyShanmugamMember_a538a6c9-0cd7-418f-86ee-24596bf8151c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_Mr.ChadGassertMember_c639d630-af8d-4344-bfb2-1318e4445fad" xlink:href="anip-20231231.xsd#anip_Mr.ChadGassertMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ecd_AllIndividualsMember" xlink:to="loc_anip_Mr.ChadGassertMember_c639d630-af8d-4344-bfb2-1318e4445fad" xlink:type="arc" order="3"/>
  </link:definitionLink>
</link:linkbase>
