API Documentation

This section provides a comprehensive reference for the ForVoyez API. You'll find detailed information about the available endpoints, request parameters, response formats, error codes, and error messages. Use this documentation as a guide while integrating the ForVoyez API into your application.

Complete Reference of Endpoints

The ForVoyez API offers the following endpoints:

  • POST /describe: Generate metadata for an image.

For detailed information about each endpoint, including the required parameters, request examples, and response formats, refer to the individual endpoint documentation:

Details of Parameters and Responses

Each endpoint in the ForVoyez API requires specific parameters to be included in the request. These parameters can be provided as query parameters, path parameters, or request body parameters, depending on the endpoint.

The API responses are returned in JSON format and contain the requested data or relevant error information. The response format varies based on the endpoint and the success or failure of the request.

Here's an example of a request and response for the /v1/describe endpoint:

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

For more details on the parameters and responses for each endpoint, refer to the individual endpoint documentation.

Error Codes and Error Messages

If a request to the ForVoyez API fails, you'll receive an appropriate HTTP status code along with an error message in the response body. The error message provides more information about the cause of the error and helps you troubleshoot the issue.

Here are the common error codes you might encounter:

  • 400 Bad Request: The request is invalid or missing required parameters.

  • 400 No file uploaded: The image parameter is missing in the request.

  • 400 Invalid image file: The uploaded file is not a valid image format.

  • 400 Invalid schema: The provided schema is invalid or malformed.

  • 401 Unauthorized: Authentication failed.

  • 401 Unauthorized, missing Authorization header: The Authorization header is missing in the request.

  • 401 Unauthorized, invalid token: The provided API key or token is invalid.

  • 401 Unauthorized, no credit left: The user has insufficient credits to make the request.

  • 429 Too Many Requests: The request limit for your subscription plan has been exceeded.

  • 500 Internal Server Error: An unexpected error occurred on the server side.

The error response body will include an error message with more details:

400 Bad Request
Missing required parameter: image

For a complete list of error codes and their meanings, refer to the Error Codes documentation.

Next Steps

Now that you have a good understanding of the API documentation, you can:

Happy coding with the ForVoyez API!