v1

latestOpenAPI 3.1.02026-07-26106201349.6 KB

Create a Message

Anthropic-compatible endpoint.

Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.

The Messages API can be used for either single queries or stateless multi-turn conversations.

Fireworks Quickstarts:

  • Serverless Quickstart
  • Deployments Quickstart
post/v1/messages

Request body

{"stackTrail":"components:schemas:AnthropicModel","oasType":"schema","type":"unknown","description":"Referenced by this API but not published in the vendor's docs pages."}
{"stackTrail":"components:schemas:AnthropicCreateMessageParams:properties:messages","oasType":"schema","type":"unknown","description":"Input messages.\n\nModels are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.\n\nIf the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.\n\nExample with a single `user` message:"}

Example request

{
  "max_tokens": 1024,
  "messages": [
    {
      "content": "Hello, world",
      "role": "user"
    }
  ],
  "model": "claude-opus-4-6"
}

Response

Message object.

{"stackTrail":"components:schemas:AnthropicMessage","oasType":"schema","type":"unknown","description":"Referenced by this API but not published in the vendor's docs pages."}
All 106 operations