# Make Visual AI predictions via the API

> Make Visual AI predictions via the API - Learn how to make predictions on Visual AI projects with
> API calls.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-04-24T16:03:56.295380+00:00` (UTC).

## Primary page

- [Make Visual AI predictions via the API](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-code-examples/prediction-examples/vai-pred.html): Full documentation for this topic (HTML).

## Sections on this page

- [Takeaways](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-code-examples/prediction-examples/vai-pred.html#takeaways): In-page section heading.
- [Predictions workflow](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-code-examples/prediction-examples/vai-pred.html#predictions-workflow): In-page section heading.
- [Learn More](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-code-examples/prediction-examples/vai-pred.html#learn-more): In-page section heading.
- [Documentation](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-code-examples/prediction-examples/vai-pred.html#documentation): In-page section heading.

## Related documentation

- [Developer documentation](https://docs.datarobot.com/en/docs/api/index.html): Linked from this page.
- [Developer learning](https://docs.datarobot.com/en/docs/api/dev-learning/index.html): Linked from this page.
- [Python API client user guide](https://docs.datarobot.com/en/docs/api/dev-learning/python/index.html): Linked from this page.
- [Python code examples](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-code-examples/index.html): Linked from this page.
- [Prediction code examples](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-code-examples/prediction-examples/index.html): Linked from this page.
- [base64 format](https://docs.datarobot.com/en/docs/classic-ui/modeling/special-workflows/visual-ai/vai-predictions.html#base64-encoding-format): Linked from this page.
- [Visual AI overview](https://docs.datarobot.com/en/docs/classic-ui/modeling/special-workflows/visual-ai/index.html): Linked from this page.
- [Prediction API overview](https://docs.datarobot.com/en/docs/api/reference/predapi/index.html): Linked from this page.

## Documentation content

# Make Visual AI predictions via the API

This tutorial outlines how to make predictions on Visual AI projects with API calls.
To complete this tutorial, you must have trained and deployed a visual AI model.

## Takeaways

This tutorial shows how to:

- Configure scripting code for making batch predictions via the API
- Make an API call to get batch predictions for a visual AI model
- Format images to a base64 format

## Predictions workflow

1. Prepare your data for Visual AI. Before making predictions, convert the images you want to score tobase64 format(the standard format for handling images in API calls). Note that when the model returns prediction results, images will return in base64 format. To convert data, use DataRobot's Python package, described in the guidePreparing binary data for predictions.
2. After training and deploying a Visual AI model, navigate to the deployment and access thePredictions > Prediction APItab. This tab provides the scripting code used to make predictions via the API.
3. To configure the scripting code, selectBatchas the prediction type andAPI Clientas the interface type.
4. Copy the code and save it as a Python script (e.g.,datarobot-predict.py). You can edit the script to incorporate additional steps. For example, add thepassthrough_columns_setargument toBatchPredictionJobif you would like to include columns from the input file (e.g.,image_id) to the output file.
5. Using the scripting code fromstep twoand a base64-converted image file (InputDataConverted.csv), make an API call to get predictions from the deployed model: python datarobot-predict.py InputDataConverted.csv Predictions.csv
6. Access the output file (Predictions.csv) to view prediction results.

## Learn More

## Documentation

- Visual AI overview
- Making predictions with Visual AI
- Prediction API overview
