Query parameters
-
Whether to resize the image.
-
The quality of the image, ranging from 1 (worst) to 100 (best). -1 or omitted for png
-
The size of the image ([width]x[height]). Requires resize to be true.
-
The scale of the image. Requires resize to be true.
-
The stretch factor to apply, between 0 and 1. Defaults to what is configured in the profile.
-
The black clipping to apply. Defaults to what is configured in the profile.
-
Indicates if the stretch should be unlinked. Defaults to what is configured in the profile.
-
Stream the image to the client. This will stream the image in image/jpg or image/png format.
-
Indicates if the image should be debayered
-
What bayer pattern to use for debayering, if debayer is true. If this is not specified, the api will try to use the bayer pattern that is configured in the profile as its first option, if that is set to Auto, the api will try to use the bayer pattern reported by the camera if it is connected. The fallback value is Monochrome.
Values are
Monochrome
,Color
,RGGB
,CMYG
,CMYG2
,LRGB
,BGGR
,GBRG
,GRBG
,GRGB
,GBGR
,RGBG
, orBGRG
. -
Setting this to true will leave all processing up to NINA and you will recieve exactly the same image as you see in NINA. All other parameters related to image processing will have no effect.
-
Filter the image history by image type. This is useful if you got the index of an image using the history with a filter and now want to get the image. E.g. the 3rd flat in the image history is the 3rd flat in the image endpoint.
Values are
LIGHT
,FLAT
,DARK
,BIAS
, orSNAPSHOT
. -
Whether to send the image (without streaming) as a raw FITS format. Will return an error if the image is not of type FITS.
Responses
-
Successful response
Image in png format, when stream is set to true and the image quality is not specified or set to -1
Image in jpg format, when stream is set to true and the image quality is specified
-
Invalid image index / invalid bayer pattern / image is not a FITS file
-
Internal server error, Unknown error
curl \
--request GET 'http://localhost:1888/v2/api/image/{index}'
{
"Response": "<base64 encoded image>",
"Error": "string",
"StatusCode": 200,
"Success": true,
"Type": "API"
}
{
"Response": "string",
"Error": "Index out of range",
"StatusCode": 400,
"Success": false,
"Type": "API"
}
{
"Response": "string",
"Error": "Unknown error",
"StatusCode": 500,
"Success": false,
"Type": "API"
}