NOVELTY - A hybrid organic-inorganic polyimide membrane comprises polyimide that is network of alternating bis-imide units (I) and/or trisimide units (II) and polyhedral oligomeric silsesquioxane (POSS) compound (III), where the membrane has a thickness of 500 nm or less, and a nitrogen atom of two or more of the bis-imide or tris-imide units is linked to a group Q of the POSS compound.    USE - Hybrid organic-inorganic polyimide membrane for separating gaseous molecules such as hydrogen from a gas mixture containing carbon dioxide, carbon monoxide, methane, nitrogen and hydrogen sulfide, and carbon dioxide from methane or nitrogen (all claimed). Can also be used in applications such as steam reforming, water-gas shift reaction and dehydrogenation of hydrocarbons.    ADVANTAGE - The membrane has excellent gas separation property, high permselectivity, stable selectivity and large-scale defect-free processability.    DETAILED DESCRIPTION - A hybrid organic-inorganic polyimide membrane comprises polyimide that is network of alternating bis-imide units of formula (I) and/or trisimide units of formula (II) and polyhedral oligomeric silsesquioxane (POSS) compound of formula (III), where the membrane has a thickness of 500 nm or less, and a nitrogen atom of two or more of the bis-imide or tris-imide units is linked to a group Q of the POSS compound.    A = 2-22C organic moiety, preferably ethylene, ethylidene, optionally substituted alicyclic and aromatic ring systems, and combinations of two or three of the ring systems, optionally linked by C1-C4 alkylidene or halo-alkylidene, ether (-0-), carbonyl (-CO-), sulfide (-S-) or sulfone (-SO2-) bonds;    B == 6-22C organic moiety;    Q = CpHq bound to a silicon atom;    R = hydrogen, hydroxy or 1-4C alkyl, alkoxy, hydroxyalkyl, aminoalkyl or optionally N-alkylated ammonioalkyl, bound to a silicon atom;    m = 2-2n;    n = 2-6;    p = 1-6;    q = 2(p-r) with r = 0-4 and r less than p;    x = 0-(2n-1); and    A or B = ring system selected from benzene, naphthalene, phenalene, anthracene, phenanthrene, biphenyl, biphenylene, triphenylene, fluorene, diphenyl ether, diphenyl sulfide and diphenyl sulfone, benzophenone, diphenyl 1-4C, preferably 1-3C alkanes, dibenzofuran, xanthenes, diphenoxybenzene, terphenyl, or their hydrogenated and/or halogenated analogues, preferably benzene, biphenyl or hexafluoro-2,2-diphenylpropane.    INDEPENDENT CLAIMS are also included for the following:    (1) a method for producing a membrane, which involves optionally providing a support, contacting a solution of a POSS polyamine compound of formula (IV) or its acid-addition salt in a polar solvent comprising water with a solution of the organic dianhydride compound of formula (V) or its corresponding trianhydride, in an organic solvent which is immiscible with the polar solvent, to produce a polymer layer, and drying and heating the polymer layer to a temperature of 180 degrees C or less    (2) a use of membrane for separating gaseous molecules.