The CarsXE .NET SDK provides a simple and powerful way to integrate vehicle data into your .NET applications. This guide will help you get started quickly.

For more information, see the <a href="https://www.nuget.org/packages/CarsXE" target="\_blank" style={{textDecoration: 'underline'}}>package on NuGet</a>.

## Installation

Install the CarsXE .NET package using NuGet:

`dotnet add package CarsXE`

## Setup

First, import the CarsXE client and initialize it with your API key:

<CodeGroup title="Program.cs">
```csharp
using carsxe;
string API_KEY = "YOUR_API_KEY";
CarsXE carsxe = new CarsXE(API_KEY);
```
</CodeGroup>

## Basic Usage

### VIN Specifications

<CodeGroup title="Program.cs">
```csharp
string vin = "WBAFR7C57CC811956";
try
{
    var specs = carsxe.Specs(new Dictionary<string, string> { { "vin", vin } }).Result;
    Console.WriteLine("API Response:");
    Console.WriteLine(specs.RootElement.GetProperty("input").GetProperty("vin").ToString());
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}
```
</CodeGroup>

### International VIN Decoder

<CodeGroup title="Program.cs">
```csharp
try
{
    var intvin = carsxe.InternationalVinDecoder(new Dictionary<string, string>
    {
        { "vin", "WF0MXXGBWM8R43240" }
    }).Result;
    Console.WriteLine(intvin);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}
```
</CodeGroup>

### Market Value

<CodeGroup title="Program.cs">
```csharp
try
{
    var marketvalue = carsxe.MarketValue(new Dictionary<string, string>
    {
        { "vin", "WBAFR7C57CC811956" }
    }).Result;
    Console.WriteLine(marketvalue);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}
```
</CodeGroup>

### Vehicle History

<CodeGroup title="Program.cs">
```csharp
try
{
    var history = carsxe.History(new Dictionary<string, string>
    {
        { "vin", "WBAFR7C57CC811956" }
    }).Result;
    Console.WriteLine(history);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}
```
</CodeGroup>

### License Plate Decoder

<CodeGroup title="Program.cs">
```csharp
try
{
    var decodedPlate = carsxe.PlateDecoder(new Dictionary<string, string>
    {
        { "plate", "7XER187" },
        { "state", "CA" },
        { "country", "US" }
    }).Result;
    Console.WriteLine(decodedPlate);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}
```
</CodeGroup>

### Vehicle Images

<CodeGroup title="Program.cs">
```csharp
try
{
    var images = carsxe.Images(new Dictionary<string, string>
    {
        { "make", "BMW" },
        { "model", "X5" },
        { "year", "2019" }
    }).Result;
    Console.WriteLine(images);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}
```
</CodeGroup>

### Vehicle Recalls

<CodeGroup title="Program.cs">
```csharp
try
{
    var recalls = carsxe.Recalls(new Dictionary<string, string>
    {
        { "vin", "1C4JJXR64PW696340" }
    }).Result;
    Console.WriteLine(recalls);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}
```
</CodeGroup>

### Plate Image Recognition

<CodeGroup title="Program.cs">
```csharp
try
{
    var plateimg = carsxe.PlateImageRecognition(
        "https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public"
    ).Result;
    Console.WriteLine(plateimg);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}
```
</CodeGroup>

### VIN OCR from Image

<CodeGroup title="Program.cs">
```csharp
try
{
    var vinocr = carsxe.VinOcr(
        "https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public"
    ).Result;
    Console.WriteLine(vinocr);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}
```
</CodeGroup>

### Year-Make-Model Search

<CodeGroup title="Program.cs">
```csharp
try
{
    var yymm = carsxe.YearMakeModel(new Dictionary<string, string>
    {
        { "year", "2012" },
        { "make", "BMW" },
        { "model", "5 Series" }
    }).Result;
    Console.WriteLine(yymm);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}
```
</CodeGroup>

### OBD Code Decoder

<CodeGroup title="Program.cs">
```csharp
try
{
    var obdcode = carsxe.ObdCodesDecoder(new Dictionary<string, string>
    {
        { "code", "P0115" }
    }).Result;
    Console.WriteLine(obdcode);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}
```
</CodeGroup>

### Lien and Theft

<CodeGroup title="Program.cs">
```csharp
try
{
    var lienAndTheft = carsxe.LienAndTheft(new Dictionary<string, string>
    {
        { "vin", "2C3CDXFG1FH762860" }
    }).Result;
    Console.WriteLine(lienAndTheft);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}
```
</CodeGroup>

Start building powerful automotive applications with CarsXE's .NET SDK!
