Invoke model with streaming (Bedrock format)

Invokes a model with streaming using AWS Bedrock InvokeModelWithResponseStream API format.

POST
/bedrock/model/{modelId}/invoke-with-response-stream
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)

prompt?string

Text prompt to complete

max_tokens?integer
max_tokens_to_sample?integer

Anthropic-style max tokens

temperature?number
top_p?number
top_k?integer
stop?array<string>
stop_sequences?array<string>

Anthropic-style stop sequences

messages?array<object>

For Claude 3 models

system?string | array<string>

System prompt (string or array of strings)

anthropic_version?string

Response Body

curl -X POST "https://loading/{AI_GATEWAY_URL}/bedrock/model/string/invoke-with-response-stream" \  -H "Content-Type: application/json" \  -d '{}'
{}
{
  "message": "string",
  "type": "string"
}
{
  "message": "string",
  "type": "string"
}
On this page

On this page

No Headings