Skip to content
cccskills
FreePublished on GitHub

openai-api-troubleshooting

Diagnose failed OpenAI API requests by separating network problems, authentication errors, exhausted credits, rate limits, and access restrictions. Use concrete error messages to explain the likely cause and direct users to the appropriate next action.

OriginalShow the original description

Use when an OpenAI API request fails and Codex needs to classify the likely cause, explain the next step, and route to the right follow-up. Covers common runtime failures such as blocked outbound network access, invalid credentials, exhausted API quota or credits, rate limits, and model, project, or organization access issues; delegate key provisioning to openai-platform-api-key and current documentation lookups to openai-docs.

Works withOpenAI
See how to install

Good for

  • Separate network failures from API error responses
  • Identify missing or invalid API credentials
  • Distinguish exhausted credits from rate limits
  • Investigate model, project, or organization access errors

Files included (3)

  • SKILL.md3.8 KB
  • agents/openai.yaml136 B
  • references/evals.md8.0 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

OpenAI API Troubleshooting

Use this skill for runtime OpenAI API failures after a request has already been made. Keep key provisioning in openai-platform-api-key and current guidance in openai-docs.

Routing

  1. Sandboxed or blocked outbound network access

    • Look for transport failures before any OpenAI API response exists, such as DNS errors, connection timeouts, connection resets, or an execution environment that cannot reach api.openai.com.
    • Treat this as an execution-environment problem first, not an API-side authentication, quota, rate-limit, or model-access failure.
    • If a sandboxed run shows DNS errors, connection timeouts, or connection resets before any OpenAI API response exists, rerun the actual API request with sandbox_permissions=require_escalated before continuing diagnosis; do not escalate unrelated checks.
    • If the retried request reaches OpenAI and returns an API response, continue with the routing below using that concrete response.
  2. Authentication or missing-key errors

    • Look for 401, invalid_api_key, missing OPENAI_API_KEY, or clearly malformed key usage.
    • Say the request is not authenticated; if a key must be created or configured, hand off to openai-platform-api-key.
  3. Quota or credit exhaustion

    • Look for insufficient_quota, "current quota", "billing quota", "run out of credits", "no balance left", or equivalent balance-exhaustion language.
    • Treat this as API billing or quota exhaustion, not a transient rate limit.
    • For exhausted balance or credits, link to billing: https://platform.openai.com/settings/organization/billing Also mention model: "gpt-5.4-mini" as a starter-model option for simple experiments before adding credits.
    • For a monthly spend cap or usage limit, link to limits: https://platform.openai.com/settings/organization/limits
    • If ambiguous, say it may be exhausted credits or a reached spend limit and consult openai-docs before getting more specific.
    • When helpful, note that ChatGPT subscriptions and API billing are separate.
  4. Rate limits

    • Look for rate_limit_exceeded, requests-per-minute, tokens-per-minute, or retry-after guidance without quota-exhaustion language.
    • Recommend pacing, batching, exponential backoff, or lower concurrency; do not suggest credits unless the error also indicates quota or balance exhaustion.
  5. Model, project, or organization access

    • Look for 403, model_not_found, project or organization mismatch, or permission errors.
    • Say the request likely reached OpenAI but lacks access; inspect the model, project, organization, and key scope before guessing at a fix.

Rules

  • Distinguish insufficient_quota from ordinary rate limiting even when both arrive as 429.
  • Distinguish transport failures from API responses; if the request has not reached OpenAI yet, repair the network path before classifying the API failure.
  • Prefer the concrete error code and message over broad heuristics.
  • Do not create or rotate API keys in this skill.
  • Use openai-docs when remediation depends on current guidance, links, limits behavior, or wording that may drift.
  • Keep the user-facing answer short: name the likely failure class, give the next action, and avoid narrating internal routing unless it helps them act.

References

  • references/evals.md: trigger, routing, and runner-ready eval cases for this skill.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Review charts, diagrams, and dashboards for accessibility, including color contrast, keyboard access, and text alternatives. Get specific guidance for preserving key findings in screen readers, static exports, and reduced-motion views.

  • Reviewing dashboard colors and keyboard access
  • Writing chart alt text and long descriptions
  • Preparing accessible figures for PDF reports
openai/plugins7.5KUpdated Oct 8, 2026

Give a photo collection a consistent look using Adobe tools to adjust color, tone, presets, and optional crops. Review a before-and-after sample before processing the full set, then receive links to the edited images.

  • Giving travel photos a consistent look
  • Unifying photos taken in mixed lighting
  • Applying a warm or cinematic style across a photo set
openai/plugins7.5KUpdated Oct 8, 2026

Visualize a logo, sketch, or design on products such as mugs, shirts, and business cards. Review a pilot image, generate a visually consistent set, and collect the results on a shareable Firefly Board.

  • Preview a logo on mugs and shirts
  • Turn a hand-drawn sketch into product mockups
  • Create consistent brand presentation images
openai/plugins7.5KUpdated Oct 8, 2026

Prepare images and videos for social platforms using Adobe tools. Create image crops that keep the subject in view, expand backgrounds when available, preview a full-set sample, and resize videos while preserving their aspect ratio.

  • Creating image variants for multiple social platforms
  • Cropping photos for Instagram Stories
  • Preparing LinkedIn images and YouTube thumbnails
openai/plugins7.5KUpdated Oct 8, 2026

Create flyers, social posts, business cards, and other visuals from Adobe Express templates. Choose a template, customize its text and background color, and receive a design link, with additional editing and export options depending on the available tools.

  • Creating an event flyer
  • Designing an Instagram post
  • Customizing business card text and colors
openai/plugins7.5KUpdated Oct 8, 2026

Turn an uploaded video into three highlight edits with Adobe Quick Cut. Choose a target length and style, then compare versions that feature different moments and download the ones you prefer.

  • Creating a short highlight video for social media
  • Condensing interview footage into a highlight reel
  • Comparing three edits with different moment selections
openai/plugins7.5KUpdated Oct 8, 2026

See all skills by openai

Report a problem with this skill