POST
/
responses
Create a model response
curl --request POST \
  --url https://api.fireworks.ai/inference/v1/responses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "accounts/fireworks/models/qwen3-235b-a22b",
  "input": "<string>",
  "tools": [
    {
      "type": "mcp",
      "server_label": "<string>",
      "server_url": "<string>",
      "require_approval": "<string>"
    }
  ],
  "max_output_tokens": 123,
  "temperature": 1,
  "stream": false,
  "store": true
}'
{
  "id": "<string>",
  "object": "response",
  "status": "completed",
  "created_at": 123,
  "model": "<string>",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [
        {
          "type": "text",
          "text": "<string>"
        }
      ]
    }
  ],
  "output_text": "<string>",
  "usage": {
    "input_tokens": 123,
    "output_tokens": 123,
    "total_tokens": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required

Model ID used to generate the response

Example:

"accounts/fireworks/models/qwen3-235b-a22b"

input
required

Text or image inputs to the model, used to generate a response A text input to the model

tools
object[]

A list of MCP tools the model may call. See our cookbooks for examples on basic MCP usage and streaming with MCP.

max_output_tokens
integer | null

Maximum number of tokens that can be generated

temperature
number | null
default:1

Sampling temperature to use

Required range: 0 <= x <= 2
stream
boolean
default:false

Whether to stream back partial progress

store
boolean
default:true

Whether to store the response. When set to false, the response will not be stored and will not be retrievable via the API. This is useful for ephemeral or sensitive data. See an example in our Controlling Response Storage cookbook.

Response

200 - application/json

OK

id
string
required

Unique identifier for this Response

object
enum<string>
required

The object type, always "response"

Available options:
response
status
enum<string>
required

The status of the response generation

Available options:
completed,
failed,
in_progress,
incomplete
created_at
number
required

Unix timestamp (in seconds) of when this Response was created

model
string
required

Model ID used to generate the response

output
object[]
required

An array of content items generated by the model

output_text
string | null

Aggregated text output from all output items

usage
object