Skip to main content
Version: V1 (deprecated)

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

Body

required

    prompt stringrequired

    The input text prompt to send to the model

    model stringrequired

    The model identifier to use for generation. See GET /v1/textcraft/models for available models

    temperature number

    Sampling temperature. Not supported when thinking is enabled

    maxTokens number

    Maximum number of output tokens to generate. Defaults to the model's configured maximum

    imageUrl string

    URL of an image to include as input. Only supported by vision-capable models

    imageData string

    Base64-encoded image data to include as input. Only supported by vision-capable models

    thinking boolean

    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

    description stringrequired

    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

    property name* any

    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

    type string

    Possible values: [enabled, disabled]

    Whether to enable or disable extended reasoning. Only applies to Claude models on Bedrock

    budgetTokens integer

    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

    property name* any

    Advanced: arbitrary fields passed directly to the Bedrock Converse API additionalModelRequestFields. Use thinking:true instead for thinking support

Responses

Response of the llm and cost of generation

Schema

    text stringrequired

    The generated text response from the model

    reasoning string

    The model's internal reasoning process, returned when thinking mode is enabled and the model supports it

    tokens number

    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

  • Array [

  • toolName stringrequired

    The name of the tool the model has chosen to call

    toolCallId stringrequired

    A unique identifier for this tool call

    args

    The arguments the model wants to pass to the tool

  • ]

  • creditsUsed numberrequired
Loading...