| description | Reference documentation on preparing and configuring the Mindee model inference. |
|---|---|
| icon | wrench-simple |
{% include "../../.gitbook/includes/this-is-reference-documenta....md" %}
Parameters that apply to all Mindee model types (Extraction, Split, Crop, etc).
Inference parameters control:
- which model to use
- server-side processing options
All model parameter classes inherit from a base class. In these samples we will be showing the general usage and parameters common to all.
All examples use the Extraction model (product in the SDK), but you'll need to adjust depending on the model type you are using.
The available classes are:
ExtractionParametersfor Extraction modelsSplitParametersfor Split modelsCropParametersfor Crop modelsClassificationParametersfor Classification modelsOCRParametersorOcrParametersfor Raw Text OCR models
The optional alias argument lets you attach your own identifier to a request as a free-form string.
This alias could be an internal document ID, a reference number, or a database key.
It is echoed back unchanged in both the job and result responses, making it straightforward to match API responses with your own records.
Aliases are not unique in Mindee, you can use the same alias value multiple times.
{% tabs %} {% tab title="Python" %}
inference_params = ExtractionParameters(
# ID of the model, required.
model_id="MY_MODEL_ID",
# Use an alias to link the file to your own DB.
# If set, it will be included in the job and result responses.
alias="internal-doc-id-123",
# ... any other options ...
){% endtab %}
{% tab title="Node.js" %}
const modelParams = {
// ID of the model, required.
modelId: "MY_MODEL_ID",
// Use an alias to link the file to your own DB.
// If set, it will be included in the job and result responses.
alias: "internal-doc-id-123",
// ... any other options ...
};{% endtab %}
{% tab title="PHP" %}
$modelParams = new ExtractionParameters(
// ID of the model, required.
"MY_MODEL_ID",
// Use an alias to link the file to your own DB.
// If set, it will be included in the job and result responses.
alias: "internal-doc-id-123",
// ... any other options ...
);{% endtab %}
{% tab title="Ruby" %}
inference_params = {
# ID of the model, required.
model_id: 'MY_MODEL_ID',
# Use an alias to link the file to your own DB.
# If set, it will be included in the job and result responses.
file_alias: 'internal-doc-id-123',
# ... any other options ...
}{% endtab %}
{% tab title="Java" %}
var modelParams = ExtractionParameters
// ID of the model, required.
.builder("MY_MODEL_ID")
// Use an alias to link the file to your own DB.
// If set, it will be included in the job and result responses.
.alias("internal-doc-id-123")
// ... any other options ...
// complete the builder
.build();{% endtab %}
{% tab title=".NET" %}
var modelParams = new ExtractionParameters(
// ID of the model, required.
modelId: "MY_MODEL_ID"
// Use an alias to link the file to your own DB.
// If set, it will be included in the job and result responses.
, alias: "internal-doc-id-123"
// ... any other options ...
);{% endtab %} {% endtabs %}