NativePort Open AI API

The openAi API from NativePort — 2 operation(s) for openai.

GitHub OpenAPI

Operations 4

POST /openai/webhooks OpenAI's own job-completion webhook (not client-facing) #
GET /openai/{path} Relay an OpenAI GET: models, files, vector stores, batches #
POST /openai/{path} Run OpenAI inference, or create a file, batch or job #
DELETE /openai/{path} Delete a file or vector store you own #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nativeport-ai:nativeport-ai-openai-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

nativeport-ai-openai-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Reference Open AI API
  version: 1.0.0
servers:
- url: https://api.nativeport.ai
  description: NativePort production
- url: http://localhost:8787
  description: Local development (wrangler dev)
tags:
- name: openAi
paths:
  /openai/webhooks:
    post:
      operationId: openAi_webhook
      summary: OpenAI's own job-completion webhook (not client-facing)
      description: 'Receives OpenAI''s asynchronous batch/fine-tuning completion callbacks and settles the job''s

        cost against its registered owner. This endpoint is called by **OpenAI**, not by gateway

        clients — it is authenticated by a Standard Webhooks HMAC signature over the request, not by

        a bearer token, and it sits outside the credit gate entirely. Register it as the webhook URL

        in your own OpenAI dashboard if you operate this gateway; nothing about it is reachable or

        useful with a regular NativePort API key.'
      tags:
      - openAi
      responses:
        '200':
          description: The webhook payload was verified and processed (or safely ignored, for an event type this gateway doesn't act on).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAI_webhook_Response_200'
        '400':
          description: The request's Standard Webhooks signature failed verification, or the payload was malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                description: Any type
  /openai/{path}:
    get:
      operationId: openAi_get
      summary: 'Relay an OpenAI GET: models, files, vector stores, batches'
      description: '`GET /v1/models` and `GET /v1/models/{id}` answer locally from the gateway''s own catalog —

        OpenAI''s upstream model list is never proxied (it would enumerate the shared org). Every

        other admitted `GET` reads a stateful resource **you created through this gateway**

        (a file, vector store, batch, or fine-tuning job, including its bare list form, which is

        also answered locally from the gateway''s ownership records rather than proxied); an id you

        don''t own answers the same anonymous `404` as an id that never existed.'
      tags:
      - openAi
      parameters:
      - name: path
        in: path
        description: 'The path to call on OpenAI''s API, any further `/` segments included — all of it after

          `/openai/` is passed to `https://api.openai.com/` when the gateway''s model catalog and

          endpoint/field policy admit the request (see the OpenAI tag description and *The four

          model-inference routes are policed, not transparent* above). Examples:

          `v1/chat/completions`, `v1/responses`, `v1/embeddings`, `v1/moderations`, `v1/models`,

          `v1/models/{model}`, `v1/files`, `v1/files/{id}`, `v1/vector_stores`,

          `v1/batches`, `v1/batches/{id}/cancel`, `v1/fine_tuning/jobs`,

          `v1/fine_tuning/jobs/{id}/events`.

          '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: 'Whatever the upstream answered, relayed as-is (status, headers, body). Rendered here as

            JSON; the true shape is the upstream provider''s to define.

            '
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  description: Any type
        '400':
          description: 'The gateway''s own request-policy check rejected the call before it reached the upstream —

            an unrecognized `model`, a disallowed body field, an unapproved `anthropic-beta` flag, or

            similar. Shaped like the upstream''s own error envelope (OpenAI/Grok/Hugging Face style) so

            official SDKs render it without special-casing; the `code` value (`gateway_*`) names the

            specific rejection reason and isn''t part of the upstream''s own documented set of codes.

            '
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  description: Any type
        '401':
          description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'No route matched the path, or the matched route disallows that method (an unlisted

            `/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the

            gateway sends it. A path on one of the four model-inference routes also `404`s this way when

            the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model

            addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
    post:
      operationId: openAi_post
      summary: Run OpenAI inference, or create a file, batch or job
      description: 'Covers `v1/responses`, `v1/embeddings`, `v1/chat/completions`, and the free-but-rate-limited

        `v1/moderations`, plus creating the stateful resources listed in the `path` parameter

        (registered to your account on success) and minting a short-lived Realtime credential via

        `v1/realtime/client_secrets`. The request `model` must be on the gateway''s catalog, and a

        closed set of body fields is forced, denied, or passed through — see the OpenAI tag

        description above.'
      tags:
      - openAi
      parameters:
      - name: path
        in: path
        description: 'The path to call on OpenAI''s API, any further `/` segments included — all of it after

          `/openai/` is passed to `https://api.openai.com/` when the gateway''s model catalog and

          endpoint/field policy admit the request (see the OpenAI tag description and *The four

          model-inference routes are policed, not transparent* above). Examples:

          `v1/chat/completions`, `v1/responses`, `v1/embeddings`, `v1/moderations`, `v1/models`,

          `v1/models/{model}`, `v1/files`, `v1/files/{id}`, `v1/vector_stores`,

          `v1/batches`, `v1/batches/{id}/cancel`, `v1/fine_tuning/jobs`,

          `v1/fine_tuning/jobs/{id}/events`.

          '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: 'Whatever the upstream answered, relayed as-is (status, headers, body). Rendered here as

            JSON; the true shape is the upstream provider''s to define.

            '
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  description: Any type
        '400':
          description: 'The gateway''s own request-policy check rejected the call before it reached the upstream —

            an unrecognized `model`, a disallowed body field, an unapproved `anthropic-beta` flag, or

            similar. Shaped like the upstream''s own error envelope (OpenAI/Grok/Hugging Face style) so

            official SDKs render it without special-casing; the `code` value (`gateway_*`) names the

            specific rejection reason and isn''t part of the upstream''s own documented set of codes.

            '
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  description: Any type
        '401':
          description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'No route matched the path, or the matched route disallows that method (an unlisted

            `/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the

            gateway sends it. A path on one of the four model-inference routes also `404`s this way when

            the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model

            addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                description: Any type
      security:
      - bearerAuth: []
    delete:
      operationId: openAi_delete
      summary: Delete a file or vector store you own
      description: 'Deletes a file or vector store previously created through this gateway. The id must belong

        to your account — a foreign or unknown id answers the same anonymous `404` a never-existed

        id would, never a `403`.'
      tags:
      - openAi
      parameters:
      - name: path
        in: path
        description: 'The path to call on OpenAI''s API, any further `/` segments included — all of it after

          `/openai/` is passed to `https://api.openai.com/` when the gateway''s model catalog and

          endpoint/field policy admit the request (see the OpenAI tag description and *The four

          model-inference routes are policed, not transparent* above). Examples:

          `v1/chat/completions`, `v1/responses`, `v1/embeddings`, `v1/moderations`, `v1/models`,

          `v1/models/{model}`, `v1/files`, `v1/files/{id}`, `v1/vector_stores`,

          `v1/batches`, `v1/batches/{id}/cancel`, `v1/fine_tuning/jobs`,

          `v1/fine_tuning/jobs/{id}/events`.

          '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: 'Whatever the upstream answered, relayed as-is (status, headers, body). Rendered here as

            JSON; the true shape is the upstream provider''s to define.

            '
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  description: Any type
        '401':
          description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'No route matched the path, or the matched route disallows that method (an unlisted

            `/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the

            gateway sends it. A path on one of the four model-inference routes also `404`s this way when

            the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model

            addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Explanatory message meant for humans.
      required:
      - error
      title: Error
    OpenAI_webhook_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: OpenAI_webhook_Response_200
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your per-client bearer token — the API key the gateway issued to you. Present it in

        `Authorization: Bearer <token>` form. A token that is missing, unknown, or revoked draws a

        `401`. Before the call is sent upstream the token is removed (stripped, or swapped for the

        upstream''s own credential); it never makes it past the gateway.

        '