{
  "openapi": "3.1.0",
  "info": {
    "title": "Anthropic Messages API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.cometapi.com"
    }
  ],
  "security": [
    {
      "apiKeyAuth": []
    }
  ],
  "paths": {
    "/v1/messages": {
      "post": {
        "summary": "Anthropic Messages",
        "operationId": "anthropic_messages",
        "description": "Send Claude requests in the Anthropic Messages format. The examples cover text and image input, conversation history, adaptive thinking, client tools, prompt caching, streaming, and server tools.",
        "parameters": [
          {
            "name": "anthropic-version",
            "in": "header",
            "required": false,
            "description": "The Anthropic API version to use. Defaults to `2023-06-01`.",
            "schema": {
              "type": "string",
              "default": "2023-06-01",
              "example": "2023-06-01"
            }
          },
          {
            "name": "anthropic-beta",
            "in": "header",
            "required": false,
            "description": "Comma-separated feature identifiers required by a specific beta API feature. Omit this header for the examples on this page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "messages",
                  "max_tokens"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "description": "The Claude model to use. See the [Models page](/overview/models) for available Claude model IDs.",
                    "example": "claude-opus-5",
                    "default": "claude-opus-5"
                  },
                  "messages": {
                    "type": "array",
                    "description": "Conversation history. Use user and assistant messages with text strings or content-block arrays. Return complete assistant content blocks when continuing a tool call.",
                    "items": {
                      "type": "object",
                      "required": [
                        "role",
                        "content"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "description": "The role of the message author.",
                          "enum": [
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "description": "The message content. Either a plain string or an array of content blocks for multimodal input.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "The content block type.",
                                    "enum": [
                                      "text",
                                      "image",
                                      "document",
                                      "thinking",
                                      "redacted_thinking",
                                      "tool_use",
                                      "tool_result",
                                      "server_tool_use",
                                      "web_fetch_tool_result",
                                      "web_search_tool_result"
                                    ]
                                  },
                                  "text": {
                                    "type": "string",
                                    "description": "Text content (for `text` type blocks)."
                                  },
                                  "source": {
                                    "type": "object",
                                    "description": "Source data for `image` or `document` blocks.",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "base64",
                                          "url"
                                        ],
                                        "description": "Image source type: `url` for a public image URL, or `base64` for inline data."
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "description": "Image MIME type for base64 sources, such as `image/jpeg` or `image/png`."
                                      },
                                      "data": {
                                        "type": "string",
                                        "description": "Base64-encoded image bytes when `type` is `base64`."
                                      },
                                      "url": {
                                        "type": "string",
                                        "description": "Public HTTPS URL for the image or document."
                                      }
                                    }
                                  },
                                  "cache_control": {
                                    "type": "object",
                                    "description": "Cache control for prompt caching. Set `{\"type\": \"ephemeral\"}` to cache this content block.",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "ephemeral"
                                        ],
                                        "description": "Cache control type. Use `ephemeral`."
                                      },
                                      "ttl": {
                                        "type": "string",
                                        "enum": [
                                          "5m",
                                          "1h"
                                        ],
                                        "description": "Cache lifetime. Use 5m for five minutes or 1h for one hour. The default is 5m."
                                      }
                                    }
                                  },
                                  "id": {
                                    "type": "string",
                                    "description": "The ID from a returned tool_use block. Preserve this value in assistant history."
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "The function name in a tool_use block."
                                  },
                                  "input": {
                                    "type": "object",
                                    "description": "Function arguments in a tool_use block."
                                  },
                                  "tool_use_id": {
                                    "type": "string",
                                    "description": "The ID of the tool_use block answered by this tool_result."
                                  },
                                  "content": {
                                    "description": "Tool result content: a string, an array of content blocks, or a server-tool result or error object.",
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object"
                                        }
                                      },
                                      {
                                        "type": "object"
                                      }
                                    ]
                                  },
                                  "is_error": {
                                    "type": "boolean",
                                    "description": "Set true when a client tool_result reports a failed tool execution."
                                  },
                                  "thinking": {
                                    "type": "string",
                                    "description": "Thinking content returned in an assistant block. Preserve it unchanged in conversation history."
                                  },
                                  "signature": {
                                    "type": "string",
                                    "description": "Thinking signature returned by the API. Preserve it unchanged with its thinking block."
                                  }
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  },
                  "max_tokens": {
                    "type": "integer",
                    "description": "The maximum number of tokens to generate. The model may stop before reaching this limit. When using `thinking`, the thinking tokens count towards this limit.",
                    "minimum": 1,
                    "example": 1024
                  },
                  "system": {
                    "description": "System prompt providing context and instructions to Claude. Can be a plain string or an array of content blocks (useful for prompt caching).",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "text"
                              ],
                              "description": "Content block type, `text`."
                            },
                            "text": {
                              "type": "string",
                              "description": "System prompt text for this block."
                            },
                            "cache_control": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "ephemeral"
                                  ],
                                  "description": "Cache control type. Use `ephemeral`."
                                },
                                "ttl": {
                                  "type": "string",
                                  "enum": [
                                    "5m",
                                    "1h"
                                  ],
                                  "description": "Cache lifetime. Use 5m for five minutes or 1h for one hour. The default is 5m."
                                }
                              },
                              "description": "Marks this system block as a prompt-cache breakpoint."
                            }
                          }
                        }
                      }
                    ]
                  },
                  "temperature": {
                    "type": "number",
                    "description": "Sampling temperature. The examples omit sampling overrides.",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "top_p": {
                    "type": "number",
                    "description": "Nucleus sampling threshold. The examples omit sampling overrides.",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "top_k": {
                    "type": "integer",
                    "description": "Limits sampling to the k most likely tokens. The examples omit sampling overrides.",
                    "minimum": 0
                  },
                  "stream": {
                    "type": "boolean",
                    "description": "If `true`, stream the response incrementally using Server-Sent Events (SSE). Events include `message_start`, `content_block_start`, `content_block_delta`, `content_block_stop`, `message_delta`, and `message_stop`.",
                    "default": false
                  },
                  "stop_sequences": {
                    "type": "array",
                    "description": "Custom strings that cause the model to stop generating when encountered. The stop sequence is not included in the response.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "thinking": {
                    "type": "object",
                    "description": "Thinking configuration. The adaptive example uses type adaptive and sets output_config.effort separately.",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "Thinking mode. Use adaptive for the example on this page. Other values depend on the selected model.",
                        "enum": [
                          "adaptive",
                          "disabled",
                          "enabled"
                        ]
                      },
                      "budget_tokens": {
                        "type": "integer",
                        "description": "Token budget for models that support manual thinking with type enabled. Omit this field when using type adaptive.",
                        "minimum": 1024
                      },
                      "display": {
                        "type": "string",
                        "description": "Controls visible thinking blocks on models that support display selection. `summarized` returns a readable thinking summary; `omitted` returns an empty thinking field with continuity metadata where applicable.",
                        "enum": [
                          "summarized",
                          "omitted"
                        ]
                      }
                    }
                  },
                  "tools": {
                    "type": "array",
                    "description": "Client tools define a name and input_schema. Server tools use a versioned type and name, such as the web_fetch and web_search examples on this page.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Tool name. The model repeats it in `tool_use` blocks when it calls the tool."
                        },
                        "description": {
                          "type": "string",
                          "description": "A description of what the tool does."
                        },
                        "input_schema": {
                          "type": "object",
                          "description": "JSON Schema defining the tool's input parameters."
                        },
                        "type": {
                          "type": "string",
                          "description": "Versioned server tool type. The basic examples use web_fetch_20250910 and web_search_20250305."
                        },
                        "max_uses": {
                          "type": "integer",
                          "description": "Maximum uses of this server tool within one request."
                        }
                      }
                    }
                  },
                  "tool_choice": {
                    "type": "object",
                    "description": "Controls how the model uses tools.",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "The tool choice mode: `auto` (model decides), `any` (must use a tool), `tool` (must use a specific tool), or `none` (no tools).",
                        "enum": [
                          "auto",
                          "any",
                          "tool",
                          "none"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "description": "The specific tool name to use. Required when `type` is `tool`."
                      },
                      "disable_parallel_tool_use": {
                        "type": "boolean",
                        "description": "If `true`, prevent the model from calling multiple tools in parallel."
                      }
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "description": "Request metadata for tracking and analytics.",
                    "properties": {
                      "user_id": {
                        "type": "string",
                        "description": "An external identifier for the user making the request. Used for abuse detection."
                      }
                    }
                  },
                  "output_config": {
                    "type": "object",
                    "description": "Configuration for reasoning effort and structured output.",
                    "properties": {
                      "effort": {
                        "type": "string",
                        "description": "Reasoning effort. The examples use low for a brief answer and xhigh with adaptive thinking.",
                        "enum": [
                          "low",
                          "medium",
                          "high",
                          "xhigh",
                          "max"
                        ],
                        "example": "medium"
                      },
                      "format": {
                        "type": "object",
                        "description": "Structured output configuration for supported models. See the [structured outputs documentation](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) for schema requirements.",
                        "required": [
                          "type",
                          "schema"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "json_schema"
                            ],
                            "description": "Set json_schema to request output matching the supplied schema."
                          },
                          "schema": {
                            "type": "object",
                            "description": "JSON Schema that describes the requested output."
                          }
                        }
                      }
                    }
                  },
                  "service_tier": {
                    "type": "string",
                    "description": "The service tier to use. `auto` tries priority capacity first, `standard_only` uses only standard capacity.",
                    "enum": [
                      "auto",
                      "standard_only"
                    ]
                  }
                }
              },
              "examples": {
                "Default": {
                  "summary": "Basic message",
                  "value": {
                    "model": "claude-opus-5",
                    "max_tokens": 1000,
                    "messages": [
                      {
                        "role": "user",
                        "content": "Suggest three search queries about renewable energy storage."
                      }
                    ]
                  }
                },
                "Image Input": {
                  "summary": "Image Input",
                  "value": {
                    "model": "claude-opus-5",
                    "max_tokens": 1000,
                    "messages": [
                      {
                        "role": "user",
                        "content": [
                          {
                            "type": "image",
                            "source": {
                              "type": "url",
                              "url": "https://picsum.photos/seed/comet/800/600.jpg"
                            }
                          },
                          {
                            "type": "text",
                            "text": "Describe the visible scene in one sentence."
                          }
                        ]
                      }
                    ],
                    "stream": true
                  }
                },
                "Prompt Cache": {
                  "summary": "With prompt caching",
                  "value": {
                    "model": "claude-sonnet-5",
                    "max_tokens": 1024,
                    "messages": [
                      {
                        "role": "user",
                        "content": "How long can customers return damaged books, and what must they provide?"
                      }
                    ],
                    "system": [
                      {
                        "type": "text",
                        "text": "Comet Books sample reference. The following policies describe a fictional bookstore.\n\nSection 1: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 2: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 3: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 4: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 5: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 6: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 7: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 8: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 9: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 10: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 11: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 12: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 13: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 14: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 15: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 16: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 17: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 18: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 19: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 20: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 21: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 22: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 23: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 24: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 25: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 26: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 27: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.\nSection 28: Damaged books may be returned within 30 days. A receipt is required. Unopened stationery may be exchanged within 14 days. Digital downloads are final. Staff record the order reference and explain the return steps clearly.",
                        "cache_control": {
                          "type": "ephemeral"
                        }
                      }
                    ],
                    "stream": true
                  },
                  "description": "The code samples read this reference material from a local UTF-8 reference.txt file. Keep the cached prefix unchanged when repeating the request."
                },
                "Streaming": {
                  "summary": "Streaming response",
                  "value": {
                    "model": "claude-opus-5",
                    "max_tokens": 1024,
                    "messages": [
                      {
                        "role": "user",
                        "content": "Write a two-line poem about a comet."
                      }
                    ],
                    "stream": true
                  }
                },
                "Web Fetch": {
                  "summary": "With web fetch tool",
                  "value": {
                    "model": "claude-sonnet-5",
                    "max_tokens": 2048,
                    "messages": [
                      {
                        "role": "user",
                        "content": "Fetch https://arxiv.org/abs/1512.03385 and state the paper title and the proposed learning framework in two sentences."
                      }
                    ],
                    "tools": [
                      {
                        "type": "web_fetch_20250910",
                        "name": "web_fetch",
                        "max_uses": 3
                      }
                    ],
                    "stream": true
                  }
                },
                "Adaptive Thinking": {
                  "summary": "With adaptive thinking and effort",
                  "value": {
                    "model": "claude-opus-5",
                    "max_tokens": 4096,
                    "messages": [
                      {
                        "role": "user",
                        "content": "A shop sells notebooks for $7 each. Buying three earns a $4 discount. A customer pays $20 for three notebooks. Calculate the total and the change, and explain your steps."
                      }
                    ],
                    "thinking": {
                      "type": "adaptive"
                    },
                    "output_config": {
                      "effort": "xhigh"
                    },
                    "stream": true
                  }
                },
                "Effort control": {
                  "summary": "Stream a concise response with low effort",
                  "value": {
                    "model": "claude-opus-5",
                    "max_tokens": 1000,
                    "messages": [
                      {
                        "role": "user",
                        "content": "Summarize the benefit of automated tests in one sentence."
                      }
                    ],
                    "output_config": {
                      "effort": "low"
                    },
                    "stream": true
                  }
                },
                "Web Search": {
                  "summary": "Web Search",
                  "value": {
                    "model": "claude-sonnet-5",
                    "max_tokens": 4096,
                    "messages": [
                      {
                        "role": "user",
                        "content": "Search the web for the official Python 3.14 release date. Answer with the date and cite a source."
                      }
                    ],
                    "tools": [
                      {
                        "type": "web_search_20250305",
                        "name": "web_search",
                        "max_uses": 3
                      }
                    ],
                    "stream": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response. When `stream` is `true`, the response is a stream of SSE events.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Message identifier returned by the API."
                    },
                    "type": {
                      "type": "string",
                      "description": "Always `message`.",
                      "enum": [
                        "message"
                      ]
                    },
                    "role": {
                      "type": "string",
                      "description": "Always `assistant`.",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "content": {
                      "type": "array",
                      "description": "The response content blocks. May include `text`, `thinking`, `tool_use`, and other block types.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "Content block type, such as text, thinking, tool_use, server_tool_use, web_fetch_tool_result, or web_search_tool_result."
                          },
                          "text": {
                            "type": "string",
                            "description": "The generated text (for `text` blocks)."
                          },
                          "thinking": {
                            "type": "string",
                            "description": "Thinking text or summary for `thinking` blocks when the selected model returns visible thinking content."
                          },
                          "signature": {
                            "type": "string",
                            "description": "Cryptographic signature for the thinking block."
                          },
                          "id": {
                            "type": "string",
                            "description": "Tool use ID (for `tool_use` blocks)."
                          },
                          "name": {
                            "type": "string",
                            "description": "Tool name (for `tool_use` blocks)."
                          },
                          "input": {
                            "type": "object",
                            "description": "Tool input arguments (for `tool_use` blocks)."
                          },
                          "tool_use_id": {
                            "type": "string",
                            "description": "The server tool call answered by this result block."
                          },
                          "content": {
                            "description": "Server tool results or an error object. Inspect the block type before reading its fields.",
                            "oneOf": [
                              {
                                "type": "object"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "object"
                                }
                              }
                            ]
                          },
                          "citations": {
                            "type": "array",
                            "description": "Source citations attached to a text block when returned.",
                            "items": {
                              "type": "object"
                            }
                          }
                        }
                      }
                    },
                    "model": {
                      "type": "string",
                      "description": "Model ID reported by the response."
                    },
                    "stop_reason": {
                      "type": "string",
                      "description": "Why the model stopped generating. `refusal` can be returned as a successful HTTP response when the model declines a request.",
                      "enum": [
                        "end_turn",
                        "max_tokens",
                        "stop_sequence",
                        "tool_use",
                        "pause_turn",
                        "refusal"
                      ]
                    },
                    "stop_sequence": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The stop sequence that caused the model to stop, if applicable."
                    },
                    "usage": {
                      "type": "object",
                      "description": "Token usage statistics.",
                      "properties": {
                        "input_tokens": {
                          "type": "integer",
                          "description": "Uncached input tokens processed for the request. Cache creation and cache reads have separate counters."
                        },
                        "output_tokens": {
                          "type": "integer",
                          "description": "Total output tokens, including thinking when the model uses thinking."
                        },
                        "cache_creation_input_tokens": {
                          "type": "integer",
                          "description": "Number of input tokens used to create the prompt cache."
                        },
                        "cache_read_input_tokens": {
                          "type": "integer",
                          "description": "Number of input tokens read from the prompt cache."
                        },
                        "cache_creation": {
                          "type": "object",
                          "description": "Detailed cache creation token breakdown by TTL tier.",
                          "properties": {
                            "ephemeral_5m_input_tokens": {
                              "type": "integer",
                              "description": "Tokens written to 5-minute ephemeral cache."
                            },
                            "ephemeral_1h_input_tokens": {
                              "type": "integer",
                              "description": "Tokens written to 1-hour ephemeral cache."
                            }
                          }
                        },
                        "output_tokens_details": {
                          "type": "object",
                          "description": "Detailed output token breakdown when returned by the selected model.",
                          "properties": {
                            "thinking_tokens": {
                              "type": "integer",
                              "description": "Number of output tokens used for model thinking when reported."
                            }
                          }
                        },
                        "server_tool_use": {
                          "type": "object",
                          "description": "Server tool request counts when server tools are used.",
                          "properties": {
                            "web_fetch_requests": {
                              "type": "integer",
                              "description": "Number of web fetch requests."
                            },
                            "web_search_requests": {
                              "type": "integer",
                              "description": "Number of web search requests."
                            }
                          }
                        }
                      }
                    }
                  },
                  "example": {
                    "id": "msg_example",
                    "type": "message",
                    "role": "assistant",
                    "model": "claude-opus-5",
                    "content": [
                      {
                        "type": "text",
                        "text": "Here are three search queries covering different angles of the topic:\n\n1. **\"grid-scale battery storage cost trends 2024 2025\"**\n — Targets economics and recent price data for lithium-ion and other utility-scale systems.\n\n2. **\"long-duration energy storage technologies comparison flow battery vs compressed air vs thermal\"**\n — Surfaces technical comparisons of options for storage beyond the 4–8 hour range, where lithium-ion becomes less cost-effective.\n\n3. **\"green hydrogen seasonal storage feasibility round-trip efficiency\"**\n — Digs into the viability of hydrogen for multi-week or seasonal balancing, including its efficiency penalties.\n\n**A few tips for refining these:**\n- Add `site:.gov` or `site:.edu` to prioritize research and agency reports (e.g., NREL, IEA, DOE).\n- Append a region like `Europe`, `India`, or `California` if you need location-specific policy or deployment data.\n- Try `filetype:pdf` to pull up technical white papers and government studies directly.\n\nWant me to tailor these toward a specific use case — academic research, investment analysis, or policy work?"
                      }
                    ],
                    "stop_reason": "end_turn",
                    "stop_sequence": null,
                    "usage": {
                      "input_tokens": 23,
                      "cache_creation_input_tokens": 0,
                      "cache_read_input_tokens": 0,
                      "cache_creation": {
                        "ephemeral_5m_input_tokens": 0,
                        "ephemeral_1h_input_tokens": 0
                      },
                      "output_tokens": 437,
                      "output_tokens_details": {
                        "thinking_tokens": 50
                      }
                    }
                  }
                },
                "example": {
                  "id": "msg_example",
                  "type": "message",
                  "role": "assistant",
                  "model": "claude-opus-5",
                  "content": [
                    {
                      "type": "text",
                      "text": "Here are three search queries covering different angles of the topic:\n\n1. **\"grid-scale battery storage cost trends 2024 2025\"**\n — Targets economics and recent price data for lithium-ion and other utility-scale systems.\n\n2. **\"long-duration energy storage technologies comparison flow battery vs compressed air vs thermal\"**\n — Surfaces technical comparisons of options for storage beyond the 4–8 hour range, where lithium-ion becomes less cost-effective.\n\n3. **\"green hydrogen seasonal storage feasibility round-trip efficiency\"**\n — Digs into the viability of hydrogen for multi-week or seasonal balancing, including its efficiency penalties.\n\n**A few tips for refining these:**\n- Add `site:.gov` or `site:.edu` to prioritize research and agency reports (e.g., NREL, IEA, DOE).\n- Append a region like `Europe`, `India`, or `California` if you need location-specific policy or deployment data.\n- Try `filetype:pdf` to pull up technical white papers and government studies directly.\n\nWant me to tailor these toward a specific use case — academic research, investment analysis, or policy work?"
                    }
                  ],
                  "stop_reason": "end_turn",
                  "stop_sequence": null,
                  "usage": {
                    "input_tokens": 23,
                    "cache_creation_input_tokens": 0,
                    "cache_read_input_tokens": 0,
                    "cache_creation": {
                      "ephemeral_5m_input_tokens": 0,
                      "ephemeral_1h_input_tokens": 0
                    },
                    "output_tokens": 437,
                    "output_tokens_details": {
                      "thinking_tokens": 50
                    }
                  }
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "Anthropic SSE events. A completed message ends with message_stop; text_delta events contain text fragments."
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python",
            "label": "Basic",
            "source": "import os\nimport anthropic\n\nclient = anthropic.Anthropic(\n    base_url=\"https://api.cometapi.com\",\n    api_key=os.environ[\"COMETAPI_KEY\"],\n)\n\nmessage = client.messages.create(\n    model=\"claude-opus-5\",\n    max_tokens=1000,\n    messages=[\n        {\n            \"role\": \"user\",\n            \"content\": \"Suggest three search queries about renewable energy storage.\",\n        },\n    ],\n)\n\nfor block in message.content:\n    if block.type == \"text\":\n        print(block.text)\n"
          },
          {
            "lang": "Python",
            "label": "Prompt Cache",
            "source": "import os\nfrom pathlib import Path\nimport anthropic\n\nclient = anthropic.Anthropic(\n    base_url=\"https://api.cometapi.com\",\n    api_key=os.environ[\"COMETAPI_KEY\"],\n)\n\nreference = Path(\"reference.txt\").read_text(encoding=\"utf-8\")\n\nwith client.messages.stream(\n    model=\"claude-sonnet-5\",\n    max_tokens=1024,\n    messages=[\n        {\n            \"role\": \"user\",\n            \"content\": \"How long can customers return damaged books, and what must they provide?\",\n        },\n    ],\n    system=[\n        {\n            \"type\": \"text\",\n            \"text\": reference,\n            \"cache_control\": {\n                \"type\": \"ephemeral\",\n            },\n        },\n    ],\n) as stream:\n    message = stream.get_final_message()\n\nfor block in message.content:\n    if block.type == \"text\":\n        print(block.text)\n\nprint(message.usage.model_dump_json())\n"
          },
          {
            "lang": "Python",
            "label": "Adaptive thinking",
            "source": "import os\nimport anthropic\n\nclient = anthropic.Anthropic(\n    base_url=\"https://api.cometapi.com\",\n    api_key=os.environ[\"COMETAPI_KEY\"],\n)\n\nwith client.messages.stream(\n    model=\"claude-opus-5\",\n    max_tokens=4096,\n    messages=[\n        {\n            \"role\": \"user\",\n            \"content\": \"A shop sells notebooks for $7 each. Buying three earns a $4 discount. A customer pays $20 for three notebooks. Calculate the total and the change, and explain your steps.\",\n        },\n    ],\n    thinking={\n        \"type\": \"adaptive\",\n    },\n    output_config={\n        \"effort\": \"xhigh\",\n    },\n) as stream:\n    message = stream.get_final_message()\n\nfor block in message.content:\n    if block.type == \"text\":\n        print(block.text)\n"
          },
          {
            "lang": "Python",
            "label": "Effort control",
            "source": "import os\nimport anthropic\n\nclient = anthropic.Anthropic(\n    base_url=\"https://api.cometapi.com\",\n    api_key=os.environ[\"COMETAPI_KEY\"],\n)\n\nwith client.messages.stream(\n    model=\"claude-opus-5\",\n    max_tokens=1000,\n    messages=[\n        {\n            \"role\": \"user\",\n            \"content\": \"Summarize the benefit of automated tests in one sentence.\",\n        },\n    ],\n    output_config={\n        \"effort\": \"low\",\n    },\n) as stream:\n    message = stream.get_final_message()\n\nfor block in message.content:\n    if block.type == \"text\":\n        print(block.text)\n"
          },
          {
            "lang": "Python",
            "label": "Streaming",
            "source": "import os\nimport anthropic\n\nclient = anthropic.Anthropic(\n    base_url=\"https://api.cometapi.com\",\n    api_key=os.environ[\"COMETAPI_KEY\"],\n)\n\nwith client.messages.stream(\n    model=\"claude-opus-5\",\n    max_tokens=1024,\n    messages=[\n        {\n            \"role\": \"user\",\n            \"content\": \"Write a two-line poem about a comet.\",\n        },\n    ],\n) as stream:\n    for text in stream.text_stream:\n        print(text, end=\"\", flush=True)\n"
          },
          {
            "lang": "Python",
            "label": "Web Fetch",
            "source": "import os\nimport anthropic\n\nclient = anthropic.Anthropic(\n    base_url=\"https://api.cometapi.com\",\n    api_key=os.environ[\"COMETAPI_KEY\"],\n)\n\nwith client.messages.stream(\n    model=\"claude-sonnet-5\",\n    max_tokens=2048,\n    messages=[\n        {\n            \"role\": \"user\",\n            \"content\": \"Fetch https://arxiv.org/abs/1512.03385 and state the paper title and the proposed learning framework in two sentences.\",\n        },\n    ],\n    tools=[\n        {\n            \"type\": \"web_fetch_20250910\",\n            \"name\": \"web_fetch\",\n            \"max_uses\": 3,\n        },\n    ],\n) as stream:\n    message = stream.get_final_message()\n\nfor block in message.content:\n    if block.type == \"text\":\n        print(block.text)\n\nfor block in message.content:\n    if block.type == \"web_fetch_tool_result\":\n        print(block.model_dump_json())\n"
          },
          {
            "lang": "Python",
            "label": "Image Input",
            "source": "import os\nimport anthropic\n\nclient = anthropic.Anthropic(\n    base_url=\"https://api.cometapi.com\",\n    api_key=os.environ[\"COMETAPI_KEY\"],\n)\n\nwith client.messages.stream(\n    model=\"claude-opus-5\",\n    max_tokens=1000,\n    messages=[\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"image\",\n                    \"source\": {\n                        \"type\": \"url\",\n                        \"url\": \"https://picsum.photos/seed/comet/800/600.jpg\",\n                    },\n                },\n                {\n                    \"type\": \"text\",\n                    \"text\": \"Describe the visible scene in one sentence.\",\n                },\n            ],\n        },\n    ],\n) as stream:\n    message = stream.get_final_message()\n\nfor block in message.content:\n    if block.type == \"text\":\n        print(block.text)\n"
          },
          {
            "lang": "JavaScript",
            "label": "Basic",
            "source": "import Anthropic from \"@anthropic-ai/sdk\";\n\nconst client = new Anthropic({\n  apiKey: process.env.COMETAPI_KEY,\n  baseURL: \"https://api.cometapi.com\",\n});\n\nconst message = await client.messages.create({\n  \"model\": \"claude-opus-5\",\n  \"max_tokens\": 1000,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Suggest three search queries about renewable energy storage.\"\n    }\n  ]\n});\n\nfor (const block of message.content) {\n  if (block.type === \"text\") console.log(block.text);\n}\n"
          },
          {
            "lang": "JavaScript",
            "label": "Prompt Cache",
            "source": "import Anthropic from \"@anthropic-ai/sdk\";\nimport fs from \"node:fs\";\n\nconst client = new Anthropic({\n  apiKey: process.env.COMETAPI_KEY,\n  baseURL: \"https://api.cometapi.com\",\n});\n\nconst reference = fs.readFileSync(\"reference.txt\", \"utf8\");\n\nconst stream = client.messages.stream({\n  \"model\": \"claude-sonnet-5\",\n  \"max_tokens\": 1024,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"How long can customers return damaged books, and what must they provide?\"\n    }\n  ],\n  \"system\": [\n    {\n      \"type\": \"text\",\n      \"text\": reference,\n      \"cache_control\": {\n        \"type\": \"ephemeral\"\n      }\n    }\n  ]\n});\nconst message = await stream.finalMessage();\n\nfor (const block of message.content) {\n  if (block.type === \"text\") console.log(block.text);\n}\n\nconsole.log(message.usage);\n"
          },
          {
            "lang": "JavaScript",
            "label": "Adaptive thinking",
            "source": "import Anthropic from \"@anthropic-ai/sdk\";\n\nconst client = new Anthropic({\n  apiKey: process.env.COMETAPI_KEY,\n  baseURL: \"https://api.cometapi.com\",\n});\n\nconst stream = client.messages.stream({\n  \"model\": \"claude-opus-5\",\n  \"max_tokens\": 4096,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"A shop sells notebooks for $7 each. Buying three earns a $4 discount. A customer pays $20 for three notebooks. Calculate the total and the change, and explain your steps.\"\n    }\n  ],\n  \"thinking\": {\n    \"type\": \"adaptive\"\n  },\n  \"output_config\": {\n    \"effort\": \"xhigh\"\n  }\n});\nconst message = await stream.finalMessage();\n\nfor (const block of message.content) {\n  if (block.type === \"text\") console.log(block.text);\n}\n"
          },
          {
            "lang": "JavaScript",
            "label": "Effort control",
            "source": "import Anthropic from \"@anthropic-ai/sdk\";\n\nconst client = new Anthropic({\n  apiKey: process.env.COMETAPI_KEY,\n  baseURL: \"https://api.cometapi.com\",\n});\n\nconst stream = client.messages.stream({\n  \"model\": \"claude-opus-5\",\n  \"max_tokens\": 1000,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Summarize the benefit of automated tests in one sentence.\"\n    }\n  ],\n  \"output_config\": {\n    \"effort\": \"low\"\n  }\n});\nconst message = await stream.finalMessage();\n\nfor (const block of message.content) {\n  if (block.type === \"text\") console.log(block.text);\n}\n"
          },
          {
            "lang": "JavaScript",
            "label": "Streaming",
            "source": "import Anthropic from \"@anthropic-ai/sdk\";\n\nconst client = new Anthropic({\n  apiKey: process.env.COMETAPI_KEY,\n  baseURL: \"https://api.cometapi.com\",\n});\n\nconst stream = client.messages.stream({\n  \"model\": \"claude-opus-5\",\n  \"max_tokens\": 1024,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Write a two-line poem about a comet.\"\n    }\n  ]\n});\nstream.on(\"text\", (text) => process.stdout.write(text));\nawait stream.finalMessage();\n"
          },
          {
            "lang": "JavaScript",
            "label": "Web Fetch",
            "source": "import Anthropic from \"@anthropic-ai/sdk\";\n\nconst client = new Anthropic({\n  apiKey: process.env.COMETAPI_KEY,\n  baseURL: \"https://api.cometapi.com\",\n});\n\nconst stream = client.messages.stream({\n  \"model\": \"claude-sonnet-5\",\n  \"max_tokens\": 2048,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Fetch https://arxiv.org/abs/1512.03385 and state the paper title and the proposed learning framework in two sentences.\"\n    }\n  ],\n  \"tools\": [\n    {\n      \"type\": \"web_fetch_20250910\",\n      \"name\": \"web_fetch\",\n      \"max_uses\": 3\n    }\n  ]\n});\nconst message = await stream.finalMessage();\n\nfor (const block of message.content) {\n  if (block.type === \"text\") console.log(block.text);\n}\n\nfor (const block of message.content) {\n  if (block.type === \"web_fetch_tool_result\") console.log(block);\n}\n"
          },
          {
            "lang": "JavaScript",
            "label": "Image Input",
            "source": "import Anthropic from \"@anthropic-ai/sdk\";\n\nconst client = new Anthropic({\n  apiKey: process.env.COMETAPI_KEY,\n  baseURL: \"https://api.cometapi.com\",\n});\n\nconst stream = client.messages.stream({\n  \"model\": \"claude-opus-5\",\n  \"max_tokens\": 1000,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"image\",\n          \"source\": {\n            \"type\": \"url\",\n            \"url\": \"https://picsum.photos/seed/comet/800/600.jpg\"\n          }\n        },\n        {\n          \"type\": \"text\",\n          \"text\": \"Describe the visible scene in one sentence.\"\n        }\n      ]\n    }\n  ]\n});\nconst message = await stream.finalMessage();\n\nfor (const block of message.content) {\n  if (block.type === \"text\") console.log(block.text);\n}\n"
          },
          {
            "lang": "Shell",
            "label": "Basic",
            "source": "curl \"https://api.cometapi.com/v1/messages\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: $COMETAPI_KEY\" \\\n  -H \"anthropic-version: 2023-06-01\" \\\n  -d '{\n  \"model\": \"claude-opus-5\",\n  \"max_tokens\": 1000,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Suggest three search queries about renewable energy storage.\"\n    }\n  ]\n}'\n"
          },
          {
            "lang": "Shell",
            "label": "Prompt Cache",
            "source": "request_body=$(jq -n --rawfile reference reference.txt '\n{\n  \"model\": \"claude-sonnet-5\",\n  \"max_tokens\": 1024,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"How long can customers return damaged books, and what must they provide?\"\n    }\n  ],\n  \"system\": [\n    {\n      \"type\": \"text\",\n      \"text\": $reference,\n      \"cache_control\": {\n        \"type\": \"ephemeral\"\n      }\n    }\n  ],\n  \"stream\": true\n}\n')\n\ncurl \"https://api.cometapi.com/v1/messages\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: $COMETAPI_KEY\" \\\n  -H \"anthropic-version: 2023-06-01\" \\\n  --no-buffer \\\n  --data-binary \"$request_body\"\n"
          },
          {
            "lang": "Shell",
            "label": "Adaptive thinking",
            "source": "curl \"https://api.cometapi.com/v1/messages\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: $COMETAPI_KEY\" \\\n  -H \"anthropic-version: 2023-06-01\" \\\n  --no-buffer \\\n  -d '{\n  \"model\": \"claude-opus-5\",\n  \"max_tokens\": 4096,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"A shop sells notebooks for $7 each. Buying three earns a $4 discount. A customer pays $20 for three notebooks. Calculate the total and the change, and explain your steps.\"\n    }\n  ],\n  \"thinking\": {\n    \"type\": \"adaptive\"\n  },\n  \"output_config\": {\n    \"effort\": \"xhigh\"\n  },\n  \"stream\": true\n}'\n"
          },
          {
            "lang": "Shell",
            "label": "Effort control",
            "source": "curl \"https://api.cometapi.com/v1/messages\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: $COMETAPI_KEY\" \\\n  -H \"anthropic-version: 2023-06-01\" \\\n  --no-buffer \\\n  -d '{\n  \"model\": \"claude-opus-5\",\n  \"max_tokens\": 1000,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Summarize the benefit of automated tests in one sentence.\"\n    }\n  ],\n  \"output_config\": {\n    \"effort\": \"low\"\n  },\n  \"stream\": true\n}'\n"
          },
          {
            "lang": "Shell",
            "label": "Streaming",
            "source": "curl \"https://api.cometapi.com/v1/messages\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: $COMETAPI_KEY\" \\\n  -H \"anthropic-version: 2023-06-01\" \\\n  --no-buffer \\\n  -d '{\n  \"model\": \"claude-opus-5\",\n  \"max_tokens\": 1024,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Write a two-line poem about a comet.\"\n    }\n  ],\n  \"stream\": true\n}'\n"
          },
          {
            "lang": "Shell",
            "label": "Web Fetch",
            "source": "curl \"https://api.cometapi.com/v1/messages\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: $COMETAPI_KEY\" \\\n  -H \"anthropic-version: 2023-06-01\" \\\n  --no-buffer \\\n  -d '{\n  \"model\": \"claude-sonnet-5\",\n  \"max_tokens\": 2048,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Fetch https://arxiv.org/abs/1512.03385 and state the paper title and the proposed learning framework in two sentences.\"\n    }\n  ],\n  \"tools\": [\n    {\n      \"type\": \"web_fetch_20250910\",\n      \"name\": \"web_fetch\",\n      \"max_uses\": 3\n    }\n  ],\n  \"stream\": true\n}'\n"
          },
          {
            "lang": "Shell",
            "label": "Image Input",
            "source": "curl \"https://api.cometapi.com/v1/messages\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: $COMETAPI_KEY\" \\\n  -H \"anthropic-version: 2023-06-01\" \\\n  --no-buffer \\\n  -d '{\n  \"model\": \"claude-opus-5\",\n  \"max_tokens\": 1000,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"image\",\n          \"source\": {\n            \"type\": \"url\",\n            \"url\": \"https://picsum.photos/seed/comet/800/600.jpg\"\n          }\n        },\n        {\n          \"type\": \"text\",\n          \"text\": \"Describe the visible scene in one sentence.\"\n        }\n      ]\n    }\n  ],\n  \"stream\": true\n}'\n"
          },
          {
            "lang": "Python",
            "label": "Web Search",
            "source": "import os\nimport anthropic\n\nclient = anthropic.Anthropic(\n    base_url=\"https://api.cometapi.com\",\n    api_key=os.environ[\"COMETAPI_KEY\"],\n)\n\nwith client.messages.stream(\n    model=\"claude-sonnet-5\",\n    max_tokens=4096,\n    messages=[\n        {\n            \"role\": \"user\",\n            \"content\": \"Search the web for the official Python 3.14 release date. Answer with the date and cite a source.\",\n        },\n    ],\n    tools=[\n        {\n            \"type\": \"web_search_20250305\",\n            \"name\": \"web_search\",\n            \"max_uses\": 3,\n        },\n    ],\n) as stream:\n    message = stream.get_final_message()\n\nfor block in message.content:\n    if block.type == \"text\":\n        print(block.text)\n\nfor block in message.content:\n    if block.type == \"web_search_tool_result\":\n        if isinstance(block.content, list):\n            for result in block.content:\n                if result.type == \"web_search_result\":\n                    print(result.title, result.url)\n"
          },
          {
            "lang": "JavaScript",
            "label": "Web Search",
            "source": "import Anthropic from \"@anthropic-ai/sdk\";\n\nconst client = new Anthropic({\n  apiKey: process.env.COMETAPI_KEY,\n  baseURL: \"https://api.cometapi.com\",\n});\n\nconst stream = client.messages.stream({\n  \"model\": \"claude-sonnet-5\",\n  \"max_tokens\": 4096,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Search the web for the official Python 3.14 release date. Answer with the date and cite a source.\"\n    }\n  ],\n  \"tools\": [\n    {\n      \"type\": \"web_search_20250305\",\n      \"name\": \"web_search\",\n      \"max_uses\": 3\n    }\n  ]\n});\nconst message = await stream.finalMessage();\n\nfor (const block of message.content) {\n  if (block.type === \"text\") console.log(block.text);\n  if (block.type === \"web_search_tool_result\" && Array.isArray(block.content)) {\n    for (const result of block.content) {\n      if (result.type === \"web_search_result\") console.log(result.title, result.url);\n    }\n  }\n}\n"
          },
          {
            "lang": "Shell",
            "label": "Web Search",
            "source": "curl \"https://api.cometapi.com/v1/messages\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: $COMETAPI_KEY\" \\\n  -H \"anthropic-version: 2023-06-01\" \\\n  --no-buffer \\\n  -d '{\n  \"model\": \"claude-sonnet-5\",\n  \"max_tokens\": 4096,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Search the web for the official Python 3.14 release date. Answer with the date and cite a source.\"\n    }\n  ],\n  \"tools\": [\n    {\n      \"type\": \"web_search_20250305\",\n      \"name\": \"web_search\",\n      \"max_uses\": 3\n    }\n  ],\n  \"stream\": true\n}'\n"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your CometAPI key passed via the `x-api-key` header. `Authorization: Bearer $COMETAPI_KEY` is also supported."
      }
    }
  }
}
