# Environments

Arche documentation examples target the public production API.

## Base host

Use the production host shown throughout the docs:

```text
https://api.arche.fi
```

Versioned API routes live under `/v1`.

```text
GET https://api.arche.fi/v1/edgar/companies:resolve?ticker=AAPL
```

## Schema source

The [API reference](https://docs.arche.fi/reference) renders a copy of the OpenAPI schema committed to
this site at `/openapi.json`. Use it when you need the exact parameter and
response contract for a route.

The API serves its own schema at `https://api.arche.fi/openapi.json`, without
authentication. That is the authority. CI compares the two on every pull request
and on a daily schedule, and fails when they differ, so the published copy
should never be behind — but if you are chasing a discrepancy, read the API's
copy rather than this one.

## Service metadata and status

Two routes describe the service itself rather than the data.

`/v1/system/metadata` returns static API metadata and the limits a client should
respect, including the public HTTP API version and the maximum page size. Read it
at startup instead of hard-coding a page-size ceiling:

```bash
curl -X GET "https://api.arche.fi/v1/system/metadata" \
  -H "X-Api-Key: $ARCHE_API_KEY" \
  -H "Accept: application/json"
```

`/v1/system/ingestion/status` returns how current each EDGAR feed is (when it
last succeeded, how far behind it is, and whether it is stale), so a pipeline
can check how current the corpus is before it runs:

```bash
curl -X GET "https://api.arche.fi/v1/system/ingestion/status" \
  -H "X-Api-Key: $ARCHE_API_KEY" \
  -H "Accept: application/json"
```

Both are metered in the System class rather than against your read budget, so a
status poll still answers while a large extraction job is being throttled. See
[Rate limits](https://docs.arche.fi/rate-limits).

Arche also serves two unauthenticated probes, `/health/z` for liveness and
`/health/readiness` for readiness, which report whether the service and its
dependencies are up. They carry no data and no plan requirement. Use
`/v1/system/ingestion/status` for questions about the corpus, and the probes only
for questions about the service.

## Configuration guidance

- Store the base URL in configuration, not inline in application code.
- Record the base URL together with the exact request parameters for reproducible jobs.

## Next steps

- [Overview](https://docs.arche.fi/): Start here for the product model, first request path, and key entry points.
- [Quickstart](https://docs.arche.fi/quickstart): Authenticate, resolve a company, retrieve its statements, and run an as_of query.
- [Authentication](https://docs.arche.fi/authentication): Send API keys correctly and handle authentication failures.
