GunSpec

Compatibility

Fit is computed from mount interfaces, never from names. A firearm declares what it exposes at each position (muzzle thread, rails, optic cut, stock and grip interfaces, magazine well); an attachment declares what it requires; the engine matches the two, through a named adapter where one bridges them. A caliber, bore or minimum-barrel mismatch is never bridged and never inferred.

Every fit carries `source` and `confidence`, and they are the first two fields to read. source is the weakest evidence in the chain that produced the fit; confidence is capped by the weakest interface it went through. The values, strongest first:

  • curated: a person recorded this interface or this fit against the maker's page.
  • universal: the attachment requires nothing (a sling), so every firearm fits it.
  • inherited:parent: the interface came from the firearm's parent record.
  • inherited:platform: the interface came from a platform the firearm belongs to (an AK-100 default, a mil-spec AR-15 default).
  • inferred: the interface was derived by a script from the record's own fields, at 0.6 or below. Convention rows are the weakest inferred evidence and are labelled as such: where a firearm is tagged threaded or optics-ready but names no standard, the backfill applies industry convention (a thread by cartridge and country, an optic plate by the maker's system) at 0.5 to 0.6, with a convention: note on the interface row.

A retailer or an engineering consumer should treat `inferred`, and anything below a confidence they choose, as unverified. Pass min_confidence to hide fits computed through interfaces below that figure; nothing in a response presents an inferred or convention row as verified, and neither should a product page built on it. via[] names each interface the fit went through with its own source, so a fit can be audited hop by hop; GET /v1/firearms/{id}/interfaces lists every row with its source, confidence and inheritedFrom.

Browsing the catalog (/v1/attachments, /v1/attachments/{id}, /v1/interfaces) is open to any key. Everything that answers "does this go on that" is Studio, and a lower plan receives 403 SUBSCRIPTION_REQUIRED rather than an empty list, so never read an error as "nothing fits". fits= on the attachment list is the same computation wearing a query parameter and is gated the same way.

Auth RequiredStudio+

A platform with its default interfaces and its member firearms.

GET/v1/platforms/{id}

  • stringheaderrequired

    Your API key. Authorization: Bearer <key> is accepted in its place.

  • stringrequired

    Platform slug

    Accepts
    a lowercase slug: letters, digits and hyphens
    Example

  • object

    The response payload.

  • string

    Slug of the platform.

  • string

    Display name, as the maker writes it.

  • string | null

    Prose summary of the record, where one has been written.

  • object[]

    The mount interfaces resolved for this firearm, own rows first, then inherited.

  • string

    Where on the firearm the interface sits: muzzle, rear, top, bottom.

  • string

    Id of the interface standard, kind-prefixed, e.g. thread:1/2x28. Ids are never renamed; new spellings become aliases.

  • string

    Display name, as the maker writes it.

  • string

    What the asset is: silhouette, render, photo, schematic, model. /v1/firearms/{id}/media/{selector} addresses an asset by this.

  • number

    How well evidenced this row is, 0 to 1. A minimum, not an average: an inferred row caps every fit computed through it, and min_confidence on the endpoint hides rows below a threshold.

  • string | null

    Free-text notes that do not belong in a specific field.

  • object[]

    The firearms belonging to this platform, which inherit its default interfaces.

  • string

    Slug of the firearm.

  • string

    Display name, as the maker writes it.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 404NOT_FOUNDResource not found
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Minimum tier
Studio+
Monthly quota
150,000/mo
Rate limit
120/min
Daily cap
10,000

Figures shown are for this endpoint's minimum tier. Higher tiers raise every limit.

This read answers conditional requests. Keep the ETag from a response and send it back as If-None-Match: an unchanged record returns 304 Not Modified with no body, which counts toward your per-minute rate limit but not your daily allowance.