Skip to content
OpenAI logo

GPT-6 Astra

Text Generation • OpenAI

View as MarkdownAgent setup
  • Third-party

GPT-6 Astra is OpenAI's most capable model, built for complex reasoning, coding, computer use, research, and document creation.

Model Info
Context Window ↗1,050,000 tokens
Terms and Licenselink ↗
More informationlink ↗
Request formatsResponses, Chat Completions
Pricing
  • Long-context threshold (input tokens)$272,000.00
  • Short-context input (per 1M)$10.00
  • Short-context cached input (per 1M)$1.00
  • Short-context cache write (per 1M)$12.00
  • Short-context output (per 1M)$50.00
  • Long-context input (per 1M)$20.00
  • Long-context cached input (per 1M)$2.00
  • Long-context cache write (per 1M)$25.00
  • Long-context output (per 1M)$75.00

Usage

const response = await env.AI.run(
  'openai/gpt-6-astra',
  {
    input:
      'A service has 99.9% monthly availability and just had 31 minutes of downtime. Has it exceeded the monthly error budget for a 30-day month? Show the calculation briefly.',
    max_output_tokens: 512,
    reasoning: { effort: 'high' },
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/responses \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "openai/gpt-6-astra",
  "input": "A service has 99.9% monthly availability and just had 31 minutes of downtime. Has it exceeded the monthly error budget for a 30-day month? Show the calculation briefly.",
  "max_output_tokens": 512,
  "reasoning": {
    "effort": "high"
  }
}'
No. For a 30-day month:

- Total time: \(30 \times 24 \times 60 = 43{,}200\) minutes
- Error budget: \(43{,}200 \times (1 - 0.999) = 43.2\) minutes
- Remaining budget: \(43.2 - 31 = 12.2\) minutes

Assuming 31 minutes is the total downtime this month, it is **within the error budget**.
{
  "id": "resp_0f4dd4f38f19eb60016a99d9b6aaec87d1ab6bb0c344527fbc",
  "object": "response",
  "created_at": 1788467638,
  "model": "gpt-6-astra",
  "output": [
    {
      "id": "rs_0f4dd4f38f19eb60016a99d9b77c6087d1ab41b79ccdf5a833",
      "type": "reasoning",
      "content": [],
      "encrypted_content": "g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OPwc0fXoiW4qyUQdVi2Hz23KBMOQE77jIF0cccZAWDToq67zPLVw9I4j-VKRpti-tOfcg9tz0wr4zJRi49uOqTw038Xn03VXzTolhb3GwwQkMZxWLjam3buEX6SLuS1A7XXZn3aKeLu6KhUin6_aR3jP0s2_Y50Mjv3x0EouaIKQJEINqYRgi9K2SKAxzRSKjGksdNGNcNRGs6cydkHSJF-f60p9HRBbBsN7duP8qm0K2URSJ1DX30=",
      "summary": []
    },
    {
      "id": "msg_0f4dd4f38f19eb60016a99d9b7d7f087d191f17156c41c2f32",
      "type": "message",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "annotations": [],
          "logprobs": [],
          "text": "No. For a 30-day month:\n\n- Total time: \\(30 \\times 24 \\times 60 = 43{,}200\\) minutes\n- Error budget: \\(43{,}200 \\times (1 - 0.999) = 43.2\\) minutes\n- Remaining budget: \\(43.2 - 31 = 12.2\\) minutes\n\nAssuming 31 minutes is the total downtime this month, it is **within the error budget**."
        }
      ],
      "phase": "final_answer",
      "role": "assistant"
    }
  ],
  "status": "completed",
  "usage": {
    "input_tokens": 44,
    "output_tokens": 151,
    "total_tokens": 195,
    "input_tokens_details": {
      "cache_write_tokens": 0,
      "cached_tokens": 0
    },
    "output_tokens_details": {
      "reasoning_tokens": 41
    }
  },
  "access_programs": {
    "cyber": "standard"
  },
  "background": false,
  "billing": {
    "payer": "developer"
  },
  "completed_at": 1788467641,
  "error": null,
  "frequency_penalty": 0,
  "incomplete_details": null,
  "instructions": null,
  "max_output_tokens": 512,
  "max_tool_calls": null,
  "moderation": null,
  "parallel_tool_calls": true,
  "presence_penalty": 0,
  "previous_response_id": null,
  "prompt_cache_key": null,
  "prompt_cache_retention": "24h",
  "reasoning": {
    "context": "all_turns",
    "effort": "high",
    "mode": "standard",
    "summary": null
  },
  "safety_identifier": null,
  "service_tier": "default",
  "store": false,
  "temperature": 1,
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "medium"
  },
  "tool_choice": "auto",
  "tool_usage": {
    "image_gen": {
      "input_tokens": 0,
      "input_tokens_details": {
        "image_tokens": 0,
        "text_tokens": 0
      },
      "output_tokens": 0,
      "output_tokens_details": {
        "image_tokens": 0,
        "text_tokens": 0
      },
      "total_tokens": 0
    },
    "web_search": {
      "num_requests": 0
    }
  },
  "tools": [],
  "top_logprobs": 0,
  "top_p": 0.98,
  "truncation": "disabled",
  "user": null,
  "metadata": {},
  "gatewayMetadata": {
    "keySource": "Unified"
  }
}

Examples

Migration Safeguards — Generate a concise answer through Chat Completions
const response = await env.AI.run(
  'openai/gpt-6-astra',
  {
    messages: [
      { role: 'user', content: 'List three practical safeguards for a production API migration.' },
    ],
    max_completion_tokens: 256,
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/chat/completions \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "openai/gpt-6-astra",
  "messages": [
    {
      "role": "user",
      "content": "List three practical safeguards for a production API migration."
    }
  ],
  "max_completion_tokens": 256
}'
1. **Validate compatibility before rollout.** Run contract and integration tests against real client behaviors. Keep breaking changes behind a new API version, and verify authentication, error formats, and data schemas.

2. **Roll out gradually with monitoring.** Start with internal traffic or a small canary group. Track error rates, latency, and critical business metrics; pause expansion if predefined thresholds are exceeded.

3. **Prepare and test rollback.** Keep the old API available and use a feature flag or traffic switch to revert quickly. Ensure database changes remain backward-compatible, and rehearse the rollback procedure.
{
  "id": "chatcmpl-EK8QDqH1XsfW6m8nEHXxUkrKGcWG5",
  "object": "chat.completion",
  "created": 1788467641,
  "model": "gpt-6-astra",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "1. **Validate compatibility before rollout.** Run contract and integration tests against real client behaviors. Keep breaking changes behind a new API version, and verify authentication, error formats, and data schemas.\n\n2. **Roll out gradually with monitoring.** Start with internal traffic or a small canary group. Track error rates, latency, and critical business metrics; pause expansion if predefined thresholds are exceeded.\n\n3. **Prepare and test rollback.** Keep the old API available and use a feature flag or traffic switch to revert quickly. Ensure database changes remain backward-compatible, and rehearse the rollback procedure.",
        "refusal": null,
        "annotations": []
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 16,
    "completion_tokens": 151,
    "total_tokens": 167,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "cache_write_tokens": 0,
      "audio_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 23,
      "audio_tokens": 0,
      "accepted_prediction_tokens": 0,
      "rejected_prediction_tokens": 0
    }
  },
  "service_tier": "default",
  "system_fingerprint": null,
  "gatewayMetadata": {
    "keySource": "Unified"
  }
}

Parameters

Schema variant
instructions
string
temperature
numberminimum: 0maximum: 2
max_output_tokens
numberexclusiveMinimum: 0
top_p
numberminimum: 0maximum: 1
stream
boolean
tool_choice
id
string
object
stringconst: response
created_at
number
model
string
output_text
string
status
stringenum: in_progress, completed, failed, incomplete

API Schemas (Raw)

Input
Output

Was this helpful?