vignettes/getting-started/1/api.openai.com/v1/chat/completions-eafc56-POST.R

structure(list(method = "POST", url = "https://api.openai.com/v1/chat/completions", 
    status_code = 200L, headers = structure(list(date = "Wed, 16 Oct 2024 00:51:46 GMT", 
        `content-type` = "application/json", `access-control-expose-headers` = "X-Request-ID", 
        `openai-organization` = "user-j2dlcmauhfkzofrqjehceoc7", 
        `openai-processing-ms` = "4211", `openai-version` = "2020-10-01", 
        `x-ratelimit-limit-requests` = "5000", `x-ratelimit-limit-tokens` = "800000", 
        `x-ratelimit-remaining-requests` = "4999", `x-ratelimit-remaining-tokens` = "798188", 
        `x-ratelimit-reset-requests` = "12ms", `x-ratelimit-reset-tokens` = "135ms", 
        `x-request-id` = "req_f9be3b0cb133408bbbc7b441f3bcbc4e", 
        `strict-transport-security` = "max-age=31536000; includeSubDomains; preload", 
        `cf-cache-status` = "DYNAMIC", `set-cookie` = "REDACTED", 
        `x-content-type-options` = "nosniff", `set-cookie` = "REDACTED", 
        server = "cloudflare", `cf-ray` = "8d340fd98bdadc68-FRA", 
        `content-encoding` = "gzip", `alt-svc` = "h3=\":443\"; ma=86400"), class = "httr2_headers"), 
    body = charToRaw("{\n  \"id\": \"chatcmpl-AImYKyWVCkGgSaGcWhc02zgv693AK\",\n  \"object\": \"chat.completion\",\n  \"created\": 1729039904,\n  \"model\": \"gpt-4o-2024-08-06\",\n  \"choices\": [\n    {\n      \"index\": 0,\n      \"message\": {\n        \"role\": \"assistant\",\n        \"content\": \"The picture shows a picturesque landscape featuring a large body of water bordered by rugged mountains. Below, there's a town surrounded by lush greenery, including fields or vineyards. The sun is shining brightly, creating a serene and idyllic atmosphere. \\n\\nThis scene likely depicts a location similar to Lake Garda in Italy, known for its beautiful lakeside towns and mountainous surroundings.\",\n        \"refusal\": null\n      },\n      \"logprobs\": null,\n      \"finish_reason\": \"stop\"\n    }\n  ],\n  \"usage\": {\n    \"prompt_tokens\": 795,\n    \"completion_tokens\": 70,\n    \"total_tokens\": 865,\n    \"prompt_tokens_details\": {\n      \"cached_tokens\": 0\n    },\n    \"completion_tokens_details\": {\n      \"reasoning_tokens\": 0\n    }\n  },\n  \"system_fingerprint\": \"fp_a20a4ee344\"\n}\n"), 
    cache = new.env(parent = emptyenv())), class = "httr2_response")

Try the tidyllm package in your browser

Any scripts or data that you put into this service are public.

tidyllm documentation built on Aug. 22, 2025, 5:21 p.m.