Skip to main content

Prompt with pictures

Ask about one or more pictures (a scanned form, a screenshot, a photo of a meter), or about videos with Gemini models, and return the model's answer.

Command in the Generative AI toolkit · id ooa.genai/prompt_with_images · 26 inputs (1 required), 4 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
PromptStringYesWhat you want to know about the pictures; ${...} interpolation allowed.
ImagesListNoPicture files: .png, .jpg, .gif or .webp, at most 10, each up to 20 MB; or web links starting with http:// or https://, which the provider fetches (not Amazon Bedrock).
SystemStringNoYou are a precise business assistant.Instructions for the model's role and tone.
ProviderStringNoopenaiWho runs the model: OpenAI, Azure OpenAI, Anthropic, OpenAI-compatible (LiteLLM, vLLM, Ollama), Hugging Face (its router or your own TGI server), AWS SageMaker (a model on an Amazon SageMaker endpoint), AWS Bedrock or Google Vertex AI (Gemini).
ConnectionStringNoName of a Model Connection (provider, model and key managed in one place). Leave empty to set them on this action.
ModelStringNoModel name; the deployment name for Azure OpenAI; the endpoint name for AWS SageMaker; the model or inference profile id for AWS Bedrock.
API keyCredentialNoAPI key or access token from the vault (not needed for some self-hosted endpoints). For AWS Bedrock and AWS SageMaker: the AWS secret access key (or ACCESS_KEY_ID:SECRET). For Google Vertex AI: a service-account JSON key or an access token.
Endpoint addressStringNoEndpoint; required for Azure OpenAI, Vertex AI (https://REGION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/REGION) and self-hosted models (for a TGI server, e.g. http://tgi-host:8080/v1).
Hide personal dataBooleanNotrueReplace emails, phone and card numbers, IBANs and similar before sending; restored in the answer.
AWS access key IDCredentialNoAWS Bedrock and AWS SageMaker only: AWS access key id from the vault (api_key then holds the secret access key).
AWS regionStringNoAWS Bedrock and AWS SageMaker only: AWS region, e.g. eu-west-1.
TemperatureNumberNo00 = consistent, higher = more creative.
Maximum tokensNumberNo1024Maximum answer length in tokens.
Response formatStringNotextjson: ask for one JSON object and also return it parsed.
Timeout (seconds)NumberNo0Seconds to wait for the model; 180 when 0.
Top pNumberNoNucleus sampling: only the most likely words whose chances add up to this share are used (above 0 to 1); provider default when empty.
Top kNumberNoOnly pick from this many most likely words (Anthropic models).
Stop sequencesListNoUp to 4 texts at which the model stops writing.
Presence penaltyNumberNoFrom -2 to 2; higher values push the model toward new topics (OpenAI-style providers).
Frequency penaltyNumberNoFrom -2 to 2; higher values make the model repeat itself less (OpenAI-style providers).
SeedNumberNoSame seed and settings give the same answer where the provider supports it.
AWS session tokenCredentialNoAWS Bedrock and AWS SageMaker only: the session token from the vault, when the access key is a temporary one (for example from an assumed role).
VideosListNoVideo files for Gemini models (provider google_vertex): .mp4, .mov, .mpeg, .avi, .wmv, .webm, .flv or .3gp, at most 5, each up to 20 MB.
Image detailStringNoHow closely the model looks at pictures (OpenAI and Azure OpenAI): low is quicker and cheaper, high reads fine print; auto lets the model decide.
Provider optionsDictionaryNoExtra settings for this provider, added to the request as they are, e.g. {"reasoning_effort": "low"}; a dictionary is merged into the setting of the same name.
API versionStringNo2024-06-01Azure OpenAI only: the API version to call; change it when your resource needs a newer one.

Outputs​

OutputTypeWhat it is
textStringAnswer.
jsonAnyThe answer parsed as JSON, when response_format is json.
input_tokensNumberTokens in the request (pictures included).
output_tokensNumberTokens in the answer.