openai.chat.completions.create.
The response is wire-compatible with OpenAI’s chat completions. Any SDK that points at
https://www.orgo.ai/api/v1 works unchanged - the only required extension is passing a computer_id to bind the agent to a running VM.Endpoint
Authorization: Bearer sk_live_...
Request
UUID of a running Orgo computer - returned as the
id field by Create computer. The authenticated user must own the computer or be a member of its workspace.Array of
{ role, content } objects. role must be user or assistant. The first message must have role user. When continuing a thread, only the new messages need to be passed - prior history is loaded from the thread.Model identifier. One of
claude-sonnet-4.6 or claude-opus-4.6. See Models below.If
true, responses are streamed as OpenAI-format Server-Sent Events. The connection stays open until the agent finishes or the request is cancelled.Continue a previous multi-turn session. When set, the server loads the thread’s history, runs the agent with full context, and appends new messages on completion. If omitted, a new thread is created automatically and its ID returned in the response.
Maximum number of agent steps (screenshot → action → observation) before the run stops. Increase for long, multi-phase workflows.
Headers
Bearer sk_live_... - your Orgo API key. Get one at orgo.ai/settings/api-keys.Bring-your-own Anthropic key. When present, requests bill directly to your Anthropic account instead of drawing from your Orgo credit balance. Enterprise plans can omit this and still bypass metering.
Response
Non-streaming
Request identifier (
chatcmpl-...). Also returned as the X-Request-Id response header.Always
chat.completion.Unix timestamp (seconds).
The model ID used for the request.
Single-element array containing the final assistant message.
Token counts for the full agent loop (all intermediate turns, not just the final message).
Orgo-specific metadata not in the OpenAI spec.
Response headers
| Header | Description |
|---|---|
X-Request-Id | Echoes the id field. Include it when reporting issues. |
X-Thread-Id | Thread ID. Present when a thread is created or continued. |
Streaming
Whenstream: true, the server returns text/event-stream with standard OpenAI chat.completion.chunk events:
X-Thread-Id header is set on the initial response so clients can associate the stream with a thread before the first chunk arrives.
Examples
Streaming with raw SSE
Continuing a thread
Pass thethread_id returned by a previous response. The agent loads the prior conversation and picks up where it left off.
Bring your own Anthropic key
Passx-anthropic-key to bill the request against your own Anthropic account. Orgo credits are not consumed and orgo.cost_cents is 0.
Example response
Models
| Model | Best for | Notes |
|---|---|---|
claude-sonnet-4.6 | Default. Fast, cost-effective, handles most workflows. | Tool version computer_20251124. |
claude-opus-4.6 | Complex, multi-step tasks where reliability matters more than latency. | Tool version computer_20251124. More expensive per token. |
Orgo’s OpenAI-compatible endpoint uses dotted model IDs (
claude-sonnet-4.6). If you’re calling Anthropic’s native SDK directly in the Claude Computer Use guide, use the hyphenated form (claude-sonnet-4-6) - that’s Anthropic’s canonical identifier.Billing
Requests are metered after the agent loop finishes. For non-BYOK, non-enterprise users, Orgo places a credit hold at request start and settles against actual token usage on completion. If the request errors before any tokens are consumed, the hold is refunded. Pricing matches Anthropic’s token rates plus a small platform margin; exact per-request cost is returned inorgo.cost_cents.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_json | Request body is not valid JSON. |
| 400 | invalid_model | model is not claude-sonnet-4.6 or claude-opus-4.6. |
| 400 | missing_computer_id | computer_id was not supplied. |
| 400 | empty_messages | messages array is empty. |
| 400 | invalid_message_order | First message does not have role user. |
| 400 | context_overflow | Conversation exceeds the model’s context window. Start a new thread or prune history. |
| 401 | invalid_api_key | Missing or invalid Authorization header. |
| 402 | credits_exhausted | Credit balance too low. Add credits at orgo.ai/settings/billing. Includes balance_cents. |
| 404 | computer_not_found | Computer does not exist, is not accessible, or does not belong to your project. |
| 500 | internal_error | Unexpected server error. Retry with exponential backoff. Include the X-Request-Id header when reporting. |