Call different llm models, sending text prompt and optionally image data
POST/v1/textcraft
Call different llm models, sending text prompt and optionally image data
Request
- application/json
Body
required
The input text prompt to send to the model
The model identifier to use for generation. See GET /v1/textcraft/models for available models
Sampling temperature. Not supported when thinking is enabled
Maximum number of output tokens to generate. Defaults to the model's configured maximum
URL of an image to include as input. Only supported by vision-capable models
Base64-encoded image data to include as input. Only supported by vision-capable models
Enable extended thinking/reasoning mode. When true, the model will return a reasoning field with its internal thought process. Silently ignored for models that do not support thinking
tools
object
Tool definitions the model can call. The model will return toolCalls in the response if it decides to use a tool
property name*
object
A description of what the tool does, used by the model to decide when to call it
parameters
object
required
A map of parameter names to their descriptions
A map of parameter names to their descriptions
reasoningConfig
object
Advanced reasoning configuration for Claude models. Use thinking:true for a simpler alternative that works across all thinking-capable models
Possible values: [enabled, disabled]
Whether to enable or disable extended reasoning. Only applies to Claude models on Bedrock
Maximum number of tokens the model can use for internal reasoning. Counts against the total maxTokens budget
additionalModelRequestFields
object
Advanced: arbitrary fields passed directly to the Bedrock Converse API additionalModelRequestFields. Use thinking:true instead for thinking support
Advanced: arbitrary fields passed directly to the Bedrock Converse API additionalModelRequestFields. Use thinking:true instead for thinking support
Responses
- 201
- 400
- 401
- 403
- 429
- 500
- 504
Response of the llm and cost of generation
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
The generated text response from the model
The model's internal reasoning process, returned when thinking mode is enabled and the model supports it
Total number of tokens used by the request, including input and output tokens
toolCalls
object[]
Tool calls requested by the model. Present when the model decides to use one or more of the provided tools instead of, or in addition to, generating text
The name of the tool the model has chosen to call
A unique identifier for this tool call
The arguments the model wants to pass to the tool
{
"text": "string",
"reasoning": "string",
"tokens": 0,
"toolCalls": [
{
"toolName": "string",
"toolCallId": "string"
}
],
"creditsUsed": 0
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
Available only when the message includes additional error details.
{
"message": "string",
"statusCode": 0,
"error": "string"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
Available only when the message includes additional error details.
{
"message": "string",
"statusCode": 0,
"error": "string"
}
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
Available only when the message includes additional error details.
{
"message": "string",
"statusCode": 0,
"error": "string"
}
Too Many Requests
- application/json
- Schema
- Example (from schema)
Schema
Available only when the message includes additional error details.
{
"message": "string",
"statusCode": 0,
"error": "string"
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
Schema
Available only when the message includes additional error details.
{
"message": "string",
"statusCode": 0,
"error": "string"
}
Gateway Timeout
- application/json
- Schema
- Example (from schema)
Schema
Available only when the message includes additional error details.
{
"message": "string",
"statusCode": 0,
"error": "string"
}