Quickstart

We will demostrate how you can send a new Fine-Tune and make your first API request.

Creating your first Fine-Tune Model

The following examples demostrate how to send a POST request to the /finetunes endpoint, train a fine-tuned model and add some prompts.

POST
/v1/finetunes
curl --request POST \
  --url https://api.bodia.ai/v1/finetunes \  
  --header 'Authorization: Bearer API_KEY' \
  --data '{
    "title": "Fine-Tune Title",
    "name": "car",    
    "images_url": [
    "https://via.placeholder.com/512x512.jpg",
    "https://via.placeholder.com/512x512.jpg",
    "https://via.placeholder.com/512x512.jpg"
  ],
	"prompts": [{
		"prompt": "A car on the route 99 road"
	},{
		"prompt": "A mediterranean portrait of a car driving in the mediterranean sea"
	}]
}'

Listing your Fine-Tunes

The following examples show how to send a GET request to the Fine-Tunes endpoint to retrieve a list of all your Fine-Tunes.

POST
/v1/finetunes
curl -G https://api.bodia.ai/v1/finetunes \
  -H "Authorization: Bearer {API_KEY}"

Listing the Prompts of a Fine-Tune

The following examples show how to send a GET request to the Fine-Tunes endpoint to retrieve a list of all the prompts of a Fine-Tune by ID.

You have to replace TUNE_ID with the ID of the Fine-Tune you just created.

POST
/v1/finetunes
curl -G https://api.bodia.ai/v1/finetunes/{TUNE_ID}/prompts \
  -H "Authorization: Bearer {API_KEY}"

What's next?

Great, you're now set up as an API client and have made your first request to the API. Here are a few links that might be handy as you venture further into the Bodia API: