Skip to content
Last updated

🔨 In Development — This section is still being developed and may change.
Retrieves the current status and details of an asynchronous model response. Use this endpoint to check on responses initiated with `background: true`.
GEThttps://api.freddy.aitronos.com/v1/model/response/{response_id}

When a response is generated with background mode enabled, the API returns immediately with a response ID. Use this endpoint to poll the status and retrieve results once processing is complete.

Path Parameters

response_id string required

The unique identifier of the response to check. Returned immediately when the response was created with background: true.

Query Parameters

organizationId string required

The unique identifier of the organization that owns the response.

Response

id string

The unique identifier of the response.

status string

Current status of the response. One of:

  • processing - Response is still being generated
  • completed - Response generation finished successfully
  • failed - Response generation failed with an error
  • cancelled - Response was cancelled before completion

createdAt integer

Unix timestamp when the response was created.

startedAt integer optional

Unix timestamp when processing started (null if not yet started).

completedAt integer optional

Unix timestamp when processing completed (null if still processing).

progress object optional

Progress information for ongoing responses:

  • percentage integer - Estimated completion percentage (0-100)
  • stage string - Current processing stage (e.g., "reasoning", "tool_execution", "generating_output")
  • stepsCompleted integer - Number of processing steps completed
  • totalSteps integer - Estimated total processing steps

output array optional

Response output (only populated when status is completed). Array of output message objects with the generated content.

error object optional

Error details (only populated when status is failed):

  • message string - Error description
  • code string - Error code
  • type string - Error type

usage object

Token/neuron usage statistics:

  • input_tokens integer - Tokens consumed by input
  • output_tokens integer - Tokens generated in output
  • total_tokens integer - Total tokens used

model string

The model that was used for this response.

thread object optional

Thread information if the response was part of a thread:

  • id string - Thread ID
  • messageCount integer - Total messages in thread

metadata object optional

Custom metadata attached to the response.


Returns

A ResponseStatusResponse object containing the API response data.

Bash
curl "https://api.freddy.aitronos.com/v1/model/response/resp_abc123?organizationId=org_abc123" \
  -H "Authorization: Bearer $FREDDY_API_KEY"

Polling Best Practices

  • Check Status Regularly: Poll every 1-5 seconds for short-running tasks, or every 30 seconds for longer tasks
  • Exponential Backoff: Increase polling interval over time to reduce server load (e.g., 1s → 2s → 5s → 10s)
  • Timeout Handling: Set a maximum timeout (e.g., 1 hour) after which you stop polling
  • Error Handling: Handle both completion failures and network errors gracefully
  • Progress Display: Show progress percentage to users for better UX
  • Webhook Alternative: Consider using webhooks instead of polling for better efficiency (planned feature)