GuidesRecipesAPI ReferenceChangelogDiscussions
Log In


Submit a job using text as inputs

modzyClient.submitJobText(String modelId, String versionId, List<String> textSource)

Submits a job based on text inputs. Any item on the list will be considered as an input.

The SDK will search the model and version provided in order to find the right input item keys.

modelIdjava.lang.StringModel identifier provided by Modzy."ed542963de"
versionIdjava.lang.StringThe model’s version number. It follows the semantic versioning format."1.0.1"
textSourcesjava.util.List<java.lang.String>A List of inputs to process.List<String> inputs = new ArrayList<>(); inputs.add("Some text");


com.modzy.sdk.model.Job object with the status from the server


List<String> inputs = new ArrayList<>();
inputs.add("Modzy is great!".getBytes(StandardCharsets.UTF_8));
Job job = modzyClient.submitJobText("ed542963de", "1.0.1", inputs);

More specific customization options are provided by the method [modzyClient.getJobClient.submitJob]{doc:javamodzyclientsubmitjob}

JobInput<String> jobInput = new JobInputText();
Map<String,String> mapSource = new HashMap<>();
mapSource.put("input.txt", "Modzy is great!");
jobInput.addSource("my-input", mapSource);
Job job = modzyClient.submitJob("ed542963de", "1.0.1", jobInput, false);