Developer-facing reference for authentication, image recognition, and feedback submission.
The Fishial Recognition API lets you:
The API uses JSON for authentication and feedback requests. Image recognition requests send raw binary image data in the request body.
Base URL
https://api-recognition.fishial.ai
Obtain a short-lived bearer token required for most API requests.
Endpoint
POST /v2/auth
Content-Type
Content-Type: application/json
{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}
client_id — required
client_secret — required for client keys
{
"token_type": "Bearer",
"access_token": "eyJhbGciOiJIUzI1NiJ9..."
}
curl --request POST \
--url https://api-recognition.fishial.ai/v2/auth \
--header 'Content-Type: application/json' \
--data '{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}'
Scan an image and return detected fish objects with candidate species matches.
Endpoint
POST /v2/recognize
Authorization
Authorization: Bearer YOUR_ACCESS_TOKEN
You may send the image MIME type directly:
Content-Type: image/jpeg
or use a generic binary type:
Content-Type: application/octet-stream
Both are accepted according to the current docs.
Raster
Vector
Not supported
{
"ok": true,
"queryToken": "QUERY_TOKEN",
"objects": [
{
"shape": [12.4, 40.1, 20.2, 38.6, 28.9, 45.0],
"bbox": [12, 38, 90, 120],
"species": [
{
"id": "SPECIES_UUID",
"certainty": 0.97
}
]
}
],
"definitions": {
"SPECIES_UUID": {
"commonName": "Mahi-mahi",
"scientificName": "Coryphaena hippurus",
"imageUrl": "https://..."
}
}
}
ok — boolean success indicator
queryToken — token required when sending feedback for this recognition result
objects — array of detected fish objects (best species match first)
objects[].shape — fish outline polygon as coordinate pairs
Format:
[x1, y1, x2, y2, ...]
objects[].bbox — bounding box in the form:
[x1, y1, x2, y2]
objects[].species — candidate species matches for the object
objects[].species[].id — species UUID
objects[].species[].certainty — confidence value from 0.0 to 1.0
Values > .80 is high confidence
Values < .30 is low confidence
definitions — lookup map from species UUID to display metadata
definitions[speciesId].commonName — common English name
definitions[speciesId].scientificName — Latin binomial
definitions[speciesId].imageUrl — reference image URL
curl --request POST \
--url https://api-recognition.fishial.ai/v2/recognize \
--header "Authorization: Bearer YOUR_ACCESS_TOKEN" \
--header "Content-Type: image/jpeg" \
--data-binary @fish.jpg
Recognition options are passed as custom HTTP headers on the /v2/recognize request.
Header values should use only:
Avoid:
Fishial-Fish-Detection-ThresholdControls fish detection sensitivity.
0.3 to 1.0Example:
Fishial-Fish-Detection-Threshold: 0.5
Fishial-Fish-Shape-Max-PointsControls the maximum number of points in the detected fish polygon.
Example:
Fishial-Fish-Shape-Max-Points: 64
These headers apply only when the image is being uploaded to a Fishial Portal collection. They are not described as general-purpose recognition parameters.
Fishial-Face-ObfuscationBlurs detected human faces. The source docs note that this may partially blur fish if a face is too close.
Example:
Fishial-Face-Obfuscation: true
Fishial-Image-License-CodeAllowed values include:
NoneUnknownCustomCC0-1.0CC-BY-4.0CC-BY-NC-4.0CC-BY-NC-ND-4.0CC-BY-NC-SA-4.0CC-BY-ND-4.0CC-BY-SA-4.0Fishial-Image-License-UrlLicense URL, primarily relevant when using Custom.
Fishial-Image-License-AuthorName of the image author.
Fishial-Image-License-SourceText or URL describing where the image came from.
Fishial-Image-License-NoticeAdditional copyright information.
Fishial-Image-TagsComma-separated list of tags.
Examples:
Fishial-Image-Tags: wow,a,tag
Creates three tags.
Fishial-Image-Tags: wow a tag
Creates one tag.
Fishial-Location-Lat-LonObservation coordinates in decimal degrees.
Example:
Fishial-Location-Lat-Lon: -55.260, -67.886
Send user feedback about a recognition response.
Endpoint
POST /v2/feedback
Authorization
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type
Content-Type: application/json
{
"queryToken": "QUERY_TOKEN",
"objectIndex": 0,
"opinion": "Disagree",
"suggestedSpeciesName": "Yellowfin tuna",
"suggestedSpeciesID": "SPECIES_UUID"
}
queryToken — required; returned by /v2/recognizeobjectIndex — required; zero-based object index in the recognition response
null to refer to the recognition result as a whole, for example when no fish was foundopinion — required; one of:
AgreeDisagreeUnsuresuggestedSpeciesName — optional suggested correctionsuggestedSpeciesID — optional suggested correction using a species UUID{
"ok": true
}
curl --request POST \
--url https://api-recognition.fishial.ai/v2/feedback \
--header "Authorization: Bearer YOUR_ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"queryToken": "QUERY_TOKEN",
"objectIndex": 0,
"opinion": "Agree"
}'
Unless otherwise noted, errors follow this schema:
{
"ok": false,
"error": "ERROR_CODE",
"message": "Human-readable description"
}
ok — false on errorerror — machine-readable error code suitable for application handlingmessage — human-readable English description; do not rely on exact wording for program logic
Some server-side 5xx responses may not follow this schema or may not be valid JSON.
auth_token_expired — bearer token expired; request a new tokenauth_token_invalid — bearer token invalidcredits_insufficient — not enough API creditsunsupported_file_format — image format not supportedfeedback_invalid — invalid feedback requestquery_token_invalid — queryToken expired or invalidcurl --request POST \
--url https://api-recognition.fishial.ai/v2/auth \
--header 'Content-Type: application/json' \
--data '{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}'
curl --request POST \
--url https://api-recognition.fishial.ai/v2/recognize \
--header "Authorization: Bearer YOUR_ACCESS_TOKEN" \
--header "Content-Type: image/jpeg" \
--data-binary @fish.jpg
curl --request POST \
--url https://api-recognition.fishial.ai/v2/feedback \
--header "Authorization: Bearer YOUR_ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"queryToken": "QUERY_TOKEN",
"objectIndex": 0,
"opinion": "Unsure"
}'