OffloadGPT API
  • Introduction
  • Quick Start
  • Server Events
  • Reference
    • API Reference
      • stream-chatgpt endpoint
      • async-chatgpt endpoint
      • Status URL endpoints
Powered by GitBook
On this page
  1. Reference
  2. API Reference

Status URL endpoints

The generated Status URL endpoints contain the final request response.

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

{
    "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.

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

{
    "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
                }
            ]
        }
    }
}

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

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.

Previousasync-chatgpt endpoint

Last updated 1 year ago

String - Passed as a request parameter or generated if missing as a .

UUID format