JSONObject obj = new JSONObject();
// Put your base64 encoded image here
obj.put("src", "data:image/png;base64,iVBOR...");
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json; charset=utf-8");
String body = obj.toString().toRequestBody(mediaType);
// Make sure to put the correct token in the Authorization header
Request request: Request = Request.Builder()
.url("https://developer.trysolvio.ai/api/text/digital")
.addHeader("Authorization", "Bearer eyJhbGciOiJSUzI1...")
Response response = client.newCall(request).execute();
// You can convert the string to JSONObject if needed
System.out.println(response.body().string());