API 570 vs ASME B31.4/B31.8: Plant Piping vs Pipeline Boundaries
API 570 is the in-service inspection code for metallic process piping inside plants such as refineries and chemical facilities. ASME B31.4 (liquid and slurry pipelines) and ASME B31.8 (gas transmission and distribution piping) are design, construction, operation and maintenance codes for transportation pipelines. In the United States the boundary between them is set mostly by regulation: PHMSA's 49 CFR 192 and 195 govern pipelines, and Part 195 excludes in-plant piping at refineries and manufacturing facilities. Inside the plant fence, OSHA PSM, the owner's program and API 570 typically apply.
This guide maps that boundary for inspection and integrity teams: what each code covers, where regulators draw the line, what changes in inspection practice on each side, and how to handle the awkward places where plant piping and pipeline meet, such as terminals, pump stations, meter stations and breakout tanks. Code scope descriptions are taken from ASME and API public product information and federal regulations at the time of writing. Codes are revised regularly (ASME lists 2025 editions of B31.4 and B31.8; the current API 570 is the Fifth Edition, February 2024), so confirm boundary wording against the editions your program and your regulator use.
What each code is for
The three documents answer different questions, which is the root of most confusion about where one stops and another starts.
| API 570 | ASME B31.4 | ASME B31.8 | |
|---|---|---|---|
| Type of document | In-service inspection, repair, alteration and rerating code | Design, materials, construction, inspection, testing, operation and maintenance code | Design, construction, testing, operation and maintenance code |
| Typical systems | Process piping in refineries, chemical and petrochemical plants | Liquid pipelines (crude, refined products, liquid alcohol, CO2, anhydrous ammonia) and aqueous slurry pipelines, including piping in pump stations, tank farms and terminals | Gas transmission and distribution piping, including compressor stations, metering and regulating stations, mains and service lines up to the outlet of the customer's meter set assembly |
| Life-cycle stage | After the piping is placed in service | New construction through operation and maintenance | New construction through operation and maintenance |
| Who usually makes it mandatory | Owner program, OSHA PSM expectations, state or jurisdictional rules, contracts | PHMSA Part 195 (by reference in places), state pipeline regulators, contracts | PHMSA Part 192 (by reference in places), state pipeline regulators, contracts |
| Construction code it pairs with | Usually ASME B31.3 for the original construction | Is itself the construction code | Is itself the construction code |
The pairing in the last row is the key. Plant piping is normally built to ASME B31.3 and then maintained in service under API 570. Pipelines are built and operated to B31.4 or B31.8, and their in-service integrity is governed by federal or state pipeline regulations, which incorporate parts of industry standards. The API 570 vs B31.3 relationship is covered in our API 570 vs ASME B31.3 guide.
Where federal regulation draws the line in the United States
For an inspection program, the regulatory boundary matters more than any code diagram, because it decides who audits you and which rules you must meet.
Hazardous liquid and CO2 pipelines: 49 CFR 195. Part 195 sets safety standards for pipeline transportation of hazardous liquids and carbon dioxide. Its scope section excludes several things that matter at the plant fence. 49 CFR 195.1(b)(8) excludes transportation of hazardous liquid or carbon dioxide through onshore production facilities (including flow lines), refining or manufacturing facilities, or storage or in-plant piping systems associated with such facilities. 49 CFR 195.1(b)(9)(ii) excludes facilities on the grounds of a materials transportation terminal that are used exclusively to transfer hazardous liquid or carbon dioxide between non-pipeline modes of transportation, or between a non-pipeline mode and a pipeline. In plain terms: refinery in-plant piping is outside Part 195, and terminal piping used only for truck, rail or marine transfer may be outside it too, while terminal piping that is part of the pipeline system stays in.
Gas pipelines: 49 CFR 192. Part 192 prescribes minimum safety requirements for pipeline facilities and the transportation of gas. Its exclusions focus on gathering in certain circumstances, offshore production piping upstream of specified points and small petroleum gas systems. The boundary between a gas pipeline and a gas processing plant, a power plant or an industrial customer depends on Part 192's definitions and PHMSA interpretations rather than one sentence, so operators and plant owners usually document the demarcation point for each interconnect.
Breakout tanks. Part 195 reaches into tank inspection: 49 CFR 195.432 requires operators to inspect in-service atmospheric and low-pressure steel breakout tanks in accordance with API Std 653, excluding its risk-based alternative internal inspection interval provision, and applies API 510 inspection provisions to pressurized breakout tanks built to API 2510. A tank farm on a pipeline can therefore sit under PHMSA while an identical tank inside the refinery fence sits under the owner's program and other regulations.
Inside the plant. In-plant piping handling highly hazardous chemicals above threshold quantities falls under OSHA's Process Safety Management standard, 29 CFR 1910.119, whose mechanical integrity element requires inspection and testing following recognized and generally accepted good engineering practices. API 570 is widely used as that practice for process piping. EPA's Risk Management Program can apply in parallel at the same facilities.
State pipeline safety programs enforce the federal rules for intrastate lines in many states and can add requirements. The Texas Railroad Commission, for example, regulates intrastate pipelines in Texas. Confirm which agency has authority over each line.
Practical boundary points on real sites
Most disputes about which code applies occur at a handful of recurring locations. The table below shows how teams usually reason about each one. It is a framework for asking the right questions, not a ruling; the operator, owner and regulator decide each case.
| Location | Usual reasoning | What to confirm |
|---|---|---|
| Refinery receiving a crude pipeline | Pipeline under Part 195 up to the demarcation point; in-plant piping beyond it excluded from Part 195 and managed under the owner's program, often API 570 | Documented demarcation valve or flange; who owns and operates the meter skid and launcher/receiver |
| Products terminal | Piping that is part of the pipeline system stays in Part 195; piping used exclusively for transfer between non-pipeline modes may be excluded | Exactly which lines serve the pipeline and which serve truck, rail or marine transfer only |
| Liquid pipeline pump station | Station piping is pipeline-system piping designed to B31.4 and regulated under Part 195 | Whether any adjacent piping belongs to a separate plant |
| Gas compressor or meter station | Station piping is within B31.8 scope and Part 192 where the pipeline is regulated | Operator's documented regulated boundary |
| Gas supply to a plant or power station | Pipeline typically ends at the custody transfer or customer meter outlet; plant fuel gas piping beyond is plant piping, often built to B31.3 or B31.1 | Meter set ownership and the agreed demarcation |
| Tank farm on a pipeline | Breakout tanks inspected to API 653 under 195.432; associated piping in pipeline scope | Whether a tank is a breakout tank or a plant storage tank |
The best protection against gaps is a boundary drawing for each interconnect, agreed by the pipeline operator and the plant owner, showing the demarcation point, the applicable regulation on each side, and who inspects what. Many audit findings at terminals come from piping that both parties assumed the other was inspecting.
How inspection practice differs on each side of the fence
The NDE methods are often the same; the program logic around them is not.
Plant piping under API 570. The program is built on piping circuits, condition monitoring locations (CMLs), piping classes that drive inspection intervals, corrosion-rate and remaining-life calculations, external visual inspection, injection points, deadlegs, corrosion under insulation and soil-to-air interfaces. An API 570 authorized piping inspector, working for an authorized inspection agency, is central to the program. Thickness data from UT or radiographic profile shots feed the corrosion-rate calculations that set the next inspection date. See our API 570 requirements guide and the API 570 Class 1 intervals guide.
Pipelines under Parts 192 and 195. The program is built around integrity management for segments that could affect high consequence areas, with baseline and periodic assessments by in-line inspection, pressure testing or other methods the rules allow, anomaly evaluation and repair criteria, and corrosion control including cathodic protection. Part 192's gas transmission integrity management rules incorporate ASME B31.8S by reference. Field NDE on pipelines most often appears in dig verifications of in-line inspection anomalies, girth weld examination on new construction and repairs, and assessments of above-ground station piping. Personnel performing covered tasks fall under PHMSA's operator qualification rules. Our guide to ILI dig verification and API 1163 covers that workflow.
| Topic | Plant piping (API 570) | Pipeline (B31.4/B31.8 with 49 CFR 192/195) |
|---|---|---|
| Primary assessment basis | CML thickness monitoring, visual, damage-mechanism-specific NDE | In-line inspection, pressure testing, direct assessment where permitted, plus dig verification |
| Interval driver | Piping class, corrosion rate and remaining life, owner program | Regulatory reassessment intervals and integrity management plan |
| Who signs off | API 570 inspector within the owner's inspection agency | Operator's integrity management personnel; qualified individuals for covered tasks |
| Typical field NDE | UT thickness, profile RT, PAUT, corrosion mapping, guided wave screening, CUI methods | UT and PAUT at dig sites, corrosion mapping, MT/PT, girth weld RT or AUT, guided wave on cased or inaccessible spans |
| Repair framework | API 570 repair and alteration provisions, often with B31.3 for new parts | B31.4/B31.8 and the regulations' repair criteria |
ASME B31.8 at a glance for inspection teams
ASME describes B31.8, Gas Transmission and Distribution Piping Systems, as covering the design, fabrication, installation, inspection, testing and safety aspects of operation and maintenance of gas transmission and distribution systems, including gas pipelines, gas compressor stations, gas metering and regulation stations, gas mains and service lines up to the outlet of the customer's meter set assembly. The current edition listed by ASME is 2025. Its signature concepts include location classes that relate design factors to population density along the route, and requirements for testing and maintenance over the pipeline's life. Integrity management of gas pipelines is addressed in the companion supplement B31.8S. For more on the code itself, see our ASME B31.8 reference page.
The common question "does B31.8 apply inside a gas plant" is a boundary question. B31.8's scope is transmission and distribution; processing plant piping is usually designed to B31.3, and the regulated pipeline typically ends where the plant's piping begins. Document the point rather than assuming it.
ASME B31.4 at a glance, including pump stations
ASME describes B31.4, Pipeline Transportation Systems for Liquids and Slurries, as prescribing requirements for the design, materials, construction, assembly, inspection, testing, operation and maintenance of liquid pipeline systems between production fields, tank farms, natural gas processing plants, refineries, pump stations, ammonia plants, terminals (marine, rail and truck) and other delivery and receiving points, plus piping transporting aqueous slurries of nonhazardous materials. The current edition listed by ASME is 2025.
Searches about "B31.4 requirements for pumps in crude oil pipelines" usually concern pump stations. B31.4 addresses the pipeline piping and facilities at pump stations, such as station layout, isolation and protective devices; the pumps themselves are mechanical equipment typically specified to equipment standards chosen by the operator. Check the current edition's pump station provisions for specifics. See our ASME B31.4 reference page.
Where API 570 fits relative to pipelines
API 570 is written for in-service metallic piping in the refining and chemical process industries, and it can be applied by owners to other piping systems where practical. It is not a substitute for pipeline regulations. The publicly available 1998 edition stated that it shall not be used in conflict with prevailing regulatory requirements; the current edition includes a scope section listing excluded and optional systems, which you should read in full before deciding whether a line belongs in your API 570 program.
Some owners choose to manage unregulated lines, such as interplant transfer lines between their own facilities, with API 570 techniques because their inspection organization already runs API 570 programs. That can be sensible, but it is an owner decision, and it does not change the regulatory status of a line that PHMSA or a state regulator considers jurisdictional. If a line might be regulated, resolve that question first.
Canada: CSA Z662 and provincial regulators
In Canada, oil and gas pipeline systems are generally designed, built and operated to CSA Z662, Oil and gas pipeline systems, rather than B31.4 or B31.8. Federally regulated interprovincial and international pipelines fall under the Canada Energy Regulator; provincially regulated pipelines fall under provincial regulators such as the Alberta Energy Regulator. Plant process piping falls under provincial pressure equipment legislation, for example administered by ABSA in Alberta or TSSA in Ontario, typically with B31.3 for construction and an owner integrity management system for in-service inspection, where API 570 is commonly used. The plant-pipeline boundary still needs to be documented for each interconnect, and provincial requirements vary, so confirm with the regulator.
Common boundary mistakes
- Assuming the property line is the code boundary. Regulatory demarcation is set by function and definitions, not fences.
- Orphan piping. Short runs between a pipeline's demarcation valve and the plant's first block valve that neither program covers.
- Mixing interval logic. Applying API 570 class intervals to regulated pipeline segments, or pipeline reassessment intervals to plant piping.
- Misclassifying tanks. Treating a breakout tank as a plant tank, which drops the Part 195 requirement to inspect to API 653 without its risk-based interval option.
- Using the wrong construction code for repairs. Repairs to pipeline piping follow pipeline code and regulatory criteria, not B31.3.
- Undocumented demarcation. Without an agreed drawing, audits and incident investigations become arguments.
How Atlantis supports this
Atlantis performs NDE on both sides of the fence under the owner's or operator's program: UT thickness and CML surveys, corrosion mapping, PAUT, TOFD, MT, PT, VT and guided-wave screening for plant piping, and field NDE such as UT, PAUT and corrosion mapping at pipeline dig sites and station piping. Work is done by ASNT-certified technicians under ASNT Level III oversight, with results delivered to the owner's API 570 inspector or the operator's integrity team. Atlantis does not run in-line inspection tools, set intervals or perform RBI or fitness-for-service assessments. See piping circuit and CML inspection and pipeline inspection services, or request a quote within 24 hours.
Frequently asked questions
What is ANSI/ASME B31.8, Gas Transmission and Distribution Piping Systems?
It is ASME's code for the design, construction, testing, operation and maintenance of gas transmission and distribution piping, including compressor stations, metering and regulating stations, mains and service lines up to the outlet of the customer's meter set assembly. ASME lists 2025 as the current edition.
Is ASME B31.8 2015 still current?
No. ASME lists a 2025 edition. Which edition applies to a given pipeline depends on the design basis and on the edition a regulation incorporates by reference, so check both.
What are ASME B31.4 requirements for pumps in crude oil pipelines?
B31.4 covers piping and facilities at pump stations, such as layout, isolation and protective devices. The pumps are mechanical equipment specified by the operator. Check the current edition for station requirements.
Does API 570 apply to pipelines?
API 570 is written for in-service process plant piping. Pipelines regulated under 49 CFR 192 or 195 follow those regulations and their incorporated standards. Owners may apply API 570 techniques to unregulated lines as an owner decision.
Where does B31.4 end and B31.3 begin at a refinery?
Usually at a documented demarcation point where the pipeline enters the plant. Part 195 excludes in-plant piping at refining facilities, so piping beyond the demarcation is typically plant piping built to B31.3 and inspected under API 570.
Are terminal pipes covered by Part 195?
Piping that is part of the pipeline system is. Facilities used exclusively to transfer between non-pipeline modes, or between a non-pipeline mode and a pipeline, may be excluded under 195.1(b)(9)(ii). Confirm line by line.
Which code governs breakout tank inspection?
49 CFR 195.432 requires API 653 for atmospheric and low-pressure steel breakout tanks, without its risk-based alternative interval, and applies API 510 provisions to API 2510 pressurized tanks.
What is B31.8S?
The ASME supplement on managing system integrity of gas pipelines, incorporated by reference in Part 192's gas transmission integrity management rules.
What applies in Canada?
CSA Z662 for oil and gas pipelines, with federal or provincial regulators depending on the line, and provincial pressure equipment rules for plant piping.
Need NDE on a plant-pipeline interconnect? Ask about dig-site NDE, explore guided wave testing and corrosion mapping, or request a CML survey quote.
Speak to an ASNT NDT Level III
Atlantis NDT provides ASNT Level III consulting, NDT training to ASNT SNT-TC-1A, inspection management software and independent report validation. Request a free consultation and we will return a tailored quote — affordable, accessible and fully customizable to your programme.