get_ai_model_details¶
- ArtificialIntelligenceApi.get_ai_model_details(model_id, role_id, action=None, invocation_id=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get model details or invocation status
Two distinct reads on the same path, selected by the action query parameter. The two modes return different fields; both are described by AIModelDetails. action=get_details (the default when action is omitted) returns the model’s metadata: identity, status, parameters, modalities, supported inference types, adaptive-thinking capability, the Amorphic components the model is allow-listed for, and its cost tags. AdaptiveThinking is always present as a boolean. Effort is always present (an empty array for models without adaptive thinking). CostTags is always present and is an empty array when cost management is disabled for the environment. action=invoke returns the state of a single asynchronous invocation started by POST /ai/models/{model_id} and requires invocation_id. It returns UserInput, InvocationStatus, and InvocationTime, plus ModelResponse once the invocation has completed. No model metadata is returned in this mode. Poll until InvocationStatus is no longer IN_PROGRESS. Invocation records expire 30 days after creation; after that, lookup fails as an invalid invocation id. Any other action value returns GE-1010 as a 400.
- Parameters:
model_id (str) – Bedrock model identifier as stored by Amorphic, for example anthropic.claude-sonnet-4-6. With action=get_details, an unknown model_id returns IPV-1002 as a 500 (not a 404). With action=invoke, model_id is part of the invocation record key and must match the model the invocation was started against. (required)
role_id (str) – User role id (required)
action (str) – Read mode. get_details (the default) returns model metadata. invoke returns the status and result of a prior asynchronous invocation and requires invocation_id. Any other value returns GE-1010 as a 400.
invocation_id (str) – Required when action=invoke; the InvocationId returned by POST /ai/models/{model_id}. Omitting it returns IPV-1001 and an unknown or expired id returns IPV-1002, both as a 400. Ignored when action=get_details.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: GET /ai/models/{model_id}
Success (HTTP 200)¶
Model metadata when action=get_details, or invocation state when action=invoke. ModelResponse is present only once the invocation has completed successfully.
action=get_details on an enabled model
{
"ModelId": "anthropic.claude-sonnet-4-6",
"ModelName": "Claude Sonnet 4.6",
"ModelVersion": "1.0",
"ModelTokenLimit": "200000",
"ModelArn": "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-sonnet-4-6",
"ModelStatus": "Enabled",
"ProviderName": "Anthropic",
"ModelStatusMessage": "Model is enabled and ready to use.",
"ModelType": "BASE",
"ModelDescription": "General purpose reasoning model.",
"ModelTraits": "Reasoning, Long context",
"ModelParameters": {
"temperature": 0.5,
"top_p": 0.9,
"max_tokens": 4096
},
"AdaptiveThinking": true,
"Effort": [
"low",
"medium",
"high"
],
"InputModalities": [
"TEXT",
"IMAGE"
],
"OutputModalities": [
"TEXT"
],
"InferenceTypesSupported": [
"ON_DEMAND",
"INFERENCE_PROFILE"
],
"DefaultInferenceType": "INFERENCE_PROFILE",
"InferenceProfileDetails": {
"DefaultInferenceProfile": "arn:aws:bedrock:us-east-1:000000000000:inference-profile/us.anthropic.claude-sonnet-4-6",
"InferenceProfiles": [
"arn:aws:bedrock:us-east-1:000000000000:inference-profile/us.anthropic.claude-sonnet-4-6"
],
"ModelArns": [
"arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-sonnet-4-6"
]
},
"Components": [
{
"ComponentName": "agents",
"DisplayName": "Agents"
},
{
"ComponentName": "nl2sql",
"DisplayName": "SQL AI"
}
],
"CostTags": [
{
"TagKey": "BusinessUnit",
"TagValue": "analytics"
}
],
"LastModifiedTime": "2026-08-04 11:20:31",
"LastModifiedBy": "ai.platform.admin"
}
action=invoke, generation still running
{
"UserInput": "Summarize the quarterly revenue trend.",
"InvocationStatus": "IN_PROGRESS",
"InvocationTime": "2026-08-11 09:14:02"
}
action=invoke, generation finished
{
"UserInput": "Summarize the quarterly revenue trend.",
"InvocationStatus": "COMPLETED",
"InvocationTime": "2026-08-11 09:14:02",
"ModelResponse": "Revenue grew steadily across the quarter, with the strongest month at the end of the period."
}
Errors¶
Documented error codes: IPV-1001, IPV-1002, GE-1010, AUTH-1014, DB-1001, GE-1008.
HTTP 400
Input validation failure. Body is {“Message”: “<CODE> - <text>”}. Codes: IPV-1001 (invocation_id missing when action=invoke), IPV-1002 (invocation_id unknown, expired, or belonging to a different model), GE-1010 (action value is not get_details or invoke). AUTH-1014 from the role check is also returned here, not as a 403.
invocationIdMissing
{
"Message": "IPV-1001 - invocation_id must be provided as a query parameter for model invocation GET request"
}
invocationIdInvalid
{
"Message": "IPV-1002 - invocation ID provided is invalid"
}
HTTP 500
Backend failure. Body is {“Message”: “<CODE> - <text>”}. Codes: IPV-1002 (unknown model_id with action=get_details — returned as 500, not 404), DB-1001 (invocation lookup failed), GE-1008 (catch-all).
Unknown model_id with action=get_details
{
"Message": "IPV-1002 - Invalid Model - anthropic.claude-does-not-exist, resource not found."
}
backendFailure
{
"Message": "GE-1008 - Could not complete the request. Please try again."
}