Skip to main content
POST
Ask AI
Use this API to send a text rewriting or processing request to an AI model. The model provider is resolved automatically from the model name prefix.
Customer API keys are stored encrypted in the workspace aiModelsConfig and decrypted server-side. Configure your provider API keys in the Velt Console before using this endpoint.

Endpoint

POST https://api.velt.dev/v2/rewriter/ask-ai

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required
OpenAI reasoning models (o1-*, o3-*, o4-*) use a user-only message format. The prompt is prepended to the text in a single user message rather than sent as a separate system prompt.

Supported models (non-exhaustive)

Example Requests

Rewrite text using Claude

Rewrite text using GPT-4o

Process text using a reasoning model

Response

Success Response

Error Response

Failure Response