# Calling the API

> Sometimes you just need to phone a friend.

Page: https://docs.icepack.ai/getting-started/calling-the-api/

> **Note:**
> **Public access to the Icepack Portal will be made available soon!**



In order to call the API you'll need a few things in place:

1. An API key.
2. A programming language that can form http get and post requests.
3. A model you wish to solve.

[1.]
To get an API key you'll need to register an account through the [Icepack client portal](https://portal.icepack.ai/). Registration is free and we provide a fair-usage policy for small models and request volumes. If you're looking to play around with bigger models before you commit to a purchase, feel free to drop us a mail with your use case on info@icepack.co and we'll see if we can help you out. Note that we don't save your API key on our system, so it's up to you to save it somewhere safe. If you're ever in doubt as to the sanctity of your key, or lose it, you can always disable the tarnished key on the portal and generate a new key. Users on the free tier are limited to a single active key at a time. For a step-by-step guide to signing up see the [Client Portal sign-up](/getting-started/portal-signup/) section.

> **Note:**
> Enterprise customers should contact us directly to gain access to several additional features, such as higher solver bandwidth, additional models, test end-points, bespoke modelling, SLA agreements and more.



[2.] Once you've signed up and obtained your API Key you'll be able to call the API. The API is located at the following address: https://api.icepack.ai/. If you pop to this address in a browser you'll get a message saying `invalid authorization header: Needs to have the format 'Authorization: Apitoken <token>' `. This is because requests to our API require a token so that we can verify that it's really you.

> **Note:**
> The API only supports https requests and if you omit the “s”, you’ll receive an http error code from the API.



The body of the http request should be the serialised protobuf problem envelope described in the [Problem envelope](/model-overview/problem_envelope/) section. The `Content-Type` header should be added to the http request and set to `application/protobuf`. This is currently the only supported content type on the API. The reason for this is that it ensures client-side validity of the payloads before they sent to us. Protobuf is great, in that, if you can't serialise it, we won't be able to de-serialise it. This helps combat many data-configuration issues that are often experienced when handling these kinds of problems.

The last modification to the http request is the inclusion of an Authorization header with the string value: "Apitoken <my secret key>". This is where you'll insert your API key obtained through the [Icepack client portal](https://portal.icepack.ai/). The end-point within the API varies slightly depending on the context of the model you're sending. Chances are, if you're using any of the routing API's that you'll be using an end-point which looks like this: "https://api.icepack.ai/vehicle-router/solve/"

[3.] The last choice you'll have to make is what kind of model you want to solve. To see working examples of solvable models in Java, C#, Python and R check out the github repo with the [quickstart templates](github.com/icepack-co/quickstart) for common languages. Our API is language agnostic so feel free to request an series of examples in your preferred language and we'll add them to the repo. The examples in this repo also illustrate how to form the headers correctly for the different languages to correctly make the http calls.

