Request Parameters

The Arvae AI API supports a variety of parameters that allow you to customize your requests and control the model's output.

This page documents all the available parameters, their types, default values, and descriptions to help you make the most of the API.

ParameterTypeRequiredDefaultDescription
modelstringYesN/AID of the model to use for the completion
messagesarrayYes[]A list of messages comprising the conversation so far
temperaturenumberNo0.7Controls randomness: 0 means deterministic, 1 means very random
max_tokensintegerNo1024The maximum number of tokens to generate in the chat completion
top_pnumberNo1.0Controls diversity via nucleus sampling
streambooleanNofalseIf set, partial message deltas will be sent

Key Parameters Explained

model

The model parameter specifies which AI model to use for generating the response. This is a required parameter for all requests.

Use the model ID format provider/model-name, e.g., openai/gpt-4 or anthropic/claude-3-opus. For Hanooman models, use hanooman/hanooman-everest.

messages

The messages parameter contains the conversation history as an array of message objects. Each message has a role and content.

Supported roles are system, user, and assistant. The model will generate a response as if it were the next message in the conversation.

"messages": [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello, who are you?"}, {"role": "assistant", "content": "I'm an AI assistant. How can I help you today?"}, {"role": "user", "content": "Tell me about the weather."} ]

temperature

The temperature parameter controls the randomness of the model's output. Lower values make the output more deterministic and focused, while higher values make it more random and creative.

Low (0.1 - 0.3)
More deterministic, focused, and consistent responses. Good for factual tasks.
Medium (0.4 - 0.7)
Balanced responses with some creativity. The default setting works well for most use cases.
High (0.8 - 1.0)
More random and creative responses. Good for brainstorming and creative writing.

stream

The stream parameter determines whether the response should be streamed back to you in real-time or returned as a complete response.

When set to true, the response will be streamed as it's generated, allowing for a more interactive experience. When set to false (default), the response will be returned only once it's complete.

Example Request

Here's an example request that demonstrates the use of several parameters:

POST /api/v1/chat/completions Content-Type: application/json Authorization: Bearer YOUR_API_KEY { "model": "openai/chatgpt-4o-latest", "messages": [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Write a short poem about technology."} ], "temperature": 0.7, "max_tokens": 500, "stream": false }