SDK Docs

vertical-ai-sdk reference

Everything the /sdk overview page doesn't have room for — every domain client, every StandardsPack shape, error handling, and the gaps we haven't closed yet.

Install

$ pip install vertical-ai-sdk

That's the whole install. client.overhead, client.underground, and client.ada are all always available — none of them depend on their own source harness package (see what's not here yet for why that matters). The [overhead]/[underground]/[ada] extras still exist and are still accepted — they're currently no-ops, kept as a stable install surface in case a domain ever needs a real dependency again.

Quickstart

from vertical_ai_sdk import Client

with Client(api_key="vaico_live_...") as client:
    result = client.overhead.nesc.grade(inp, source_ref="my-tool")
    # result is a typed GradeResult, not a dict -- result.grade, result.rule_refs, result.provenance

Use with Client(...) as client: so the underlying HTTP connection closes when you're done, or call client.close() yourself if you're keeping a client alive across a longer-lived process.

Domains

Three domain clients ship today, each a thin, typed wrapper — no compute logic, no lookup tables, every method a real HTTP call. See /domains for the full 17-domain API surface; everything not listed below is reachable directly over REST (see /docs).

client.overhead

29 methods across 8 groups: conductor sag/tension, anchor strength, pole geometry (including derive_setting_depth), line balance, loading rules, clearance, grounding, and vegetation management. Jurisdiction-scoped facades narrow this down when you only work within one code:

client.overhead.nesc.grade(inp, source_ref="...")    # NESC Rule 242
client.overhead.go95.grade(inp, source_ref="...")    # GO-95 Rule 42, aliased .cpuc
client.overhead.csa.grade(inp, source_ref="...")     # CSA C22.3 No.1 Table 27
client.overhead.csa.grade_proximity(inp, source_ref="...")   # Table 28
client.overhead.csa.grade_joint_use(inp, source_ref="...")   # Table 29

Physics that was never jurisdiction-exclusive server-side (sag/tension, anchor strength, line balance, grounding, vegetation, ROW width, setting depth) stays on client.overhead directly.

client.underground

31 methods — conduit fill/jam-ratio/pulling-tension, ampacity and derating, vault sizing and working clearances, riser transitions, fault-current withstand, duct-bank design. One real asymmetry worth knowing: the source harness's own REST routes are all declared response_model=dict, so every method here returns a plain dict[str, Any] instead of a typed model — that's the real server contract, not a shortcut.

client.ada

PROWAG public right-of-way accessibility, deliberately partial: 3 of 26 available routes — check_sidewalk_slope, check_alternate_access_route, and check_bench_scoping — chosen to exercise different result shapes rather than wrapped end to end. No jurisdiction facades here; PROWAG is one federal standard, not several. Every result carries its own regulatory_status (a federal legal fact computed server-side), separate from anything a StandardsPack would customize.

StandardsPack

Generic physics and cited regulatory floors are computed server-side. A utility's own proprietary layer on top of that is a Python subclass you write and run entirely on your own machines — it never touches the network. Four shapes, each grounded in a real gap or a real production schema:

1. Margin on a code floor

NESC/GO-95/CSA clearances and tension limits stay legally fixed — you add a conservative margin on top, you don't override the floor itself.

from vertical_ai_sdk.overhead.standards import OverheadStandardsPack

my_standard = OverheadStandardsPack(clearance_margin={"primary_over_road": 0.5})
verdict = my_standard.classify_clearance(required=result.required, actual=result.required, margin_key="primary_over_road")
# verdict.effective_minimum is NESC's floor + 0.5m, not the raw code minimum

2. Pure reference data

Framing assemblies, angle limits by conductor/insulator/framing combination, span-length policy — data with no code anchor at all. Defaults to "no limit configured," never inventing a threshold on your behalf.

pack = OverheadStandardsPack(max_span_ft={"336 ACSR": 300.0})
verdict = pack.classify_span("336 ACSR", span_ft=350.0)
# verdict.compliant is False -- 350ft exceeds your own 300ft policy

3. Utility-table substitution

Setting depth and anchor pull-out capacity work differently from a margin: a published table entry replaces the server's computed floor outright. Both close real, disclosed gaps named directly in production engineering code but never built server-side.

from vertical_ai_sdk.overhead.standards import OverheadStandardsPack, PoleSettingDepthOverride

my_standard = OverheadStandardsPack(setting_depth_overrides={
    OverheadStandardsPack.setting_depth_override_key(40.0, "average_soil"):
        PoleSettingDepthOverride(height_ft=40.0, soil_condition="average_soil", depth_ft=6.5, source="Construction Standard Sec. 3.2"),
})

ansi = client.overhead.derive_setting_depth(height_ft=40.0, species="douglas_fir", source_ref="...")
verdict = my_standard.classify_setting_depth(ansi, height_ft=40.0, soil_condition="average_soil")
# verdict.effective_setting_depth_ft is your own 6.5ft -- not an "ANSI + X" margin, a direct substitute

classify_anchor_capacity works the same way against calculate_anchor_holding_capacity.

4. Jurisdiction edition tracking

Which edition of a code your own AHJs enforce, and what they've locally amended — your own operational knowledge that no domain API can know on your behalf. Lives on the base StandardsPack class, so every domain pack inherits it.

from vertical_ai_sdk.standards import JurisdictionEdition, LocalAmendment, StandardsPack

pack = StandardsPack(
    edition_registry={"CA-Example City": {"NEC": JurisdictionEdition(edition_adopted="2023", has_local_amendments=True)}},
    local_amendments={"CA-Example City": [LocalAmendment(clause="Table 110.26(A)(1) Condition 2", value=48.0, unit="in", source="Ordinance 9-1")]},
)
pack.resolve_adoption_status("CA-Example City", "NEC", loaded_edition="2023")  # -> ADOPTED_WITH_LOCAL_AMENDMENTS

Error handling

Every non-2xx response raises VerticalAiApiError, carrying the real status code and response body so you can distinguish auth, validation, and server failures without parsing exception text:

from vertical_ai_sdk import VerticalAiApiError

try:
    result = client.overhead.nesc.grade(inp, source_ref="my-tool")
except VerticalAiApiError as exc:
    if exc.status_code == 403:
        # your key's scope doesn't reach this route -- see /pricing
        ...
    print(exc.status_code, exc.detail, exc.path)

Unit conventions

There is no single fixed unit across every clearance route — lookup_nesc_table232_1_clearance returns meters, lookup_go95_table1_clearance returns inches. Every clearance result carries its own unit field — check it, don't assume. classify_clearance is deliberately unit-agnostic: it operates on whatever numbers you pass it, and keeping required/actual/your configured margin in the same unit is on you.

What's not in the SDK yet

Disclosed, not hidden — every one of these is reachable directly over the REST API today (see /docs):

  • 14 domains with no client at all yet: DER, thermal, controls, datacenter, substation (USM), generation/DER interconnection (UGM), building electrical (UBM), transmission structure (UTM), circuit (fault current/ampacity/grounding), the O-Calc/SPIDA/PLS pole-model bridges, field-capture, and line siting.
  • ada's other 23 REST routes — the 3 wrapped were chosen to prove the mechanism, not because the rest matter less.
  • underground's ~45 session-stateful MCP-only tools (vault/circuit construction) — session-scoped server-side, not REST-shaped, out of scope for a stateless client SDK.
  • A declarative YAML/JSON StandardsPack config loader — today it's Python-subclass only.
  • Equipment framing (transformer/switch/riser/cutout-fuse mounting), conductor ampacity, and insulation/environmental-district hardware selection — real convergences found while surveying utility standards, each needing its own schema design.

Version history

0.4.0
Anchor-capacity utility-table override, closing a gap named but never built in production engineering code.
0.3.0
Pole-setting-depth utility-table override; FramingAssembly angle-limit fields, surveyed from real RUS/Entergy/PG&E/SDG&E overhead standards.
0.2.0
client.ada added (partial); jurisdiction edition/local-amendment tracking generalized onto the base StandardsPack.
0.1.2–4
Jurisdiction facades (.nesc/.go95/.csa); full CSA grade-of-construction (Tables 27/28/29).
0.1.1
Removed the last real dependency on overhead-calc-harness — every type is hand-mirrored, no compute engine ships client-side.
0.1.0
First release — overhead + underground, the StandardsPack mechanism itself.