Quickstart
We will demostrate how you can send a new Fine-Tune and make your first API request.
Before you can make requests to the Bodia API, you will need to grab your API key from your dashboard. You find it under Settings » API.
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.
For development purposes, you might want to use the Test API Key for development purposes, It will replicate the system behaviour without spending any money.
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.
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.
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: