← All extraction demos

Cargo Tag

Read the same printed label as PNG, JPEG, or WebP. The selected image is the one sent to the model.

Model cloudflare/clairic

Source

North Ridge cargo tag. Crate NR-417 weighs 18.75 kg and was inspected on 2026-07-14. Contents: ropes, flags, and filters.

Fields to extract

crate_id text
The printed crate ID.
gross_weight number
The printed gross weight in kilograms.
inspection_date date
The printed inspection date.
contents list · text
Each item on its own line under Contents.
View C# example
using ExtractionsDotNet;

using var client = OpenRouterExtractionsClient.FromEnvironment();

// With one asset and no state, the SDK points the request at that asset for you.
var response = await client.ExtractAsync(new ExtractionRequest("cloudflare/clairic",
    new Dictionary<string, ExtractionField>
    {
        ["crate_id"] = new TextField { Instructions = "The printed crate ID." },
        ["gross_weight"] = new NumberField { Unit = "kg", Decimals = 2 },
        ["inspection_date"] = new DateField { Instructions = "The printed inspection date." },
        ["contents"] = new ListField(ListItemType.Text) { Instructions = "Each item on its own line under Contents." }
    })
{
    Assets = new Dictionary<string, ExtractionAsset>
    {
        // ExtractionAssetFormat.Png, Jpeg, or Webp, matching the bytes.
        ["cargo-tag"] = new(ExtractionAssetFormat.Png, await File.ReadAllBytesAsync("cargo-tag.png"))
    }
});

Console.WriteLine($"Crate {response.GetText("crate_id").Value}: {response.GetNumber("gross_weight").Value} kg, " +
    $"inspected {response.GetDate("inspection_date").Value}");
Console.WriteLine($"Contents: {string.Join(", ", response.GetList<string>("contents").Value ?? [])}");