# Status URL endpoints

A typical response from `async-chatgpt` endpoint could be something like this:

```json
{
    "status": "success",
    "created_at": 1685638041,
    "conversation_id": "154dff1d-a1b1-4270-bbbc-66b9a5700a12",
    "README": "The `status_url` endpoint below continuously updates with data sent by the ChatGPT API. Load it to check for new data.",
    "authorization": {
        "access": "public"
    },
    "endpoints": {
        "status_url": "https://offloadgpt.microdeploy.com/2/r/pub/2023/06/01/16/47/21/154dff1d-a1b1-4270-bbbc-66b9a5700a12.json",
        "stop_url": "https://offloadgpt.microdeploy.com/2/r/pub/2023/06/01/16/47/21/154dff1d-a1b1-4270-bbbc-66b9a5700a12/stop"
    }
}
```

The `endpoints.status_url` contains an URL that stores the current request status.&#x20;

Performing a GET request, the response is a JSON like this:

{% code fullWidth="false" %}

```json
{
    "status": "done",
    "created_at": 1685638041,
    "conversation_id": "154dff1d-a1b1-4270-bbbc-66b9a5700a12",
    "README": "This endpoint has completed the collection of data sent by the ChatGPT API and will not receive any further updates.",
    "endpoints": {
        "status_url": "https://offloadgpt.microdeploy.com/2/r/pub/2023/06/01/16/47/21/154dff1d-a1b1-4270-bbbc-66b9a5700a12.json",
        "response_raw_url": "https://offloadgpt.microdeploy.com/2/r/pub/2023/06/01/16/47/21/154dff1d-a1b1-4270-bbbc-66b9a5700a12.raw"
    },
    "request": {
        "endpoint": "/v1/async-chatgpt",
        "request_at": 1685638041,
        "finished_at": 1685638064,
        "processed_at": 1685638066,
        "request_time": 22.625,
        "total_time": 24.684
    },
    "options": {
        "timeout": 90,
        "connect_timeout": 5
    },
    "parameters": {
        "model": "gpt-3.5-turbo",
        "messages": [
            {
                "role": "system",
                "content": "You are an assistant of an online store selling hardware and I do not want you to talk about anything other than my products"
            },
            {
                "role": "user",
                "content": "Can you resume the pros and cons of the Soundcore by Anker Space Q45 Adaptive Active Noise Cancelling Headphones?"
            }
        ]
    },
    "response": {
        "status_code": 200,
        "protocol": "HTTP/2",
        "headers": {
            "date": "Thu, 01 Jun 2023 16:47:44 GMT",
            "content-type": "application/json",
            "content-length": "1816",
            "access-control-allow-origin": "*",
            "cache-control": "no-cache, must-revalidate",
            "openai-model": "gpt-3.5-turbo-0301",
            "openai-organization": "user-jix50wyfs2vbwg0bvxpgiixs",
            "openai-processing-ms": "22746",
            "openai-version": "2020-10-01",
            "strict-transport-security": "max-age=15724800; includeSubDomains",
            "x-ratelimit-limit-requests": "3500",
            "x-ratelimit-limit-tokens": "90000",
            "x-ratelimit-remaining-requests": "3499",
            "x-ratelimit-remaining-tokens": "89922",
            "x-ratelimit-reset-requests": "17ms",
            "x-ratelimit-reset-tokens": "52ms",
            "x-request-id": "e6d4fe690de1fb379cea0489902a64e3",
            "cf-cache-status": "DYNAMIC",
            "server": "cloudflare",
            "cf-ray": "7d08f01f3d7e3af4-IAD",
            "alt-svc": "h3=\":443\"; ma=86400"
        },
        "body": {
            "id": "chatcmpl-7MfkHkQbwGPbR7d54c1JwUuxHLe7Y",
            "object": "chat.completion",
            "created": 1685638041,
            "model": "gpt-3.5-turbo-0301",
            "usage": {
                "prompt_tokens": 62,
                "completion_tokens": 287,
                "total_tokens": 349
            },
            "choices": [
                {
                    "message": {
                        "role": "assistant",
                        "content": "Certainly, as an assistant of an online store, I can provide you with the technical specifications and pros of the Soundcore by Anker Space Q45 Adaptive Active Noise Cancelling Headphones:\n\nPros:\n- The headphones feature a hybrid active noise cancellation technology that uses both feedforward and feedback microphones to provide effective noise reduction.\n- The Soundcore Q45 headphones have a long battery life of up to 40 hours, allowing you to use them for extended periods without needing to recharge.\n- The headphones are also equipped with fast charging capabilities, which allow you to get up to four hours of playback time with just five minutes of charging.\n- They are lightweight, comfortable to wear and adjustable, making them suitable for long listening sessions.\n- The headphones have a built-in microphone for making phone calls and come with a 3.5 mm audio cable for wired listening.\n- The ear cups feature touch controls for easy access to playback, volume, and noise cancellation settings.\n- They have received positive reviews from customers, with many praising the sound quality and noise-canceling capabilities.\n\nCons:\n- The Soundcore Q45 headphones do not fold flat or come with a carrying case, which may make them less portable compared to some other options.\n- Some users have reported connectivity issues with devices like laptops and tablets, which may require troubleshooting.\n- The noise-cancelling feature may not be as effective compared to some high-end noise-canceling headphones."
                    },
                    "finish_reason": "stop",
                    "index": 0
                }
            ]
        }
    }
}
```

{% endcode %}

This structure is almost the same for both `stream-chagpt` and `async-chatgpt` endpoints:

#### status

*String* - One of the following values:

* `pending` The request has not yet been sent.
* `posting` The request has been sent but no response is expected yet.
* `waiting` Response in progress (async-chatgpt endpoint only).
* `streaming` Response data being transmitted (stream-chatgpt endpoint only).
* `done` Request finished and full data is available (final status).
* `error` A timeout or any API error response (final status).
* `stop` Terminated by a stop request invocation (final status).

#### created\_at

*Integer* - Timestamp of request creation

#### conversation\_id

*String* - Passed as a request parameter or generated if missing as a [UUID format](https://en.wikipedia.org/wiki/Universally_unique_identifier).

#### endpoints

*Object* - Contains the permalinks for the current generated endpoints.

#### endpoints / status\_url

*URL* - The current Status URL document.

#### endpoints / stream\_events\_url

*URL* - The URL gerated for streaming data (stream-chatgpt endpoint only).

#### endpoints / from\_status\_url

*URL* - The Status URL of the previous request (if passed as a parameter argument).

#### endpoints / response\_raw\_url

*URL* - Full raw response data including response headers.

#### request

*Object* - Information about the current request, such as the endpoint, start timestamp or and time elapsed in each stage.

#### options

*Object* - Parameters exclusive to this API (and not part of the OpenAI Chat Completion API), such `timeout` or `connect_timeout`.

#### parameters

*Object* - The parameters used for the OpenAI Chat Completion API request.

#### response

*Object* - The data related to the OpenAI Chat Completion API response.

#### response / status\_code

*Integer* - The HTTP response code from OpenAI Chat Completion API.

#### response / protocol

*String* - The protocol of the response, e.g. `HTTP/2`

#### response / headers

*Object* - All headers present in the response without additions.

#### response / body

*Object* - The original OpenAI Chat Completion response data in JSON format.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://offloadgpt-docs.microdeploy.com/reference/api-reference/status-url-endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
