{"openapi":"3.1.0","info":{"title":"OpenDocRouter API","version":"1","description":"Parse PDFs and images to markdown with the model of your choice."},"servers":[{"url":"https://www.opendocrouter.ai"}],"tags":[{"name":"Parse","description":"Parse documents, synchronously (up to 50 pages) or as async jobs (up to 500 pages)."},{"name":"Uploads","description":"Upload documents too large to send inline."},{"name":"Account","description":"Credit, and what each request did and cost."},{"name":"Parsing Models","description":"The models you can parse with, their prices, and benchmarks."}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key from the dashboard: `Authorization: Bearer <key>`."}},"schemas":{"ParseRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"For `GET /v1/parse/{id}`."},"model":{"type":"string"},"model_version":{"type":"string"},"price_version":{"type":"string"},"status":{"type":"string","enum":["processing","completed","partial","failed","expired","rejected"],"description":"`expired`: the request's hold ran out before it settled, so it's free. `rejected`: refused before it started (see `error_code`), and free."},"mode":{"type":"string","enum":["sync","async"],"description":"The request's `mode`."},"created_at":{"type":"string","format":"date-time"},"error_code":{"type":["string","null"],"description":"Why a rejected or failed request ended, as an error code."},"page_count":{"type":"integer"},"pages_done":{"type":"integer"},"pages":{"type":"array","items":{"$ref":"#/components/schemas/Page"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["integer","null"],"description":"Pass as `cursor` to get the next pages."},"usage":{"allOf":[{"$ref":"#/components/schemas/Usage"},{"type":["object","null"],"description":"Null until the request settles."}]},"charge_usd":{"type":["number","null"],"description":"Null until the request settles."},"results_expire_at":{"type":["string","null"],"format":"date-time","description":"When the stored results are, or were, deleted. Null while processing or when nothing was stored (like setting `cache: false`)."}},"required":["id","model","model_version","price_version","status","mode","created_at","error_code","page_count","pages_done","pages","has_more","next_cursor","usage","charge_usd","results_expire_at"]},"Page":{"oneOf":[{"$ref":"#/components/schemas/OkPage"},{"$ref":"#/components/schemas/ErrorPage"}],"discriminator":{"propertyName":"status","mapping":{"ok":"#/components/schemas/OkPage","error":"#/components/schemas/ErrorPage"}}},"OkPage":{"type":"object","properties":{"page":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"markdown":{"type":"string","description":"Always in the POST response. From `GET /v1/parse/{id}`, with `expand=markdown` only."},"cached":{"type":"boolean","description":"Served from the result cache, free."},"usage":{"$ref":"#/components/schemas/Usage"},"charge_usd":{"type":"number"},"layout":{"$ref":"#/components/schemas/PageLayout"}},"required":["page","status","cached","usage","charge_usd"]},"Usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}},"required":["input_tokens","output_tokens"]},"PageLayout":{"oneOf":[{"$ref":"#/components/schemas/PageLayoutOk"},{"$ref":"#/components/schemas/PageLayoutError"}],"discriminator":{"propertyName":"status","mapping":{"ok":"#/components/schemas/PageLayoutOk","error":"#/components/schemas/PageLayoutError"}},"description":"For requests sent with `layout: true`: in the POST response, or from GET with `expand=layout`."},"PageLayoutOk":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"width":{"type":"number","description":"Points for a PDF page, pixels for an image."},"height":{"type":"number"},"elements":{"type":"array","items":{"$ref":"#/components/schemas/LayoutElement"},"description":"The markdown's elements in reading order, then pictures it doesn't mention."}},"required":["status","width","height","elements"]},"LayoutElement":{"type":"object","properties":{"type":{"type":"string","enum":["title","section_header","text","list_item","table","picture","chart","formula","caption","footnote","page_header","page_footer","code","form","key_value"]},"lines":{"type":["array","null"],"prefixItems":[{"type":"integer"},{"type":"integer"}],"description":"First and last line of the page markdown, 0-based and inclusive, splitting on \"\\n\" only. Null for a picture the markdown doesn't mention."},"confidence":{"type":"number"},"boxes":{"type":"array","items":{"$ref":"#/components/schemas/LayoutBox"},"description":"In reading order. Empty when the element couldn't be placed; more than one when it's printed in pieces, such as a paragraph that continues in the next column."}},"required":["type","lines","confidence","boxes"]},"LayoutBox":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"r":{"type":"number","description":"Clockwise degrees about the box's centre, for text printed at an angle. x, y, w and h are then the unrotated box."}},"required":["x","y","w","h"],"description":"Fractions of the page width and height, from the top left."},"PageLayoutError":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error":{"type":"object","properties":{"code":{"type":"string","enum":["provider_error","timeout","unreadable_page","at_capacity"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["status","error"],"description":"The page's markdown is still there; layout isn't charged."},"ErrorPage":{"type":"object","properties":{"page":{"type":"integer"},"status":{"type":"string","enum":["error"]},"error":{"$ref":"#/components/schemas/PageError"},"charge_usd":{"type":"number","enum":[0]}},"required":["page","status","error","charge_usd"]},"PageError":{"type":"object","properties":{"code":{"type":"string","enum":["provider_error","rate_limited","timeout","output_truncated","content_filtered","repetitive_output","invalid_output","empty_output","at_capacity","unreadable_page","response_too_large","not_processed"],"description":"- `provider_error`: The provider returned an error.\n- `rate_limited`: The provider rate-limited the page.\n- `timeout`: The page didn't finish before the deadline.\n- `output_truncated`: The output hit the token limit.\n- `content_filtered`: The provider blocked the output, or the model declined.\n- `repetitive_output`: The model got stuck repeating the same text.\n- `invalid_output`: The model answered without transcribing the page.\n- `empty_output`: The model returned no text.\n- `at_capacity`: No provider capacity before the deadline.\n- `unreadable_page`: The PDF opened, but this page couldn't be split or rendered.\n- `response_too_large`: The page didn't fit in the response. Request it on its own with pages.\n- `not_processed`: The async job ended before this page ran."},"message":{"type":"string","description":"The page's own message in the POST response, or from GET with `expand=markdown`. Otherwise the code's standard description."},"reason":{"type":"string","description":"The provider's own reason when it gave one, e.g. `RECITATION`, `SAFETY`, `refusal`, `max_tokens` or `repetition`."}},"required":["code","message"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","url_not_allowed","unauthorized","insufficient_credits","account_paused","not_found","gone","results_not_stored","too_large","unsupported_type","unreadable_document","rate_limited","at_capacity","model_starting","internal_error"],"description":"- `invalid_request`: The body, a parameter or the model is invalid.\n- `url_not_allowed`: The document URL points somewhere we won't fetch.\n- `unauthorized`: The API key is missing, unknown or revoked.\n- `insufficient_credits`: Not enough available credit to hold the request's maximum cost.\n- `account_paused`: The account is paused.\n- `not_found`: No such request, job, upload or path.\n- `gone`: The request's stored results were deleted, by the caller or 24 hours after it finished.\n- `results_not_stored`: The request's results weren't stored: it was a sync request without `cache: true`, so they were returned once, in the POST response.\n- `too_large`: The body, document or page selection is over a limit.\n- `unsupported_type`: Only PDF, PNG and JPEG are supported.\n- `unreadable_document`: The document couldn't be fetched or opened.\n- `rate_limited`: Too many requests or jobs at once, too many GETs in a minute, or the provider is rate-limiting.\n- `at_capacity`: The model is at capacity or temporarily unavailable.\n- `model_starting`: A hosted model is starting up. Retry in a few minutes.\n- `internal_error`: Something went wrong on our side."},"message":{"type":"string"},"required_usd":{"type":"number","description":"`insufficient_credits` only: what the request needs available."},"available_usd":{"type":"number","description":"`insufficient_credits` only: what the account has available."}},"required":["code","message"],"additionalProperties":{}}},"required":["error"]},"ParseRequest":{"type":"object","properties":{"model":{"type":"string","description":"A model `id` from `GET /v1/models`.","example":"google/gemini-3-flash"},"document":{"anyOf":[{"$ref":"#/components/schemas/UrlDocument"},{"$ref":"#/components/schemas/InlineDocument"},{"$ref":"#/components/schemas/UploadDocument"}],"description":"A URL, inline base64 data, or an upload."},"mode":{"type":"string","enum":["sync","async"],"description":"`sync` parses the document in this request and returns 200 with results for every page, up to the model's `max_sync_pages`. `async` returns 202 parses it as a job pollable on `GET /v1/parse/<id>`, up to 500 pages. It needs `cache: true`. Defaults to `sync`."},"pages":{"type":"string","description":"1-based pages and ranges. Defaults to every page. At most the model's `max_sync_pages` in sync mode, 500 in async mode.","example":"1-3,7"},"cache":{"type":"boolean","description":"Store the results, encrypted, for 24 hours: `GET /v1/parse/{id}?expand=markdown` reads them and `DELETE /v1/parse/{id}` deletes them sooner. Pages your account already has stored for the same document, model and `layout` are served from them, free. Required for `async`. Defaults to false."},"layout":{"type":"boolean","description":"Add each ok page's `layout`: its elements, the markdown lines each one spans and where it's printed. Adds $0.20 per million tokens to pages whose layout comes back. Defaults to false."}},"required":["model","document"]},"UrlDocument":{"type":"object","properties":{"url":{"type":"string","description":"A public URL to fetch, up to 50 MB."}},"required":["url"]},"InlineDocument":{"type":"object","properties":{"data":{"type":"string","minLength":1,"description":"The file, base64-encoded."},"mime_type":{"type":"string","enum":["application/pdf","image/png","image/jpeg"]}},"required":["data","mime_type"]},"UploadDocument":{"type":"object","properties":{"upload_id":{"type":"string","description":"An ID obtained from `POST /v1/uploads`."}},"required":["upload_id"]},"DeletedJob":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]},"Upload":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"},"upload_url":{"type":"string","description":"PUT the file here."},"max_bytes":{"type":"integer"},"expires_at":{"type":"string","format":"date-time"}},"required":["upload_id","upload_url","max_bytes","expires_at"]},"Credits":{"type":"object","properties":{"balance_usd":{"type":"number","description":"Everything paid in, minus everything charged."},"reserved_usd":{"type":"number","description":"Held by requests still running."},"available_usd":{"type":"number","description":"What a new request can use: balance minus reserved."}},"required":["balance_usd","reserved_usd","available_usd"]},"ModelList":{"type":"object","properties":{"price_version":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"version":{"type":"string","description":"Changes whenever output behavior can change."},"max_sync_pages":{"type":"integer","description":"Most pages a `mode: \"sync\"` request can take."},"parsebench":{"type":["object","null"],"properties":{"score":{"type":"number","description":"Mean of the five category scores."},"tables":{"type":"number"},"charts":{"type":"number"},"content_faithfulness":{"type":"number"},"semantic_formatting":{"type":"number"},"visual_grounding":{"type":"number","description":"How well `layout: true` places each element on the page."}},"required":["score","tables","charts","content_faithfulness","semantic_formatting","visual_grounding"],"description":"ParseBench scores for this version. Null while benchmarking."},"price_per_million_tokens":{"type":"object","properties":{"input":{"type":"number"},"cached_input":{"type":"number"},"output":{"type":"number"}},"required":["input","cached_input","output"]},"max_charge_per_page_usd":{"type":"number","description":"The most one page can be charged, which is what a request holds per page."},"avg_charge_per_page_usd":{"type":["number","null"],"description":"What a typical page costs at these prices: the mean tokens per page this version used on ParseBench. An estimate; your pages may differ. Null until benchmarked."}},"required":["id","name","version","max_sync_pages","parsebench","price_per_million_tokens","max_charge_per_page_usd","avg_charge_per_page_usd"]}}},"required":["price_version","data"]}},"parameters":{}},"paths":{"/v1/parse":{"post":{"operationId":"parse","tags":["Parse"],"summary":"Parse a document","description":"`mode: \"sync\"` (the default) parses the document in this request and returns 200 with every page, up to the model's `max_sync_pages`. `mode: \"async\"`, which needs `cache: true`, returns 202 and parses up to 500 pages as a job; `GET /v1/parse/{id}?expand=markdown` has the results. At most 5 async requests run at once per account, and at most 300 requests a minute.\n\nAdmission holds the most the request could cost; it's released, less the actual charge, when the request finishes. Failed pages are free.","security":[{"apiKey":[]}],"requestBody":{"required":true,"description":"JSON, at most 4 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseRequest"}}}},"responses":{"200":{"description":"`mode: \"sync\"` only: parsed. Some pages may have failed (`partial`).","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseRecord"}}}},"202":{"description":"`mode: \"async\"` only: accepted as a job. Poll `GET /v1/parse/{id}`.","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseRecord"}}}},"400":{"description":"`invalid_request`, `url_not_allowed`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`insufficient_credits`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`account_paused`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`too_large`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"`unsupported_type`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`unreadable_document`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait before retrying."},"required":true,"description":"Seconds to wait before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`at_capacity`, `model_starting`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait before retrying."},"required":true,"description":"Seconds to wait before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/parse/{id}":{"get":{"operationId":"getParse","tags":["Parse"],"summary":"Get parse details and results","description":"Works for any request. While it runs, `pages` is empty and `pages_done` counts progress. Then it returns every page, unless the expanded results are over 4 MB: then `has_more` is true, and you ask again with `cursor` set to `next_cursor`.\n\nMarkdown and layout are opt-in, with `expand`, and only requests sent with `cache: true` store them, for 24 hours after they finish. Without `expand`, this never returns document text.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The parse request's `id`."},"required":true,"description":"The parse request's `id`.","name":"id","in":"path"},{"schema":{"type":"integer","description":"The `next_cursor` of the previous response."},"required":false,"description":"The `next_cursor` of the previous response.","name":"cursor","in":"query"},{"schema":{"type":"string","pattern":"^(markdown|layout)(,(markdown|layout))?$","description":"`markdown` adds each ok page's markdown, `layout` its layout (for requests sent with `layout: true`), and `markdown,layout` both. For requests sent with `cache: true`.","example":"markdown,layout"},"required":false,"description":"`markdown` adds each ok page's markdown, `layout` its layout (for requests sent with `layout: true`), and `markdown,layout` both. For requests sent with `cache: true`.","name":"expand","in":"query"}],"responses":{"200":{"description":"The request.","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseRecord"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`account_paused`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`results_not_stored`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"`gone`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait before retrying."},"required":true,"description":"Seconds to wait before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteParse","tags":["Parse"],"summary":"Delete a request's stored results","description":"Deletes the results stored with `cache: true`, so they're also no longer served from the cache. A running job stops before its next chunk. Pages already parsed are still charged. The request's status and cost stay available.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The parse request's `id`."},"required":true,"description":"The parse request's `id`.","name":"id","in":"path"}],"responses":{"200":{"description":"Deleted. Deleting again also returns 200.","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedJob"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`account_paused`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/uploads":{"post":{"operationId":"createUpload","tags":["Uploads"],"summary":"Get a one-time URL to upload large documents","description":"For documents over 4 MB. PUT the file to `upload_url` (up to 50 MB), then send `document: {upload_id}` to `POST /v1/parse`. An upload can be used once, and expires 60 minutes after it's created. An account can have 100 unused uploads at once.","security":[{"apiKey":[]}],"responses":{"201":{"description":"Created.","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"}}}},"401":{"description":"`unauthorized`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`account_paused`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait before retrying."},"required":true,"description":"Seconds to wait before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/credits":{"get":{"operationId":"getCredits","tags":["Account"],"summary":"Get the account's credit details","security":[{"apiKey":[]}],"responses":{"200":{"description":"Balances in USD.","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credits"}}}},"401":{"description":"`unauthorized`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`account_paused`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/models":{"get":{"operationId":"listModels","tags":["Models"],"summary":"List models and their prices","security":[],"responses":{"200":{"description":"The model catalog.","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}}}},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"schema":{"type":"string","description":"This HTTP request's ID."},"required":true,"description":"This HTTP request's ID."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{}}