/completion-messagesSend Completion Message
Available for: Text Generator apps.
Sends a request to a text-generation app and returns the generated text.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Request body to create a completion message.
6 documented failures
app_unavailableApp unavailable, please check your app configurations.
app_unavailable
completion_request_errorCompletion request failed.
completion_request_error
invalid_paramArg user must be provided.
invalid_param
model_currently_not_supportDify Hosted OpenAI trial currently not support the GPT-4 model.
model_currently_not_support
provider_not_initializeNo valid model provider credentials found. Please go to Settings -> Model Provider to complete your provider credentials.
provider_not_initialize
provider_quota_exceededYour quota for Dify Hosted OpenAI has been exhausted. Please go to Settings -> Model Provider to complete your own provider credentials.
provider_quota_exceeded
One documented failure
too_many_requestsToo many requests. Please try again later. The current maximum concurrent requests allowed for 5b3d4f2a-1c9e-4a7b-8f6d-2e0c9a1b3d4f is 10.
too_many_requests
One documented failure
internal_server_errorThe server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
internal_server_error
A 400 is returned: - app_unavailable : App unavailable or misconfigured.
provider_not_initialize: No valid model provider credentials found.provider_quota_exceeded: Model provider quota exhausted.model_currently_not_support: Current model unavailable.completion_request_error: Text generation failed.invalid_param: The requireduserfield is missing. A 429 is returned:too_many_requests: Too many concurrent requests for this app. A 500 is returned:internal_server_error: Internal server error.