Code Examples

To help you get started with integrating the ForVoyez API into your application, we provide code examples in various programming languages. These examples demonstrate how to make a request to the /describe endpoint to generate metadata for an image.

curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "image=@/path/to/your/image.jpg" \
  -F "schema={\"title\":\"string\",\"alternativeText\":\"string\",\"caption\":\"string\"}" \
  -F "keywords=playful,kittens" \
  -F "context=Playful kittens" \
  -F "language=en" \
  https://forvoyez.com/api/describe

These code examples demonstrate how to make a POST request to the /describe endpoint using different programming languages. Make sure to replace YOUR_API_KEY with your actual API key and provide the path to your image file.

The request includes the following parameters:

  • image: The image file (required)
  • schema: JSON string specifying the desired output format (optional)
  • keywords: Comma-separated list of keywords (optional)
  • context: Additional context about the image (optional)
  • language: Desired language for the output (optional, defaults to 'en')

For more detailed information on the request parameters and response format, refer to the API Documentation.

Next Steps

  • Explore the API Reference for detailed information on all available endpoints and their parameters.
  • Integrate the ForVoyez API into your application using your preferred programming language.
  • If you encounter any issues or have questions, consult the Error Codes documentation or reach out to our support team for assistance.

Start generating metadata for your images with the ForVoyez API and enhance your application's functionality!