AntflyAntfly

AWS Bedrock

Bedrock embeddings and Converse generation in Antfly

The bedrock provider calls Amazon Bedrock in your AWS account.

What It Provides#

ComponentInputsNotes
EmbedderText, imagesImages need an image-capable request format: titan_multimodal or cohere_v4
GeneratorText, imagesConverse API, with streaming and structured output

Embedding request_format is one of titan_text, titan_multimodal, cohere_v3, or cohere_v4; auto selects it from the model ID. Cohere formats accept retrieval input types. Generation images can be PNG, JPEG, GIF, or WebP, in user messages only. model may be a model ID or an inference profile ARN.

Credentials#

The standard AWS credential chain: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (with AWS_SESSION_TOKEN), a profile in ~/.aws/credentials selected by AWS_PROFILE, web identity, or the container or instance role. region defaults to AWS_REGION, then AWS_DEFAULT_REGION, then us-east-1.

Example#

{
  "embedders": {
    "titan-images": {
      "provider": "bedrock",
      "model": "amazon.titan-embed-image-v1",
      "request_format": "titan_multimodal",
      "region": "us-east-1",
      "inputs": ["text", "image"]
    }
  }
}

Extraction#

Use bedrock as an extraction provider: name the model and the schema, and Antfly runs a generated extractor on that model. As an extractor producer on an enrichment:

{
  "type": "extractor",
  "config": {
    "provider": "bedrock",
    "model": "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
    "region": "us-east-1",
    "schema": {
      "entities": ["person", "company"],
      "relations": [{"type": "works_for"}]
    }
  }
}

The schema takes entities and relations. Admitted model families: Anthropic Claude 3 and later model IDs and cross-region inference profiles. Claude Opus 5.5, Sonnet 5.5, and Fable 5.1 use Converse JSON-schema output because those models reject forced tool selection. Other admitted Claude models use a forced Converse tool call. Other models, and task variants such as audio, image, search, or embedding models, are rejected when the config is saved. Scores are verdict-only.

To set instructions, output mode, probabilities, or batching, use the generated form instead, which takes the same generator config under generator:

{
  "method": "generated",
  "generator": {"provider": "bedrock", "model": "us.anthropic.claude-sonnet-4-5-20250929-v1:0", "region": "us-east-1"},
  "probabilities": "verdict_only",
  "instructions": "Only extract people named in the signature block.",
  "schema": {"entities": ["person"]}
}

The generated form, with inputs added, is also what /ai/v1/extract accepts.