Authentication

API keys are associated with a project in your organization. Include the API key in the header of your request.

curl -X GET https://api.vaeroapi.com/v1/[endpoint] \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json"

Step 1. Upload files for training

Upload one or more files of your sample text for which you want to copy the style.

The files are .txt or .docx.

Each file should represent one document, such as one blog post, one report, one email, etc. If you want to train on multiple documents, upload them as separate files instead of mixing the content in one file. Alternatively, you can include multiple documents in a single file by separating each document with *** (three asterisks) on a line by itself.

curl -X POST "https://api.vaeroapi.com/v1/files" \
  -F "file=@/path/to/your/file" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: multipart/form-data"

The response will include the file IDs to use for fine-tuning.

Step 2. Fine-tune your model

Fine-tune your model based on one or more of your uploaded files. The model will learn to write in the style of those files.

For best results:

  1. Use files with a consistent style
  2. Use files of the same type that you want to style, e.g. fine-tuning on product guides will create a model that works best on product guides

The style_model is the model to fine-tune. base_model is the base AI whose output you want to style. Use general to create a style that works across different base AI models.

curl -X POST "https://api.vaeroapi.com/v1/fine_tuning/jobs" \
  -H "Content-Type: application/json" \
  -d '{
        "style_model": "vaero-1",
        "base_model": "general",
        "training_files": ["file_id_1", "file_id_2"],
        "suffix": "optional_suffix"
      }'

The response will include a fine-tuned model ID, which you will use to identify the model for inference.

Fine-tuning will usually complete in a few hours, but may take up to 24 hours based on load. The status of the job will change from ‘queued’ to ‘completed’ when finished.

Step 3. Styling

Submit the output of your base AI model to the style transform endpoint. Include the parameter model with the ID of your fine-tuned model. Include the parameter message as a string that contains the text to style.

No conversational turns or instructions to the AI need to be submitted.

If you have a large block of multi-paragraph text, include all of it in a single API call. You don’t need to segment the text into separate calls.

curl -X POST "https://api.vaeroapi.com/v1/style/transform" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -d '{
        "message": "your_text_here",
        "model": "your_fine_tuned_model_id"
      }'

The styled content is at response["choices"][0]["message"]["content"]

Step 4. Evaluating the results

You can set include_quality to true for the style/transform endpoint to include quality metrics. The quality metrics compare the personalized results from Vaero styling, the unpersonalized results from the AI model without styling, and ground_truth reflecting the training data.