# AutoSpec API

Car and motorcycle specifications by make, model, generation and version, over a simple REST API.

The API answers the questions people ask about a car: who makes it, which generation it belongs to, what engine and gearbox it has, how much power it makes, how big and heavy it is, and what it consumes. You query the catalogue and get JSON back, in one unit per measure.

## Base URL

Every endpoint lives under one HTTPS base:

```
https://autospec.launchit.ro/v1
```

## Quickstart

With an API key from the [developer portal](https://autospec.launchit.ro/), ask for the petrol versions of a Golf with at least 150 kW:

**Request**

```bash
curl "https://autospec.launchit.ro/v1/versions?make=volkswagen&q=golf&fuel=petrol&power_kw.gte=150" \
  -H "X-API-Key: as_live_your_key"
```

That returns the matching versions, each with its production dates, powertrain, output and body. From there, [search versions](https://autospec.launchit.ro/docs/versions), [read one version in full](https://autospec.launchit.ro/docs/version), or walk the tree from [makes](https://autospec.launchit.ro/docs/makes) down.

## How the catalogue is shaped

Four levels, each inside the one above:

| Level | Example | Holds |
|---|---|---|
| Make | Volkswagen | the brand, its country and logo |
| Model | Golf | the nameplate and the years it was on sale |
| Generation | VIII (facelift 2024) | bodies, chassis codes, production years |
| Version | 1.5 eTSI (116 Hp) Mild Hybrid DSG | the full specification |

The catalogue holds cars and motorcycles. Lists answer with cars unless a request adds `vehicle_type=motorcycle`, as [requests & responses](https://autospec.launchit.ro/docs/conventions) explains.

The **version** is where the specification lives. Every resource carries a numeric `id`, which never changes, and a `path` of slugs such as `volkswagen/golf/viii-facelift-2024`, which reads well but moves when something is renamed.

## How the API is metered

Every successful request costs **one [credit](https://autospec.launchit.ro/docs/credits)**, drawn from a daily budget shared across your account. A request that fails costs nothing, and reading your balance is free.

> **Where to go next**
>
> Start with [Authentication](https://autospec.launchit.ro/docs/authentication), then read [Requests & responses](https://autospec.launchit.ro/docs/conventions) for the conventions used throughout. The machine-readable schema is at [`/v1/openapi.json`](https://autospec.launchit.ro/v1/openapi.json), with an interactive explorer at [`/v1/docs`](https://autospec.launchit.ro/v1/docs).
