> For the complete documentation index, see [llms.txt](https://apertus.gitbook.io/vr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apertus.gitbook.io/vr/samples/deep-learning/use-the-http-api.md).

# Use the HTTP API

Using the API is very easy, if you have a model that learns, and calculates x,y,z positons that you can send wia HTTP request (you can learn how to make  a request [here](https://apertus.gitbook.io/vr/tutorial-how-to-visualize-tensorflow-machine-learning-training/create-http-requests-from-python)).You run the sample either in debug or release mode. 2 windows should pop up: one is a command line in the back, the other one is wehere everything will be displayed

![](/files/-Lo54Psm9gy_rVP3WmIl)

After that, you need to post a request with the number of classes, and the file names paths.The needs the be in json format ([*here*](https://apertus.gitbook.io/vr/tutorial-how-to-visualize-tensorflow-machine-learning-training/create-http-requests-from-python) *you can see an example from python)*. If your data went through you should see something similar to this.

![](/files/-Lo557SDnKYf7mcEFNhe)

In this example we trained a model on cat and dog images. So the x and y axes are named appropriately. Right now all the images are in the same place because we haven't sent any data about their positions yet. The data with the positions must contain the x, y, z values, in the same order as their file names.&#x20;

![](/files/-Lo565MakHobaINjE42u)

If you everything went alright you should see similar thing happening on your screen. The model in this example is 85% accurate so you can crealry see that most of the images on the left are dogs, and on the fight are cats. The further away an image to the left or to the right the higher the confidence of the prediction is. In this example Hight corresponds to loss (it means how bad the prediction is), because of this the cat images on the left are higher.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://apertus.gitbook.io/vr/samples/deep-learning/use-the-http-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
