Skip to main content
This guide covers the basics of using the Anannas Responses API, including simple text requests, conversation management, and handling responses.
Stateless APIThe Anannas Responses API is stateless. Each request is independent and no conversation state is stored server-side. You must include the full conversation history in every request to maintain context.

Simple Text Request

The simplest way to use the Responses API is with a plain text string:

Structured Message Input

For more control, use structured message format with conversation history:

Multi-Turn Conversations

Important: Stateless DesignThe Anannas Responses API is stateless - it does not maintain conversation state between requests. Unlike OpenAI’s stateful Responses API, you must include the complete conversation history in every request. Each request is treated as independent.
Since the API is stateless, you must include the full conversation history in each request:

Using Instructions

You can provide system-level instructions to guide the model’s behavior:

Handling Responses

The response contains an output array with one or more output items. Each item has:
  • type: The type of output (usually “message”)
  • role: The role of the message (usually “assistant”)
  • status: The status of the output (“completed”, “incomplete”, etc.)
  • content: An array of content parts
Extracting Text Content:

Error Handling

Always check for errors in the response:

Best Practices

  1. Always include conversation history: Since the Anannas API is stateless, include all previous messages in each request. The Anannas API does not remember previous conversations.
  2. Manage state client-side: You are responsible for maintaining conversation history and including it in each request.
  3. Set appropriate token limits: Use max_output_tokens to control response length
  4. Handle errors gracefully: Check response status codes and error messages
  5. Use structured input: Prefer structured message format for better control and multimodal support
  6. Monitor usage: Check the usage field in responses to track token consumption
Stateless vs StatefulOpenAI’s Responses API has both stateless and stateful versions. Anannas implements only the stateless version, which means:
  • No server-side conversation state
  • No previous_response_id parameter support
  • You must include full conversation history in each request
  • Each request is completely independent
Was this page helpful?