1. Set your API key
Create an API key and add balance in the AsterWise app. In your terminal, replace the placeholder:2. Send a request
POST https://api.asterwise.dev/v1/responses
--include displays response headers as well as the body. Omit it if you want only JSON. Keep your API key private.
Request fields
The example cap of 1,024 tokens limits this response’s length. It is not the model’s maximum context window or a rate limit.
Generation controls
Use
reasoning.effort, not a top-level reasoning_effort, thinking, or output_config. Code supports low / high; Work also supports minimal, medium, and xhigh. Arbitrary reasoning budget or exclusion fields are not a universal supported contract.
For defaults, unavailable controls, tool-choice restrictions, and the DeepSeek sampling no-op exception, see parameters and model compatibility.
Reasoning and tool example
Use this JSON body with the endpoint and authentication headers above. It illustrates the supported request shape; it is not a new live-provider acceptance result. Automatic tool selection allows the model to answer without calling the tool.get_build_status when requested. Include the previous input/output items and a function_call_output item with the matching call_id in the next input. Send explicit history: non-null previous_response_id and conversation are not supported.
3. Read the response
Illustrative text-only response, checked against AsterWise’s response handling. IDs, answer text, and token counts below are examples, not a captured production request. Additional fields may be present.output array. For each item with type: "message", collect content blocks with type: "output_text" and read their text fields. Do not assume the first output item is always text: tool calls and other items can also appear.
status: "completed" identifies a completed response. Check for an incomplete result before treating the answer as finished. usage reports input and output tokens; it is not a dollar charge.
Streaming
Change"stream": false to "stream": true in the request above and add --no-buffer to curl. Read the response as server-sent events (SSE), not as one JSON document. The following is an abbreviated example:
response.output_text.delta. Use the terminal response event to inspect status and usage. Other lifecycle and tool events can appear; this excerpt omits them.
Errors
Gateway authentication and request-validation errors before streaming starts use an HTTP error status and the JSON format below. Malformed JSON, oversized bodies, or proxy errors can have a different response format; check the status and content type before parsing. For example, an invalid key returns 401:error.type rather than assuming an upstream error schema.
AsterWise currently has no per-minute request or token rate limits. A 429 can still indicate a spending or simultaneous-request control.
Once an SSE stream has started, an error may arrive as an
error event rather than a new HTTP status. Do not treat HTTP 200 alone as a completed response. Save the x-request-id response header when present, and check Usage if the connection ends unexpectedly.
See troubleshooting and usage and billing.