We use essential cookies to make our site work. With your consent, we may also use non-essential cookies to improve user experience and analyze website traffic…

🚀 New models by Bria.ai, generate and edit images at scale 🚀

anthropic logo

anthropic/

claude-4-opus

$16.50

in

$82.50

out

Anthropic’s most powerful model yet and the state-of-the-art coding model. It delivers sustained performance on long-running tasks that require focused effort and thousands of steps, significantly expanding what AI agents can solve. Claude Opus 4 is ideal for powering frontier agent products and features.

Partner
Public
200,000
JSON
Function
Multimodal
Claude
anthropic/claude-4-opus cover image

OpenAI-compatible HTTP API

You can POST to our OpenAI Chat Completions compatible endpoint.

Passing a url to an image is the easiest way to perform OCR.

curl "https://api.deepinfra.com/v1/openai/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DEEPINFRA_TOKEN" \
  -d '{
      "model": "anthropic/claude-4-opus",
      "max_tokens": 4092,
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "type": "image_url",
              "image_url": {
                "url": "https://url.com/to/shakespeare.png"
              }
            }
          ]
        }
      ]
    }'
copy

Another options is to read the image from a file


BASE64_IMAGE=$(base64 -w 0 shakespeare.png)

curl "https://api.deepinfra.com/v1/openai/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DEEPINFRA_TOKEN" \
  -d @- <<EOF
{
  "model": "anthropic/claude-4-opus",
  "max_tokens": 4092,
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "image_url",
          "image_url": {
            "url": "data:image/png;base64,$BASE64_IMAGE"
          }
        }
      ]
    }
  ]
}
EOF

copy

Input fields

Input Schema

Output Schema

Streaming Schema