> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fryte.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

The FRYTE API plans routes for electric trucks. Given an origin, destination, and vehicle, it returns where and how long to charge — optimized for time, energy, and cost. All requests use the base URL `https://api.fryte.eu`.

<CardGroup cols={3}>
  <Card title="Quickstart" icon="bolt" href="/planner/quickstart">
    Get started with your first route optimization.
  </Card>

  <Card title="Vehicles" icon="truck" href="/planner/vehicles">
    Look up the Vehicle ID required for every planner request.
  </Card>

  <Card title="Examples" icon="route" href="/planner/examples/intermediate-stops">
    Sample requests and responses for common use cases.
  </Card>
</CardGroup>

## Authentication

Every request must include your API key. Pass it in the `Authorization` header:

```
Authorization: Bearer <your-token>
```

Contact [team@fryte.eu](mailto:team@fryte.eu) to obtain your API key.

## How it works

The API is asynchronous. Submit a request, then poll for the result.

<Steps>
  <Step title="Submit your route">
    Send origin, destination, and vehicle to [`POST /planner/v2`](/api-reference/planner/submit-route-optimization). You'll receive a `job_id` to track progress and an `optimization_id` to fetch the result.
  </Step>

  <Step title="Check progress">
    Poll [`GET /planner/jobs/{job_id}`](/api-reference/planner/get-job-status) to check whether the optimization has completed.
  </Step>

  <Step title="Get your optimized route">
    Retrieve the result from [`GET /planner/optimizations/{optimization_id}/result`](/api-reference/planner/get-optimization-result).
  </Step>
</Steps>

## Key Concepts

<CardGroup cols={2}>
  <Card title="Routing" icon="map">
    The driving path between all stops.
  </Card>

  <Card title="POI Data" icon="charging-station">
    Charging stations along the route corridor.
  </Card>

  <Card title="Simulation" icon="microchip">
    Predicts how the battery drains along the route based on vehicle, payload, and terrain.
  </Card>

  <Card title="Optimization" icon="gauge-high">
    Decides where and how long to charge based on the simulation.
  </Card>
</CardGroup>
