Generation

Generate text response

Generates plain text response from Claude CLI.

post/generate-text

Request body

systemstring
promptstring required
sessionIdstring
modelstring
allowedToolsstring[]
maxTokensinteger

Response

Successful text generation

textstring required
sessionIdstring required

Changes

Changed in 5 of the 7 revisions of this API.477

  • f7074f1efbee21See the full diff
    • added the new NO_TOOLS_AVAILABLE enum value to the code response property for the response status 400

      response-property-enum-value-added

    • added the new NO_TOOLS_AVAILABLE enum value to the code response property for the response status 500

      response-property-enum-value-added

    • added the new optional request property allowedTools

      new-optional-request-property

    • removed the request property userEmail

      request-property-removed

  • 5aa7ce43bc1211See the full diff
    • the maxTokens request property type/format changed from number/ to integer/

      request-property-type-changed

    • the maxTokens request property's exclusiveMinimum was set to 0.00

      request-property-exclusive-min-set

    • added the new CONCURRENCY_LIMIT_ERROR enum value to the code response property for the response status 400

      response-property-enum-value-added

    • added the new CONCURRENCY_LIMIT_ERROR enum value to the code response property for the response status 500

      response-property-enum-value-added

  • 62c4085e0ca0316See the full diff
    • the usage/inputTokens response's property type/format changed from integer/ to number/ for status 200

      response-property-type-changed

    • the usage/outputTokens response's property type/format changed from integer/ to number/ for status 200

      response-property-type-changed

    • the usage/totalTokens response's property type/format changed from integer/ to number/ for status 200

      response-property-type-changed

    • removed the request property allowedTools

      request-property-removed

    • added the new optional request property userEmail

      new-optional-request-property

    • the maxTokens request property type/format was generalized from integer/ to number/

      request-property-type-generalized

    • removed the CONCURRENCY_LIMIT_ERROR enum value from the code response property for the response status 400

      response-property-enum-value-removed

    • removed the CONCURRENCY_LIMIT_ERROR enum value from the code response property for the response status 500

      response-property-enum-value-removed

    • removed the NO_TOOLS_AVAILABLE enum value from the code response property for the response status 400

      response-property-enum-value-removed

    • removed the NO_TOOLS_AVAILABLE enum value from the code response property for the response status 500

      response-property-enum-value-removed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog