Converse with model (Bedrock format)

Sends messages to a model using AWS Bedrock Converse API format.

POST
/bedrock/model/{modelId}/converse
AuthorizationBearer <token>

Bearer token authentication. Use your MPilot virtual-key JWT or admin JWT. Virtual keys (prefixed with sk-bf-) can also be passed here.

In: header

Path Parameters

modelIdstring

Model ID (e.g., anthropic.claude-3-sonnet-20240229-v1:0)

messages?array<BedrockMessage>

Array of messages for the conversation

system?array<object>

System messages/prompts

inferenceConfig?object
toolConfig?object
guardrailConfig?object
additionalModelRequestFields?object

Model-specific parameters

Empty Object

additionalModelResponseFieldPaths?array<string>
performanceConfig?object
promptVariables?object

Empty Object

requestMetadata?object

Empty Object

serviceTier?object
fallbacks?array<string>

Response Body

curl -X POST "https://loading/{AI_GATEWAY_URL}/bedrock/model/string/converse" \  -H "Content-Type: application/json" \  -d '{}'
{
  "output": {
    "message": {
      "role": "user",
      "content": [
        {
          "text": "string",
          "image": {
            "format": "jpeg",
            "source": {
              "bytes": "string"
            }
          },
          "document": {
            "format": "pdf",
            "name": "string",
            "source": {
              "bytes": "string",
              "text": "string"
            }
          },
          "toolUse": {
            "toolUseId": "string",
            "name": "string",
            "input": {}
          },
          "toolResult": {
            "toolUseId": "string",
            "content": [
              {
                "text": "string",
                "image": {
                  "format": "jpeg",
                  "source": {
                    "bytes": "string"
                  }
                },
                "document": {
                  "format": "pdf",
                  "name": "string",
                  "source": {
                    "bytes": "string",
                    "text": "string"
                  }
                },
                "toolUse": {
                  "toolUseId": "string",
                  "name": "string",
                  "input": {}
                },
                "toolResult": {},
                "guardContent": {
                  "text": {
                    "text": "string",
                    "qualifiers": [
                      "string"
                    ]
                  }
                },
                "reasoningContent": {
                  "reasoningText": {
                    "text": "string",
                    "signature": "string"
                  }
                },
                "json": {},
                "cachePoint": {
                  "type": "default"
                }
              }
            ],
            "status": "success"
          },
          "guardContent": {
            "text": {
              "text": "string",
              "qualifiers": [
                "string"
              ]
            }
          },
          "reasoningContent": {
            "reasoningText": {
              "text": "string",
              "signature": "string"
            }
          },
          "json": {},
          "cachePoint": {
            "type": "default"
          }
        }
      ]
    }
  },
  "stopReason": "end_turn",
  "usage": {
    "inputTokens": 0,
    "outputTokens": 0,
    "totalTokens": 0,
    "cacheReadInputTokens": 0,
    "cacheWriteInputTokens": 0
  },
  "metrics": {
    "latencyMs": 0
  },
  "additionalModelResponseFields": {},
  "trace": {},
  "performanceConfig": {
    "latency": "standard"
  },
  "serviceTier": {
    "type": "reserved"
  }
}
{
  "message": "string",
  "type": "string"
}
{
  "message": "string",
  "type": "string"
}
On this page

On this page

No Headings